leading flash page before main app - run & debug

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

leading flash page before main app - run & debug

965件の閲覧回数
andreasschnitze
Contributor II

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:

pastedImage_1.png

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:

pastedImage_2.png

Adjusted the debugger cfg:

pastedImage_3.png

(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

ラベル(2)
タグ(1)
0 件の賞賛
返信
1 返信

640件の閲覧回数
soledad
NXP Employee
NXP Employee

Hello,

Please check the below threads and let me know if this helps.

Placing code/rodata into different FLASH blocks 

Placing data at an address 

https://community.nxp.com/thread/389100


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信