SPC5 code call from flash to RAM
Hi,
I've got the latest SPC5Studio 6 with all updates (gcc4.9.4) and testing on the SPC560D40L1 chip with the discovery board. So core is e200z0h VLE.
I want to manipulate the flash in my app so I need to call some code from the RAM. I added the necessary sections in the application.ld, and the necessary attribute for my method :
__attribute__ ((section (".codeinram"))) void method_in_ram()
I'm calling this method from flash code
void flash_method() {
method_in_ram()
}
All this compile correctly (no warning, no error), but this crashes during debug with invalid opcode...
I decompiled the hex, found that the flash_method content is not VLE code but PPC code !! e200z0h does not support PPC but only PPC VLE. Why is gcc creating PPC opcodes to call a method in RAM ? I tried to add longcall attribute but it does not help ...
Any help appreciated!
Thanks
