Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
jnd-cz
PostPosted: Jul 13, 2010 - 10:09 PM
Rookie


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
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
abcminiuser
PostPosted: Jul 14, 2010 - 05:18 AM
Moderator


Joined: Jan 23, 2004
Posts: 9832
Location: Trondheim, Norway

I got the memory section names from the source code here:

http://avrdude.sourcearchive.com/docume ... ource.html

Look at the stk600_xprog_read_byte() routine and you can see the different memory section names. If the avrdude documentation is incorrect and lists different names for those memory sections, you should fill out a bug report at:

http://savannah.nongnu.org/bugs/?func=a ... up=avrdude

- Dean Twisted Evil

_________________
Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
jnd-cz
PostPosted: Jul 15, 2010 - 12:09 AM
Rookie


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
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
spespe
PostPosted: Aug 31, 2011 - 12:04 PM
Newbie


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
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits