MCF52259. Align command in lcf file.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MCF52259. Align command in lcf file.

1,674 次查看
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.
标签 (1)
0 项奖励
回复
1 回复

737 次查看
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 项奖励
回复