Hot!Code configurator and boot loader causing address trap

Author
squin
New Member
  • Total Posts : 6
  • Reward points : 0
  • Joined: 2018/06/21 01:10:15
  • Location: 0
  • Status: offline
2018/09/11 02:31:00 (permalink)
0

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.
 
void SYSTEM_Initialize(void)
{
       PIN_MANAGER_Initialize();
       OSCILLATOR_Initialize();
       INTERRUPT_Initialize(); <- Code fails here
       SPI1_Initialize();
       ........
 
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 :
{
*(bootcode);
} >boot
 
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?
#1
Jump to:
© 2018 APG vNext Commercial Version 4.5