Loading...
Pages: [1]   Go Down
Author Topic: Changing eeprom datas without uploading the software ?  (Read 228 times)
0 Members and 1 Guest are viewing this topic.
France
Offline Offline
Sr. Member
****
Karma: 2
Posts: 378
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is there a way with the IDE to only change the datas in the eeprom memory without uploading the software.

I want to send several arduino that will need every one different ID, datas, etc... in the eeprom.

I would like to do a small software or using the IDE to only change these data in the eeprom. I do not want people to get the sources of the soft.

May I do realize it without using an external memory card reader ?

(I think it's not possible, but ...)

Thanks.
« Last Edit: May 31, 2012, 05:25:27 pm by Grag38 » Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 96
Posts: 6331
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The program that the IDE uses to write to FLASH and the fuses can also be used to write to EEPROM:

avrdude -Cavrdude.conf  -patmega168 -cstk500v1 -P/dev/tty -b19200 -Ueeprom:w:0,0,0,1:m

This should write 0x00, 0x00, 0x00, 0x01 into the first four bytes of EEPROM.
Logged

France
Offline Offline
Sr. Member
****
Karma: 2
Posts: 378
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks a lot !

I will try this week-end.

May be it could a feature request of the ide to allow us reading/writing the EEPROM without uploading the soft !
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 240
Posts: 16426
Available for Design & Build services
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

JohnW,
How does one run that command? in Windows?
Just open the DOS/Command Prompt box and type that in at the arduino folder directory?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 96
Posts: 6331
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

JohnW,
How does one run that command? in Windows?
Just open the DOS/Command Prompt box and type that in at the arduino folder directory?

I have not used Windows for a long time.  On the Mac you use a Terminal session (much like a console window on Windows) and type in the huge long path to avrdude and its config file:

/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -cstk500v1 -P/dev/tty.usbserial-A6004peF  -b19200 -Ueeprom:w:0,0,0,1:m

What I do is turn on verbose upload logging (in Arduino Preferences) and copy the command line from there to get the paths right.
Logged

SF Bay area
Offline Offline
Full Member
***
Karma: 0
Posts: 156
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

JohnW,
How does one run that command? in Windows?
Just open the DOS/Command Prompt box and type that in at the arduino folder directory?

that's pretty much it. you may need to specify full path name to the program and to the conf file.
you can turn on verbose upload on arduino IDE to see the exact command arduino makes, and you can do the same in a dos prompt.

like if I upload the blink sketch, this is what arduino does

E:\arduino-1.0\hardware/tools/avr/bin/avrdude -CE:\arduino-1.0\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -carduino -P\\.\COM1 -b115200 -D -Uflash:w:C:\TEMP\build2046637769768951399.tmp\Blink.cpp.hex:i

or modify as needed, say to write eeprom. you will need -cstk500v1 instead of -carduino.
Logged

Pages: [1]   Go Up
Print
 
Jump to: