Hello, what I would like to do is to copy a function from SRAM to flash and decide in the main if I want to execute from flash or from SRAM. What I observed it is that if this function is calling a subroutine placed in SRAM, when I execute it from flash the jump will not be set correctly: it will try to jump to a subroutine placed in flash, but this function is located in SRAM!!! What can I do to have the correct address when I execute from flash? I tried with the PI qualifiers ropi, but it does not work... I am using a device with Cortex M4
Hello,
This is a customer application and this requiremets was given to me by my customer. The customer wants the possibility to have a function in sram and the same in flash and to decide when to use when or the other.
Alex
Easy - make two copies of the function. One linked for RAM and one linked for flash.
Good solution? Not at all. But the customer gets what he wants - and gets to pay the price from wanting what he shouldn't.