# Serial debugging of ATtiny using Arduino UNO as ISP

**URL:** <https://forum.arduino.cc/t/serial-debugging-of-attiny-using-arduino-uno-as-isp/1410261>\
**Category:** General Electronics\
**Created:** [October 22, 2025, 6:49pm UTC](https://forum.arduino.cc/t/serial-debugging-of-attiny-using-arduino-uno-as-isp/1410261 "2025-10-22T18:49:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kakemoms](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/kakemoms/32/1155205_2.png) [@kakemoms](https://forum.arduino.cc/u/kakemoms)\
**Post date:** [October 22, 2025, 6:49pm UTC](https://forum.arduino.cc/t/serial-debugging-of-attiny-using-arduino-uno-as-isp/1410261/1 "2025-10-22T18:49:39Z")

</div>

Hi!

I used some time to get this to work, so I thought I should share it with the community. There is a old ISP that is called TinyISP that replaces Arduino ISP and enables serial debugging of the ATtiny.

You can download it here:  
[TinyISP replacement](https://github.com/Coding-Badly/TinyISP)

To get debugging to work, you also need the this library:  
[TinyDebugKnockBang-library](https://github.com/Coding-Badly/TinyDebugKnockBang)

The problem is that this was made for an older Arduino version. I am currently running 2.3.5, so to get it to work you need to apply these fixes:

Insert “TinyDebugKnockBangClass\_AssemblyMacros();” in two places in TinyDebugKnockBang.cpp (use notepad or alike):

```arduino
bool TinyDebugKnockBangClass::knockHello(void) {
TinyDebugKnockBangClass_AssemblyMacros();
...
}

attribute((noinline))
void TinyDebugKnockBangClass::sendByte(uint8_t v) {
TinyDebugKnockBangClass_AssemblyMacros();  
...
}

```

And it should compile without errors. This can also be done for TinyISP by inserting the same line in “KnockBangReceiver.cpp“:  
`ISR(KBR_PCINT_VECT)`  
`{`  
`TinyDebugKnockBangClass_AssemblyMacros(); `  
`...`  
`asm volatile (`  
`/* uses DELAY_FINE, etc. */`

Recompile and upload and it should work. PS: You may want to set:  
`RELAY_KNOCK_BANG_USE_ALTERNATE_PIN = 0`

in the “\_TinyISP\_BuildOptions.h” file in TinyISP to make it use the same pin for debugging as programming (if not you need a 1kOhm resistor to D7). There are also serial commands to start/stop debugging (Entering “#” in serial monitor starts debugging):  
Other useful monitor keys (send while monitor is running):

- `!` — stop monitoring (return to programmer)

- `@` — toggle “hold in reset after programming”

- `#` — reset target and run

- `$` — hold target in reset

- `\` — print receiver debug/stats (see §4)

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [April 20, 2026, 6:49pm UTC](https://forum.arduino.cc/t/serial-debugging-of-attiny-using-arduino-uno-as-isp/1410261/2 "2026-04-20T18:49:42Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
