Unable to program app - verification errors

14 views
Skip to first unread message

SteveS

unread,
Jun 21, 2011, 10:14:46 AM6/21/11
to avr-xboot
I'm running the latest version of AVR-XBoot and am having issues when
loading applications.

XBoot builds and loads fine; I'm building and flashing to an XMega32a4
using AVRStudio 5 via either an STK600 or a JTAGICE MkII. I have two
small apps that I'm using for testing, APP0 and APP1, that do nothing
but flash LED0 and LED1. To load these apps, I use AVRDude 5.10 from
Linux through the serial port. After erasing and flashing xboot, I can
successfully load APP0 into the application space - after rebooting
the xmega, I see xboot flash the led three times, then my app starts
flashing it's led. So far, so good.

I then reboot the xmega and try to load app1 - it goes through all the
motions, but fails at the verification. Using -vvvv, I can see that
AVRDude is sending over app1 bytes, but the verification bytes are the
bytes from app0. It appears that the erase cycle is not happening -
hence the failed verification. I've swapped out the xmega with the
same results. I've reloaded xboot using both the STK600 and the
JTAGICE - same results.

Any thoughts as to what else I could look for?

Thanks - any help would be appreciated!

Steve

Alex Forencich

unread,
Jun 21, 2011, 2:22:25 PM6/21/11
to avr-...@googlegroups.com
Steve-

Thanks for your interest in xboot!

This could be a bug in the latest version of xboot. There were some recent changes to the way erasing and rewriting are set up. I also have another report of a similar occurrence, so I am going to do some thorough debugging. One thing to try, though: an explicit chip erase with avrdude. See if that part is working. If not, I will try to get to the bottom of this issue asap.

Alex Forencich

> --
> You received this message because you are subscribed to the Google Groups "avr-xboot" group.
> To post to this group, send email to avr-...@googlegroups.com.
> To unsubscribe from this group, send email to avr-xboot+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/avr-xboot?hl=en.
>

Steve Soloski

unread,
Jun 21, 2011, 3:38:24 PM6/21/11
to avr-...@googlegroups.com
Alex,

Nice piece of software you wrote! It seems like it will do exactly what I was looking for, using the I2C bus to update my app code. The only downside is that pesky erase! ;)

I have tried explicit chip erases and then dumps with ARVDude in terminal mode, hooked up to both JTAGICE and STK600 - both worked as expected.

When I tried the erase using xboot - run the AVRDude command using -e instead of -U - and then dumping flash using the terminal mode via the STK600, it definitely did not erase the flash. I've spent the last couple of days trying different things; I'm 99% sure that the erase code of xboot just isn't happy.

Do you think an earlier version would be any better? I'm open to suggestions... or if you want me to try something for you, let me know.

Thanks for your quick reply! 

Steve

Steve Soloski

unread,
Jun 21, 2011, 4:22:53 PM6/21/11
to avr-...@googlegroups.com
Hey Alex,

For an update - I just downloaded and built the previous version of avr-xboot (20100529) and it works like a champ!

Just thought you would like to know...

Steve

Alex Forencich

unread,
Jun 21, 2011, 4:31:22 PM6/21/11
to avr-...@googlegroups.com
Great, I kinda figured the erase code update was the issue. Apparently
it wasn't thoroughly tested. I will get the bug worked out of the
current version as soon as I can, though.

Alex Forencich

> +unsub...@googlegroups.com.

Alex Forencich

unread,
Jun 21, 2011, 5:09:05 PM6/21/11
to avr-...@googlegroups.com
Found the bug in Atmel's sp_driver.S code. Didn't initialize the Z
pointer correctly. Fixed in latest version.

Alex Forencich

On Tue, 2011-06-21 at 16:22 -0400, Steve Soloski wrote:

> +unsub...@googlegroups.com.

Steve Soloski

unread,
Jun 21, 2011, 5:28:55 PM6/21/11
to avr-...@googlegroups.com
You are the man!

Thanks greatly - I'll try it out.

Steve

Steve Soloski

unread,
Jun 21, 2011, 5:46:10 PM6/21/11
to avr-...@googlegroups.com
Just rebuilt and tested it - works great!

Thanks again, Alex! 

Steve
Reply all
Reply to author
Forward
0 new messages