Alignment in EEPROM

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

Alignment in EEPROM

Jump to solution
1,771 Views
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

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
650 Views
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;

View solution in original post

0 Kudos
Reply
1 Reply
651 Views
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 Kudos
Reply