Is it possible to single step an ATtiny44A? Or is this debug mode missing from the ATtiny?
I can't get Atmel Studio to do it.
Is it possible to single step an ATtiny44A? Or is this debug mode missing from the ATtiny?
I can't get Atmel Studio to do it.
Are you talking single-step as in F10 or F11? Are they grayed on the Debug menu?
What debugger h/w are you using?
Jim
I think I found out how to do. I must get a Atmel-ICE debugger (for example). It can communicate with the ATtiny using DebugWire (serial communication through the RESET-pin). That way it is possible to use breakpoints and singe step and look at memory.
I must get a Atmel-ICE debugger (for example).
https://github.com/dcwbrown/dwire-debug#target-device-support
...
ATtiny44
...
more :
Oops ... dwire-debug is similar to AVR GDB so it's not integrated into Atmel Studio; therefore, your idea holds.
Edit: Oops
The old fashioned way (40 years ago) would be to write a monitor program.
Then use some interrupt to put that monitor program in. (An external level triggered interupt would be convenient).
The monitor program then sets the interrupt flag before it exits, and it gets called again after the uC executed 1 asm instruction.
It can then examine the stack, ram, programcounter, registers etc to deterimine if it wants to execute another instruction from the program, or call the boss (= you).
I do not know if anyone ever bothered to write such a monitor program for the AVR.
I do not know if anyone ever bothered to write such a monitor program for the AVR.
I think Kanda did make something like that a long time ago.
The old fashioned way (40 years ago) would be to write a monitor program.
http://microchipdeveloper.com/hwtools:debug-executive
...
Its job is to run commands sent by the PC and to control the debug process. [after a breakpoint or data from PC]
...
The debug executive requires a small amount of code space, a few registers in data memory and one or two levels of stack.
[PGC and PGD in lieu of a USART]
...