AnsweredAssumed Answered

leading flash page before main app - run & debug

Question asked by Andreas Schnitzer on Oct 13, 2016
Latest reply on Nov 23, 2016 by soledad

Hi,

 

Platform: LPC15 & LPCexpresso 8.2.2


a bootloader managed application will run from a start address 0x2100 (this works fine).

For transmitting a new image later, a leading page of 256 Bytes (or less) with information’s like Version Number etc. should be added.

 

To avoid to begin with own linker scripts I did the following:

In main.c:

  • Flash2 data only a test with a string for now
  • CRP-disabled

...

__attribute__ ((used, section(".rodata.$Flash2"))) static const char version[] = "Version01";

int main(void) {

               

       SCB->VTOR = 0x2100;    //needed to directly debug this app (mcu setting is start @0x2100)

      __enable_irq();                   //bootloader jump diabled isr

      volatile char* version_ = (volatile char*) version;            //__attribute__ ((used,...above is not working so this.

...

the generated binary looks like:

 

Adjusted the debugger cfg:

(tried also with std main)

 

The debugger failed to run this setup

 

(Unable to retrieve disassembly data from backend and other errors)

 

Any suggestions whats wrong or missing?

 

Thanks

 

Andreas

Outcomes