Hello All,
Has anyone successfully been able to debug (ie
set through code etc) an application when it has been jumped to forma boot
loader?
I have AVRstudio V4.11 SP3 using WInXP SP2 and
ICCAVR V7 Compiler
I have a working Bootloader (BL) that I can debug
the BL using AVRSTUDIO and JTAGICEII no problem.
I have a working App that I can debug the App
using AVRSTUDIO and JTAGICEII no problem
I cannot debug the app when the BL is also
programmed into the device.
I cannot debug the application WHILE the
bootloader section is programmed at the same time.
It seems that AVR studio (or the JTAGICE) is
erasing the device (and hence the Bootloader) as it downloads the app and sets
it up for debug mode.
I have tried -
1. Using 'Tools/Program AVR') I have erased
the device then (with 'Erase Device before
programming' option off) I have programmed the BL and programmed the BOOTRST bit
so that the BL starts (and it does)
2. Using AVRStudio and JtagICE II I load the
working App to try to debug why it is hanging after it is 'jumped to' from the
BL
When the APP is downloaded I cannot even step
into the app (ie. I can't run the app at all!)
I think what is happening is that the JTAG resets
the micro and the BOOTRST bit makes the micro start running code is
but when I disassemble the code at F000 (*word
address) it is filled with FFFF s
So it looks to me like the BL has been erased by
the JTAG when it downloaded the app.
So my question is
1. Generally, how does onr debug an application
when there is a BL programmed?
2. Specifically, how can I tell the JTAGICE to
not erase the flash before it downloads new code?
BTW: The REASON I need to have this setup is that
the app does not run correctly when is lives with the BL and the reset vector is
in the BLS.
Actually - the BL does jump to the app ok and I
see the app print stuff to the UART but is locks-up soon after that
I suspect that it is something to do with where
the Interrupt vectors are being located (I think I am moving them from the
BLS to 0000 when I leave the BL correctly) but I cannot see what is happening to
be certain.
Any advice would be greatly appreciated,
Kind Regards
Ivan Vernot
Ivan Vernot