Hello,
I porting a Keil project using the NXP KL17Z128 to SES. I am trying to change the flash start address and sizes as follows:
Flash Segment 1 (ARM start code)- start 0x0 size 0x400
Flash Segment 2 (Program Code) - start 0x1000
I have edited MKL17Z128xxx4_MemoryMap.xml to
<MemorySegment name="FLASH" start="0x00001000" size="0x00020000" access="ReadOnly" />
Problem:
However, inspecting the disassembly and *.bin file, there is still code being placed between 0x410 and 0x1000.
It seems like Embedded Studio is placing the user code and 0x1000, but it is also perhaps filling in constants and other data or code in the 0x410-0x1000 section. Is there a way to prevent this, perhaps to define a startup section and code section?
Reason:
I need to do this because NXP has a security section of flash at 0x400-0x40F that, if erased and not immediately rewritten, can potentially require the whole chip to be erased. If my bootloader failed to erase and write this section, it would wipe out our calibration data and effectively brick the device. My solution was to "jump" the code over this section to avoid having to erase the 0x400 section and risk bricking the device.
I porting a Keil project using the NXP KL17Z128 to SES. I am trying to change the flash start address and sizes as follows:
Flash Segment 1 (ARM start code)- start 0x0 size 0x400
Flash Segment 2 (Program Code) - start 0x1000
I have edited MKL17Z128xxx4_MemoryMap.xml to
<MemorySegment name="FLASH" start="0x00001000" size="0x00020000" access="ReadOnly" />
Problem:
However, inspecting the disassembly and *.bin file, there is still code being placed between 0x410 and 0x1000.
It seems like Embedded Studio is placing the user code and 0x1000, but it is also perhaps filling in constants and other data or code in the 0x410-0x1000 section. Is there a way to prevent this, perhaps to define a startup section and code section?
Reason:
I need to do this because NXP has a security section of flash at 0x400-0x40F that, if erased and not immediately rewritten, can potentially require the whole chip to be erased. If my bootloader failed to erase and write this section, it would wipe out our calibration data and effectively brick the device. My solution was to "jump" the code over this section to avoid having to erase the 0x400 section and risk bricking the device.