avr-chat
[Top][All Lists]
Advanced

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

RE: [avr-chat] programmer writes BootLoader as ihex file at wrongflash a


From: Eric Weddington
Subject: RE: [avr-chat] programmer writes BootLoader as ihex file at wrongflash address
Date: Mon, 12 Mar 2007 06:18:26 -0600

Hi Thomas,

You mentioned the possibility of an error in th hex file. Is there any way
you could post and attach your hex file?

If you are uncomfortable doing that, would you be willing to email it to me
privately?

Thanks
Eric Weddington 

> -----Original Message-----
> From: address@hidden 
> [mailto:address@hidden
>  On Behalf Of Thomas Richter
> Sent: Monday, March 12, 2007 3:10 AM
> To: avr-chat
> Subject: Re: [avr-chat] programmer writes BootLoader as ihex 
> file at wrongflash address
> 
> Also after upgrading AVRStudio to version 4.13 Build 528 the 
> error could 
> not be solved.
> :(
> 
> Thomas Richter schrieb:
> > Hi,
> >
> > I will write a Boot Loader for the ATmega2561. To create it I use 
> > avr-gcc version 4.1.1 (taken from WinAVR installation 
> version 20070122).
> > The linker creates an *.elf file (executable and linking 
> format file). 
> > I have used the start address 0x3E000. The BootLoader Flash 
> Section is 
> > 4096 words wide.
> >
> > To create the intel hex file I use avr-objcopy (BFD header file 
> > version 2.17 + coff-avr-patch (20050630)) also out from WinAVR 
> > installation. The resulting Intel Hex file starts with
> >    :020000023000CC
> >    :10E000000D9466F00D9483F00D9483F00D9483F0DD
> >    :10E010000D9483F00D9483F00D9483F00D9483F0B0
> > and ends with
> >    :10EAC0000052656164790A0057726F6E67206F703B
> >    :10EAD00074696F6E2E200A006E6577502E00646F89
> >    :0AEAE0006E652E00656E642E0000C6
> >    :040000033000E000E9
> >    :00000001FF
> >
> > To program the intel hex file into flash I use AVR Studio Version 
> > 4.12, Service Pack 4, Build 498.
> >
> > I do not understand why the programmer writes the BootLoader not to 
> > the correct flash address. If I read out the complete flash 
> with AVR 
> > Studio then the BootLoader is placed at 0x1E000 and not a 0x3E000.
> > Why AVR Studio programs the BootLoader file at wrong address?
> > Is there an error in the Intel Hex file?
> > Is AVR Studio the problem? Should I use another tools?
> >
> > Thanks for any help.
> >
> > Thomas
> >
> > PS: Here is the command line output of compiling and linking my 
> > BootLoader with a Makefile:
> >
> > P:\>make
> >
> > -------- begin --------
> > avr-gcc (GCC) 4.1.1 (WinAVR 20070122)
> > Copyright (C) 2006 Free Software Foundation, Inc.
> > This is free software; see the source for copying 
> conditions.  There 
> > is NO
> > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
> > PURPOSE.
> >
> > Compiling: BootLoader.c
> > q:/bin/avr-gcc -c -mmcu=atmega2561 -I. -gstabs -DBOOTSIZE=4096 
> > -DF_CPU=14745600UL  -Os -funsigned-char -funsigned-bitfields 
> > -fpack-struct -fshort-enums -Wall -Wstrict-prototypes 
> > -Wa,-adhlns=BootLoader.lst   -MD -MP -MF .dep/BootLoader.o.d 
> > BootLoader.c -o BootLoader.o
> >
> > Compiling: uart.c
> > q:/bin/avr-gcc -c -mmcu=atmega2561 -I. -gstabs -DBOOTSIZE=4096 
> > -DF_CPU=14745600UL  -Os -funsigned-char -funsigned-bitfields 
> > -fpack-struct -fshort-enums -Wall -Wstrict-prototypes 
> > -Wa,-adhlns=uart.lst -MD -MP -MF .dep/uart.o.d uart.c -o uart.o
> >
> > Compiling: memory.c
> > q:/bin/avr-gcc -c -mmcu=atmega2561 -I. -gstabs -DBOOTSIZE=4096 
> > -DF_CPU=14745600UL  -Os -funsigned-char -funsigned-bitfields 
> > -fpack-struct -fshort-enums -Wall -Wstrict-prototypes 
> > -Wa,-adhlns=memory.lst   -MD -MP -MF .dep/memory.o.d 
> memory.c -o memory.o
> >
> > Linking: BootLoader.elf
> > q:/bin/avr-gcc -mmcu=atmega2561 -I. -gstabs -DBOOTSIZE=4096 
> > -DF_CPU=14745600UL  -Os -funsigned-char
> > -funsigned-bitfields -fpack-struct -fshort-enums -Wall 
> > -Wstrict-prototypes -Wa,-adhlns=BootLoader.o   -MD -MP -MF 
> > .dep/BootLoader.elf.d BootLoader.o uart.o memory.o  --output 
> > BootLoader.elf -Wl,-Map=BootLoader.map,--cref    -lm 
> > -Wl,--section-start=.text=0x3E000
> >
> > Creating load file for Flash: BootLoader.hex
> > q:/bin/avr-objcopy -O ihex -R .eeprom BootLoader.elf BootLoader.hex
> >
> > Creating Extended Listing: BootLoader.lss
> > q:/bin/avr-objdump -h -S BootLoader.elf > BootLoader.lss
> >
> > Creating Symbol Table: BootLoader.sym
> > q:/bin/avr-nm -n BootLoader.elf > BootLoader.sym
> >
> > Size after:
> > BootLoader.elf  :
> > section      size       addr
> > .data       0x18a   0x800200
> > .text       0x960    0x3e000
> > .bss        0x102   0x80038a
> > .stab      0x195c        0x0
> > .stabstr    0xfcb        0x0
> > Total      0x3513
> >
> > Errors: none
> > -------- end --------
> >
> >
> >
> >
> > _______________________________________________
> > AVR-chat mailing list
> > address@hidden
> > http://lists.nongnu.org/mailman/listinfo/avr-chat
> >
> >
> >
> 
> 
> 
> _______________________________________________
> AVR-chat mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/avr-chat
> 





reply via email to

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