@VaneB ,
How can I allow function execution from a pointer that I assign the address by value?
It seems it is not related to RAM, specifically. my settings or something does not run if I specify the pointer to the drivers using the memory address.
I tried just defining a dummy function in my project and put it in the flash_driver flash space. function does not perform any flash activities If I use a function pointer that points to the function by name, it works ok. But if I point to the address in flash, to call the function, then it still throws the exception.
It generates the same code for the function, either way.
It seems the IDE, debugger, or something does not like this:
__attribute__((section(".flash_driver")))
__attribute__((optimize("O0")))
status_t test_func(void)
{
status_t result = STATUS_SUCCESS;
return result;
}
typedef status_t (*test_ram_func_t)(void);
g_ptestFunc = (test_ram_func_t)(uintptr_t)0x0000E800u;



But is ok with this g_ptestFunc = test_func;

