MCF52259. Align command in lcf file.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MCF52259. Align command in lcf file.

1,266 Views
Zaas
Contributor I

Dear all,

 

I would like to know when and why I have to use 0x4 or 0x10 alignment into the lcf file.

With CodeWarrior tools when It creates a new project used a 0x4 align in internal_flash target while in 'MCF5225x_Bootloader_with_Application' example project uses 0x10 align. I have seen others lcf file where It mix both alignements. I read  'ELF linker and Command Language' - Targetting Manual but I still without know when I have to use one of them. An example will be appreciate.

 

Thanks  in advance.
Labels (1)
0 Kudos
1 Reply

329 Views
PaoloRenzo
Contributor V

Hi

 

In my experience, not such rule exists to use 0x4 or 0x10 alignments for MCUs. Alignment comes from special memory areas which require such alignment per module request, like the FEC module. For example it states a ALIGN(0x04) at LCF or at source code level to declare packet buffers start address. Or might be because some kind of legacy from MPUs LCF files. Also could come as a way to avoid auto-alignment feature from the DMA controller.

 

Just giving some ideas, but I guess you'll be fine with a ALIGN(0x4). Anyone else can comment on this one?

0 Kudos