Single step debug an ATtiny44A? Is it possible?

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are you talking single-step as in F10 or F11?  Are they grayed on the Debug menu?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What debugger h/w are you using?

 

Jim

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MASIP wrote:
I must get a Atmel-ICE debugger (for example).
an alternate is dwire-debug.

https://github.com/dcwbrown/dwire-debug#target-device-support

...

ATtiny44

...

more :

debugWIRE via USB UART

 

Oops ... dwire-debug is similar to AVR GDB so it's not integrated into Atmel Studio; therefore, your idea holds.

 

Edit: Oops

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Thu. Oct 25, 2018 - 09:33 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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.

 

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Paulvdh wrote:
The old fashioned way (40 years ago) would be to write a monitor program.
A monitor's sub-set may be MPLAB Debug Executive (PIC, PIC24, dsPIC)

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]

...

 

"Dare to be naïve." - Buckminster Fuller