Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Debugging Bootloaders

2007-07-09 by Dave Hylands

Hi Dave,

On 7/9/07, Dave VanHorn <microbrix@gmail.com> wrote:
>
> Anyone have tips/experience to share on debugging bootloaders with the
> Jtag ice on a M128?

I don't use a JTAG. I tend to prefer using print statements and a
serial port. This comes from working with RTOSes (admittedly mostly on
non-AVRs) and I find that debugging realtime stuff with a JTAG just
doesn't work very well.

What I do is log to a circular buffer and have the main loop just read
from the buffer and print stuff. That way I can print from an ISR and
reduce the amount of delays.

I also usually try to write the bootloader as a standalone app and get
the basics of the algorithim working that way before trying to get it
to work as a bootloader proper. So I like to get the protocol working
and stub out the flash routines with code that just prints that a
flash write was called.

For many things, like the xmodem protocol that you mentioned in
another email, you can debug your version of the code on a PC as well.

-- 
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.