Go Down

Topic: Changing eeprom datas without uploading the software ? (Read 444 times) previous topic - next topic

Grag38

Jun 01, 2012, 12:14 am Last Edit: Jun 01, 2012, 12:25 am by Grag38 Reason: 1
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.

johnwasser

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.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Grag38

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 !

CrossRoads

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?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

johnwasser


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.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

doughboy


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.

Go Up