I have a code for ATmega written in C and compiled with GCC compiler.
Some data need to be stored in EEPROM so I add these declarations:
After I read EEPROM I found that data placed in some weird way. After some investigation I found this text in .map file (one of many produced by the tool chain):
As you can see compiler put data in reverse order.
Of course I could reverse declaration and enjoy further coding but this is something unexpected so I'm afraid to face with any other unexpected behaviour until i don't understand why compiler did so.
Any thoughts?