AnsweredAssumed Answered

How to manage a no_init area in RAM when there are 2 applications on MCU ROM

Question asked by Gaurav Banyal on Sep 5, 2017
Latest reply on Sep 6, 2017 by Gaurav Banyal

Dear Kerry Zhou 

(URGENT HEP NEEDED)

 

Here I have a new problem. I have now 2 applications that sit on the MCU flash. One is a custom bootloader FW (that sits at address zero in the program memory and at some point the execution jumps from the bootloader FW to the application FW that sits in the higher area of program memory (flash).

The applicaton firmware is using a NO_INIT region in RAM (its defined in the scatter file of the application FW). When the execution jumps from the bootloader to the application, perhaps this NO_INIT area in the RAM is not available as the bootloader scatter file does not have it defined.

 

I tried to define it in the bootloader scatter file but I think it won't work like that. Following are the snippets from  the .map files. Please note that the bootloader FW does not need the files clock_calibration.c, invisibles_sys.c and sessionmanager.c. They were added in the bootloader FW only to have this section allocated. The padding somehow does not seem to match. Not sure if this would be a problem:

 

Application firmware

======================

Execution Region MYRAM (Base: 0x20000500, Size: 0x00000054, Max: 0x00000100, ABSOLUTE, UNINIT)

Base Addr Size Type Attr Idx E Section Name Object

0x20000500 0x00000001 Zero RW 77 NO_INIT invisibles_sys.o
0x20000501 0x00000003 PAD
0x20000504 0x0000004c Zero RW 417 NO_INIT sessionmanager.o
0x20000550 0x00000002 Zero RW 1019 NO_INIT clock_calibration.o

======================

 

Bootloader firmware

======================

Execution Region MYRAM (Base: 0x20000500, Size: 0x00000050, Max: 0x00000100, ABSOLUTE, UNINIT)

Base Addr Size Type Attr Idx E Section Name Object

0x20000500 0x00000002 Zero RW 315 NO_INIT clock_calibration.o
0x20000502 0x00000001 Zero RW 329 NO_INIT invisibles_sys.o
0x20000503 0x00000001 PAD
0x20000504 0x0000004c Zero RW 343 NO_INIT sessionmanager.o

======================

 

How do I make this work?

 

Best regards,

Gaurav.

Outcomes