Alignment in EEPROM

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

Alignment in EEPROM

跳至解决方案
1,702 次查看
BAN
Contributor II

Hello

 

I'm looking for a way to align my data in the EEPROM. Is there any directive in C for this purpose. Is it possible to use the 'ALIGN' assembler directive in some way?

 

/BAN

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
581 次查看
kef
Specialist I

In PRM file you may specify segment alignment. With alignment specified linker will align all variables (objects) placed to that specified segment. For example using S12D64 you may want eeprom items to start on eraseable 4-bytes EEPROM sector boundary:

 

      EEPROM        = NO_INIT       0x0C00 TO   0x0FEF ALIGN 4;

在原帖中查看解决方案

0 项奖励
回复
1 回复
582 次查看
kef
Specialist I

In PRM file you may specify segment alignment. With alignment specified linker will align all variables (objects) placed to that specified segment. For example using S12D64 you may want eeprom items to start on eraseable 4-bytes EEPROM sector boundary:

 

      EEPROM        = NO_INIT       0x0C00 TO   0x0FEF ALIGN 4;

0 项奖励
回复