Alignment in EEPROM

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,743件の閲覧回数
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 解決策
622件の閲覧回数
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 返信
623件の閲覧回数
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 件の賞賛
返信