 |
| Author |
Message |
|
|
Posted: Jul 13, 2010 - 10:09 PM |
|

Joined: Mar 09, 2008
Posts: 24
Location: Praha, Czech Republic
|
|
I just got started with atxmega16a4 yesterday. While testing all the memory sections listed in avrdude's part command (and also it's manual) I got error for four of them, namely lock, prodsig, apptable, application sections. I have to say that other works fine, I can read and write program to flash without problems.
I found just one other person who mentioned it on avrdude mailing list but got no response: http://old.nabble.com/problem-erasing-f ... 20931.html You can see the avrdude table with memory section names (consistent across all xmegas in avdrude.conf), then the errors like mine:
Quote:
stk600_xprog_read_byte(): unknown memory "lock"
avr_read(): error reading address 0x0000
read operation not supported for memory "lock"
avrdude: failed to read all of lock memory, rc=-2
Note that other problems the guy has I don't have, just those four inaccessible section like in the reply at the bottom.
I mentioned in #avr at IRC to Dean and he said that memory space names which avrdude uses are wrong - it's not a programmer issue. I tried lockbits instead of lock as he said and indeed it worked, don't know about the other three. So it seems to be bug in avrdude but it's strange there's only one unasnwered complaint in half year or how long are xmegas supported so I want to check with others and continue the discussion here. |
_________________ jnd
ASM programmer
|
| |
|
|
|
|
|
Posted: Jul 14, 2010 - 05:18 AM |
|


Joined: Jan 23, 2004
Posts: 9832
Location: Trondheim, Norway
|
|
|
|
|
|
|
Posted: Jul 15, 2010 - 12:09 AM |
|

Joined: Mar 09, 2008
Posts: 24
Location: Praha, Czech Republic
|
|
I was preparing the bugreport so I checked again the lock vs lockbits and now I see I overlooked that lockbits also doesn't work. It looks like normal read but there's one more line which shows the error:
Quote:
avrdude -c avrisp2 -P usb -p x16a4 -U lockbits:r:/tmp/xtestl1.hex:i
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9441
"lockbits" memory type not defined for part "ATXMEGA16A4"
avrdude done. Thank you.
I looked at the linked avrdude source and quick search doesn't show any hits on prodsig, apptable or application even when it's in manual as official option. I guess not supported means it's not implemented. I'm sending the bugreport now. |
_________________ jnd
ASM programmer
|
| |
|
|
|
|
|
Posted: Aug 31, 2011 - 12:04 PM |
|

Joined: Feb 09, 2010
Posts: 5
Location: Stockholm, Sweden
|
|
After a year of "no fix" on this horizon I _think_ I have fixed it. Maybe someone else has already done this, but I checked the code on avrdude svn repo and didn't find it.
"The fix" is simply to replace the field "lock" in avrdude.conf to "lockbits" under the part x16a4 (row 5097). Maybe this is valid for other parts as well, but I currently only have an interest in x16a4.
I have tested this by:
1) Programming the device
2) Read out the device with data in
3) Set lockbits
4) Read out again with only zero data
/spe |
|
|
| |
|
|
|
|
|
|
|