avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] including default eeprom values in flash memory


From: Prashant D. Kharade
Subject: RE: [avr-gcc-list] including default eeprom values in flash memory
Date: Wed, 21 Oct 2009 16:05:15 +0530

Hi,

One method, which I have read on the net & also used by myself in my
project is as follows.

As per this we have to write the default eeprom values in our 'C' file.

1. Create one variable named eeload.
2. In your main program, if eeload !=250 (any random value) then put all
your default values in EEprom.
3. And also load eeload = 250.
4. Because of this, next time eeload will be 250 & default values will
not be reloaded.
5. Hence after you load your main hex file, at first instant all the
default eeprom values will get loaded alongwith eeload=250.
6. This part of code will never get executed in future because eeload =
250.

Hope this will help you.
Good Luck

Prashant
India

-----Original Message-----
From: address@hidden
[mailto:address@hidden On
Behalf Of Michael Clift
Sent: 21 October 2009 15:04
To: address@hidden
Subject: [avr-gcc-list] including default eeprom values in flash memory

Hi, I am using winavr, and would like to include the default eeprom 
values (normally output to .eep) in flash memory. I want to do this so 
that my application can easily default the eeprom. Whats the best way to

do this? can it be done with a modification to the linker script? or 
should it be done in the makefile somehow?



Regards, Michael.



_______________________________________________
AVR-GCC-list mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.423 / Virus Database: 270.14.24/2449 - Release Date:
10/20/09 18:42:00





reply via email to

[Prev in Thread] Current Thread [Next in Thread]