Forum : ST7/STM8
Post Information | Post |
---|---|
November 11, 2009 - 4:52pm
|
I tried to have a union in the EEPROM memory but Ride7 keeps crashing (during build) the union was declared as follows: in data.h file - union active_chair_data extern union active_chair_data eeprom chair_eeprom; and in data.c file- union active_chair_data eeprom chair_eeprom; I have another variable declared as this union but it is located in RAM, I believe it should not present a problem. I tried different locations for the eeprom directive (once before and once right after the union (union eeprom active_chair_data chair_eeprom; and eeprom union active_chair_data chair_eeprom;) the compiler crashed. I need the variables to be in the EEPROM in successive addresses so I can write them using a flash programming at the same time without calling the function many times (40 byte write to flash at one go) thanks |
Hi Igal,
I tried to reproduce the problem without any luck. It definitely works!
First thing : The "eeprom" qualifier should be in front of the declaration i.e. "eeprom union active_chair_data chair_eeprom;"
Second: An EEPROM variable should be initialized (there are some chances that values you put in *are* meaningful)
Third: When you say "Ride keep crashing during build", do you mean that the IDE itself crashes, or just the compiler? Can you try to run the compiler from the command-line and check whether it is ok? If this is not the case, the best would be that you send us a zipped project that shows the problem, along with your versions of Ride and RKit-STM8.
Regards,
Bruno