Part Number: MSP430FR2355
Hello TI support team,
I am using an MSP430FR2355 FRAM MCU together with IAR Embedded Workbench for MSP430.
My Requirement
I need to reserve the FRAM address range 0xF800 ~ 0xFFFF (2048 bytes) as the bootloader storage area. An array
boot_code[2048] is placed here. This region must not be erased or overwritten during every firmware download, and the stored bootloader data needs to be kept intact.What I Have Implemented
- Modified the custom linker command file (.xcl):
- Assigned
DATA16_NandDATA20_Nsegments for__no_initvariables to the range0xF800 - 0xFFFF. - Restricted all application code, constants and other data segments to addresses below 0xF800 (0x0000 ~ 0xF7FF) to avoid occupation of the reserved area.
- Adjusted the
CSTACKsettings to fix the former linker Error[e18] caused by stack address0x10000exceeding the 16-bit addressing limit. Now the project compiles and links successfully without any errors.
- Assigned
- C code definition:
Declared the array as
__no_init unsigned char boot_code[2048] @ 0xF800;to locate it in the reserved FRAM region. - IAR Download Settings limitation:
I can only select the option "Erase main memory" normally.If I choose "Erase affected sectors" or enable "Retain unchanged memory", IAR will freeze and crash immediately.
Current Problem
Since I have to use "Erase main memory" mode, the entire FRAM will be erased during downloading. As a result, the bootloader data stored at
0xF800 ~ 0xFFFF gets overwritten and lost every time.Could you please tell me the proper configuration to protect this bootloader FRAM area and keep its data unchanged under the "Erase main memory" mode?
Thank you very much for your support.