??? 04/12/10 00:18 Read: times |
#174983 - Loading Flash EEPROM with defaults |
Hi all
I have set aside some flash for use as an eeprom, it is working well I can read and write to the flash no problems. I would like to assign to the flash some default values which I know at compile time, but may be overwritten by the user when the product is deployed. Here is what I want to achieve. volatile unsigned char code dataflash[DATAFLASHSIZE] _at_ DATAFLASHSTART = {0x01, 0x02, 0x03}; Where in the case above I am writing 3 bytes to my dataflash array, the DATAFLASHSIZE = 512bytes so Iam not filling the entire array just the first 20 or so bytes. Why doesn't the above work???? How else can I achieve this?? Thanks and Regards Marshall Brown |
Topic | Author | Date |
Loading Flash EEPROM with defaults | 01/01/70 00:00 | |
this seems to work - any improvements | 01/01/70 00:00 | |
Always a key requirement! | 01/01/70 00:00 | |
toolchain dependent | 01/01/70 00:00 | |
A couple of points | 01/01/70 00:00 | |
volatile | 01/01/70 00:00 | |
separate source | 01/01/70 00:00 | |
So subtle | 01/01/70 00:00 | |
Excel is (also) among your friends | 01/01/70 00:00 | |
Yes missing initialisers do default to 0 | 01/01/70 00:00 | |
My Method... | 01/01/70 00:00 | |
an alternate suggestion (which I use) | 01/01/70 00:00 | |
That uses more memory | 01/01/70 00:00 | |
Oliver ??? | 01/01/70 00:00 | |
I believe that is what most devices do..![]() | 01/01/70 00:00 |