[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avrdude-dev] [bug #28744] Can't load bootloader to xmega128a1
From: |
giuliano carlini |
Subject: |
[avrdude-dev] [bug #28744] Can't load bootloader to xmega128a1 |
Date: |
Wed, 27 Jan 2010 07:43:56 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 |
URL:
<http://savannah.nongnu.org/bugs/?28744>
Summary: Can't load bootloader to xmega128a1
Project: AVR Downloader/UploaDEr
Submitted by: gorillacoder
Submitted on: Wed 27 Jan 2010 07:43:56 AM GMT
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Name: giuliano carlini
Originator Email:
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
I'm using the lates AVR CrossPack as the basis of my toolchain. I've replaced
avrdude 5.8 with avrdude 5.10 that I built myself. I had to patch avrdude to
correctly use libusb.
I'm using avr-gcc 4.3.3 to compile test.c to test.o
avr-gcc -g -Wall -O2 -mmcu=atxmega128a1 -DF_CPU=32000000L -c -o test.o test.c
I'm using avr-ld 2.19 to link test.o into test.elf placing the text section
at 0x20000, or 128K, the start of the xmega128a1's bootstrap section.
avr-gcc -g -Wall -O2 -mmcu=atxmega128a1
-DF_CPU=32000000L -Wl,--section-start=.text=0x20000 -o test.elf test.o
I'm using avr-objcopy 2.19 to convert test.elf into
test.hex (Intel format) and test.srec (Motorola format).
avr-objcopy -j .text -j .data -O ihex test.elf test.hex
avr-objcopy -j .text -j .data -O srec test.elf test.srec
So, I then try to use avrdude 5.10 to burn my bootloader, but get a
verification error. Doubt it matters, but I'm using an avr dragon as my
programmer.
avrdude -c dragon_jtag -e -P usb -p atxmega128a1 -U boot:w:test.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e974c
avrdude: erasing chip
avrdude: reading input file "test.hex"
avrdude: input file test2.hex auto detected as Intel Hex
avrdude: ERROR: address 0x20010 out of range at line 2 of test.hex
avrdude: write to file 'test.hex' failed
avrdude done. Thank you.
So I tried to link at address 0.
avrdude -c dragon_jtag -e -P usb -p atxmega128a1 -U boot:w:test.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e974c
avrdude: erasing chip
avrdude: reading input file "test.hex"
avrdude: input file test.hex auto detected as Intel Hex
avrdude: writing boot (636 bytes):
Writing | ################################################## | 100% 0.18s
avrdude: 636 bytes of boot written
avrdude: verifying boot memory against test.hex:
avrdude: load data boot data from input file test.hex:
avrdude: input file test.hex auto detected as Intel Hex
avrdude: input file test.hex contains 636 bytes
avrdude: reading on-chip boot data:
Reading | ################################################## | 100% 0.13s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0x0c != 0xff
avrdude: verification error; content mismatch
avrdude done. Thank you.
Then I tried the same use "flash" rather than "boot" at both address 0 and
2000. At address 2000:
avrdude -c dragon_jtag -e -P usb -p atxmega128a1 -U flash:w:test.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e974c
avrdude: erasing chip
avrdude: reading input file "test.hex"
avrdude: input file test.hex auto detected as Intel Hex
avrdude: writing flash (131708 bytes):
Writing | ################################################## | 100% 33.72s
avrdude: 131708 bytes of flash written
avrdude: verifying flash memory against test.hex:
avrdude: load data flash data from input file test.hex:
avrdude: input file test.hex auto detected as Intel Hex
avrdude: input file test.hex contains 131708 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 26.68s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x20000
0x0d != 0xff
avrdude: verification error; content mismatch
avrdude done. Thank you.
At address 0 and application section it burns fine, but at address 0 in the
application section, and I need it at 0x2000 in the bootloader section.
I retried all of the above using srecs with the same results.
I've attached test.c; test0.hex, loaded at address 0; and test2.hex, loaded
at address 0x20000.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Wed 27 Jan 2010 07:43:56 AM GMT Name: test.c Size: 318B By:
gorillacoder
<http://savannah.nongnu.org/bugs/download.php?file_id=19553>
-------------------------------------------------------
Date: Wed 27 Jan 2010 07:43:56 AM GMT Name: test0.hex Size: 2kB By:
gorillacoder
<http://savannah.nongnu.org/bugs/download.php?file_id=19554>
-------------------------------------------------------
Date: Wed 27 Jan 2010 07:43:56 AM GMT Name: test2.hex Size: 2kB By:
gorillacoder
<http://savannah.nongnu.org/bugs/download.php?file_id=19555>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?28744>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [avrdude-dev] [bug #28744] Can't load bootloader to xmega128a1,
giuliano carlini <=