Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » AVR-GCC
  • » [avr-gcc-list] Cont. Programming in eeprom in avrdude [RSS Feed]

#1 Oct. 27, 2005 16:36:36

Sumeet P.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Cont. Programming in eeprom in avrdude


HiI just wish to continue the question.Sure the eeprom can be programmed using -U
eeprom:w:<yourfilename> option. but the file needs to be intel
hex file or motorola M file.To generate intel hex file the 1-byte checksum needs to be generated
after each line. This is the cause of all trouble. If I do generate a
hex file then even a minor change to it requires a lot of calculator
work. Does someone have a program which takesin hex values and can
generate hex files in easier(direct) way.ThanksTo learn how to generate intel hex download download intel hex file specification fromatmel.com_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#2 Oct. 27, 2005 17:18:43

Eric W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Cont. Programming in eeprom in avrdude


Sumeet Pal Singh wrote:Hi
I just wish to continue the question.Sure the eeprom can be programmed using -U eeprom:w:<yourfilename>option. but the file needs to be intel hex file or motorola M file.To generate intel hex file the 1-byte checksum needs to be generatedafter each line. This is the cause of all trouble. If I do generate ahex file then even a minor change to it requires a lot of calculatorwork. Does someone have a program which takesin hex values and cangenerate hex files in easier(direct) way.I haven't done this, but IIRC, in your code you can declare variablesthat are located in EEPROM, preassign them variables, and then using theWinAVR Makefile Template (or a makefile generated by MFile), the toolswill split off a separate hex file for the eeprom (which has the fileextension of .eep). You should then download this hex file to theeeprom. See the avr-libc user manual in the EEPROM Handling section onhow to declare an eeprom variable:<http://www.nongnu.org/avr-libc/user-manual/group__avr__eeprom.html>

Somebody let me know if I've missed something.

Eric


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

Offline

#3 Oct. 27, 2005 17:35:08

Andy W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Cont. Programming in eeprom in avrdude


Sumeet Pal Singh wrote:
>
> Hi
> I just wish to continue the question.
> Sure the eeprom can be programmed using -U eeprom:w:<yourfilename>
> option. but the file needs to be intel hex file or motorola M file.
> To generate intel hex file the 1-byte checksum needs to be generated
> after each line. This is the cause of all trouble. If I do generate a
> hex file then even a minor change to it requires a lot of calculator
> work. Does someone have a program which takesin hex values and can
> generate hex files in easier(direct) way.

There are plenty of automated tools to create intel hex or srecord
utilities (objcopy, SRecord utilities etc), but you can
also tell avrdude to read a binary ("raw") file:

-U eeprom:w:<filename>:r

Maybe one of these approaches would be simpler than hand
creating srecord or intel hex files.
--


Andy Warner Voice: (612) 801-8549 Fax: (208) 575-5634


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

Offline

#4 Oct. 27, 2005 17:52:02

Keith G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Cont. Programming in eeprom in avrdude


The easiest way to generate / manipulate hex files is with srec, which I
believe comes with WinAVR.

If you have a pure hex file and want to convert it to Intel Hex, you can
simply put an STX (0x02) character at the beginning of the file and read
it into srec_cat with the Ascii-Hex input format. (I use bvi to get the
STX character into the file.)

Keith

On Thu, 27 Oct 2005, Sumeet Pal Singh wrote:






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

Offline

#5 Oct. 27, 2005 18:33:39

Parthasaradhi N.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Cont. Programming in eeprom in avrdude


Hello Summet,
what data do you want to programme in the EEPROM?
strings or some constants. The easiest will be to use
a simple assembler (popular ones being that of 8051
controller). Create a source code with your data, if
strings db "xyz" etc. assemble and link. This process
will not take more than 10 seconds and if you have a
batch file things will be easier. The output hex file
is ready to go into your eeprom!!! HTH.

Nayani



--- Sumeet Pal Singh <> wrote:

> Hi
> I just wish to continue the question.
> Sure the eeprom can be programmed using -U
> eeprom:w:<yourfilename> option.
> but the file needs to be intel hex file or motorola
> M file.
> To generate intel hex file the 1-byte checksum needs
> to be generated after
> each line. This is the cause of all trouble. If I do
> generate a hex file
> then even a minor change to it requires a lot of
> calculator work. Does
> someone have a program which takesin hex values and
> can generate hex files
> in easier(direct) way.
> Thanks
>
> To learn how to generate intel hex download download
> intel hex file
> specification from atmel.com <http://atmel.com>
> > _______________________________________________
> AVR-GCC-list mailing list
> AVR-GCC-l***@*ongnu.org
>http://lists.nongnu.org/mailman/listinfo/avr-gcc-list>




__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.http://farechase.yahoo.com_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#6 Oct. 27, 2005 20:25:26

Joerg W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Cont. Programming in eeprom in avrdude


Sumeet Pal Singh <> wrote:

> Sure the eeprom can be programmed using -U eeprom:w:<yourfilename>
> option. but the file needs to be intel hex file or motorola M file.

Not at all. Please read the documentation, it can also be a plain
binary file, or values can even be given directly on the command-line.
However, both these options are restricted to start writing at address
0 as they don't carry any address information (unlike ihex or srec).

--
cheers, J"org .-.-. --... ...-- -.. . DL8DTLhttp://www.sax.de/~joerg/NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



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

Offline

#7 Oct. 27, 2005 20:51:09

Sumeet P.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Cont. Programming in eeprom in avrdude


hii wish to keep constants in the eeprom. Actually the data is for maze
solver robot. We wish to keep some prodefined data in eeprom. the
eeprom storage and reading during run time can be easily done, but
before hand some programming in quick time becomes difficult. Changing
certain values 10 minutes before match becomes problem.Eric could you elaborate on formation of .eep(if possible with an example). I believe this is what i want.thanksspsOn 10/27/05,Parthasaradhi Nayani<> wrote:Hello Summet,what data do you want to programme in the EEPROM?strings or some constants. The easiest will be to usea simple assembler (popular ones being that of 8051controller). Create a source code with your data, ifstrings db "xyz" etc. assemble and link. This processwill not take more than 10 seconds and if you have abatch file things will be easier. The output hex fileis ready to go into your eeprom!!! HTH.Nayani--- Sumeet Pal Singh <> wrote:> Hi> I just wish to continue the question.> Sure the eeprom can be programmed using -U> eeprom:w:<yourfilename> option.> but the file needs to be intel hex file or motorola> M file.> To generate intel hex file the 1-byte checksum needs> to be generated after> each line. This is the cause of all trouble. If I do> generate a hex file> then even a minor change to it requires a lot of> calculator work. Does> someone have a program which takesin hex values and> can generate hex files> in easier(direct) way.> Thanks>> To learn how to generate intel hex download download> intel hex file> specification fromatmel.com<http://atmel.com>> > _______________________________________________> AVR-GCC-list mailing list>AVR-GCC-l***@*ongnu.org>http://lists.nongnu.org/mailman/listinfo/avr-gcc-list>__________________________________Yahoo! FareChase: Search multiple travel sites in one click.http://farechase.yahoo.com_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

  • Root
  • » AVR-GCC
  • » [avr-gcc-list] Cont. Programming in eeprom in avrdude [RSS Feed]

Board footer

Moderator control

Enjoy the 20th of November
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support