Hello,
I am using S32DS 3.5 update 10 + RTD 3 for S32K312 and trying to put some code to .ramcode section so that it runs from RAM.
ie. for some functions in C40_ip.h I have changed
C40_Ip_StatusType C40_Ip_MainInterfaceSectorEraseStatus(void);
to
C40_Ip_StatusType C40_Ip_MainInterfaceSectorEraseStatus(void) __attribute__((section (".ramcode")));
But when I select Optimize level O0 or O1, the code is not put into .ramcode section
With O2 and more, it is put into .ramcode but I cannot debug where it is causing HardFault
Can anybody help with this? Or give me another solution to make the code run from RAM (to be able to erase sectors and write to flash)?
Thanks,
Martin