[Top][All Lists]

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

Re: [avr-chat] Strange struct problem

From: Daniel O'Connor
Subject: Re: [avr-chat] Strange struct problem
Date: Fri, 9 Dec 2005 16:35:13 +1030
User-agent: KMail/1.8.2

On Fri, 9 Dec 2005 16:07, Ian Caddy wrote:
> Your problem is that you need to also include your initialised data
> section in your hex file.  The initialised data will be copied to your
> data section by the startup code, but only if you include it in your hex
> file which you are not.
>  > avr-objcopy -j .text -O ihex testcase.elf testcase.hex
> You are only including the .text section.
> Because of this, the initilised data section is empty (0xFF) and these
> values are copied to the data section on startup.


>  > avr-objcopy -O ihex testcase.elf testcase.hex
> should work for you as it will copy the sections that it thinks it
> should rather than you telling it to just use the .text section with the
> -j field.
> I hope this helps,

Ahah! Thanks!
Actually I had to do "-j .text -j .data -j .bss" and it worked otherwise 
avrdude complained about addresses being out of range.

*does the happy dance*

Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C

Attachment: pgpTlWAxMInxL.pgp
Description: PGP signature

reply via email to

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