Code configurator and boot loader causing address trap
I have project which I have used code configurator to generate a chunk of the code. This works and I am happy with the performance. I then wanted to implement a boot loader. So I added a modified GLD file to place the boot loader files in a specific location. The changes worked and my bootloader function is placed where I expected. However when the application is run it now generates an address trap. The function fails when INTERRUPT_Initialize() is called. Nothing is executed within this function so no breakpoints are hit.
INTERRUPT_Initialize(); <- Code fails here
I have added the prescribed code to find out which address caused the issue but this is invalid as it references an unused chunk of flash.
The changes to the GLD file were to add this to the MEMORY section:
boot (xr) : ORIGIN = 0x200, LENGTH = 0xDFF
and this to the SECTIONS section
bootcode 0x200 :
the C code uses this format:
void __attribute__((__section__("bootcode"))) HandleIncoming(uint8_t Incoming);
When building there are no errors or warnings. So it seems that editing the GLD file causes puts the uncalled function where I want it but causes an error in the code generated by the configurator.
Anybody come across this before?