AnsweredAssumed Answered

Align section linker

Question asked by biafra on Jan 15, 2018
Latest reply on Jan 16, 2018 by biafra

Hi everyone,


I'm writing a bootloader using MCUXpresso v10.1.1_606 and MK66FN2M0VMD18 device.

I found a problem in the flash programming phase.

Based on the device reference manual, the flash must be programmed on a 64 bit aligned phrases (flash start addresses [2:0] = 000, 8 byte length).
The problem rises from the output file of the application, here is an extract (S19):




The first two record are programmed fine, but the third generates an access error because it isn't 64 bit aligned, due to the 4 bytes length of the previous record. Although the two records are contiguous, the linker keeps them separate because there is the division of two different sections, text and data.

I think that the solution could be keeping the application sections aligned on 8 bytes boudary: I searched how to tell the linker to do this, but I didn't find any procedure to configure it.


Have anyone some suggestions?


Many thanks