I'm tring to implement program the flash entirely on S7G2, without bootloader.
I put all functions into internal RAM (PC never come back into flash) and if I try to program first 64K of flash it works, then I reset my CPU.
If I want to program more flash blocks, the system don't erase blocks becouse the g_fmi_data table is already into flash.
So, I add this table into ld script file to put it on internal RAM.
Now, my problem is that the call g_fmi_on_fmi.init() into SystemInit() is made before ram initialization bsp_section_copy(),
and the table g_fmi_data is not already initialized, so the system read a wrong table.
Can I move g_fmi_on_fmi.init() after ram initialization (in someway)?
In reply to Jeremy: