As a sideshow to the never ending debug thread of mine, I give you this:
My endeavors with AVaRICE and debugWire are a failure so far. Basically, AVaRICE reports it can not enter a debugWire session.
I'd like to test a hypothesis that AVaRICE does not program the DWEN fuse, but that it has to be programmed when one starts AVaRICE. I suppose I can do that..
As I understand it, when DWEN is programmed the AVR can no longer be programmed at all using ISP since the RESET pin now is disabled as such and instead working as a kind of I/O pin.
The big question then becomes: How is the DWEN fuse cleared (un-programmed)?
Obviously, it can be done since Studio does it. But how? Am I correct in speculating that there is some kind of "command" in the debugWire protocol that can do this? Where can I find any details on it? (I did a few searches in a ATmega88 data sheet but came out stumped.)
Obviously, I can do it by High-Voltage programming. And I suppose I can do it by switching over to Windows, run Studio, start a debugging session and end it properly. Both are tedious ways of re-enabling ISP. I'd like to investigate (before testing) if it might be that AVaRICE does it. Details on how it is done might help me looking through the sources.
Any insight most welcome!