Hi,
The memory map of my project is:
MEMORY
{
resetvector: org = 0x00000000, len = 0x00000008
init: org = 0x00000020, len = 0x00000FE0
exception_handlers: org = 0x00001000, len = 0x00001000
EE_group: org = 0x00002000, len = 0x0000D000 /* (Emulated EEprom) */
int_flash: org = 0x00020000, len = 0x001E4000
BOOT_FLASH: org = 0x00014000, len = 0x00008000 /* Added Bootloader Block (48k)*
APP_FLASH: org = 0x0001C000, len = 0x00004000
int_sram: org = 0x40000000, len = 0x0000A000
heap : org = 0x4000EC00, len = 0x00000400
stack : org = 0x4000F000, len = 0x00001000
int_gram: org = 0x60000000, len = 0x00100000 /* 1M */
ext_dram: org = 0x20000000, len = 0x02000000 /* 32MB for now */
ext_qspi: org = 0x70000000, len = 0x00800000 /* QSPI 8MB */
}
On the bootloader I upload the app_flash area and the int_flash area. On the app_flash area there are only the main function.
#pragma push
#pragma section ".app_flash"
__declspec(section ".app_flash")
void main(void){
CODE
}
#pragma pop
The other functions are stored on int_flash area.
My program crash when the program try to execute a function that is stored in int_flash section.
For example:
1. (*(APPFn)APP_ENTRY_ADDRESS)(); // jump to app and should not back
2. Enter in main (0x1c000 address)
2. Initialize local variables.
3. Open the first function. ==> Program Crash.
Thanks,
Josep