The featured picture of this post has been created by DALL-E.
Microchip recently lowered the price for its hardware debugger SNAP from more than €50 to less than €20. I have recently created the Python script dw-gdbserver for this and other hardware debuggers so that you can now use SNAP in the Arduino IDE 2 to debug classic ATtinys and small ATmegas. All in all, this is an affordable and care-free debugging solution for classic AVRs.
You can currently get the Microchip SNAP hardware debugger for less than €20 from distributors such as DigiKey, Mouser, TME, or RS Components. Unfortunately, none of them seem to have any in stock these days (beginning of 2025). I seem to have gotten one of the last ones. However, the shops are all restocking.

The SNAP looks like a great deal, but some work is necessary before you can use it to debug classic AVR chips. You need to switch it to AVR mode, maybe make some hardware mods, find a way to connect it to your target chips, and install some debugging software. But this should not stop you from using the SNAP. It is all straightforward.
Switch to ‘AVR’ mode
First, you have to switch SNAP to AVR mode. Unfortunately, this is not covered in the SNAP manual, and searching the Internet gives you plenty of hints, but it all looks very muddled. The suggestions are to use old versions of Microchip’s IDE and perhaps Microchip Studio (formerly Atmel Studio) to change or downgrade the firmware. If you are not interested in using the Microchip software, it is actually a bit easier.
The current version of avrdude (since Version 7.3) is very well-prepared to perform the switch to AVR mode, provided a recent firmware version is installed on the SNAP. Just type the following into a terminal window:
> avrdude -c snap_isp -Pusb -xmode=avr
This will hopefully lead to
Error: MPLAB SNAP in PIC mode detected switching to AVR mode;
run avrdude again to continue the session
Thereafter, the SNAP is prepared to speak with avrdude and dw-gdbserver. If you type in the same line again, You should get the response:
Warning: programmer is already in AVR mode, ignoring -x mode
...
Using a program to list all connected USB devices (e.g., lsusb
), you should now find a device under the VID/PID 0x03EB/0x2180 that contains the string “CMSIS-DAP” in its description.
By the way, the same trick can bring a PICkit4 debugger into AVR mode. However, instead of snap_isp
, you have to specify pickit4_isp
.
If you were unsuccessful, the reason is probably that the firmware on the SNAP or PICkit4 is from ancient times. In this case, you must upload a more recent Microchip firmware to the SNAP or PICkit4, as described in the appendix. After that, you can try to switch to AVR mode again.
Adapting the hardware
Some small hardware modifications may be necessary. If you own a Revision 1 board, remove the pull-down resistor R48 on the data line and solder a pull-up resistor instead. This is described in detail in the Engineering Technical Note #36. The new Revision 2 board has a jumper that can accomplish that. So, you only have to set the jumper to the AVR position.
Note that by setting the jumper to the AVR position or by resoldering the resistors, you do not switch into AVR mode! This can only be done by the firmware modifications described above.
Hardware adapters
You may have noticed that the connector to the board is a female SIL-8 one, which does not align well with the 2×3 ISP connector usually used on AVR target boards. Of course, you could buy the AVR Programming Adapter AC31S18A for roughly €25, but this seems a bit over the top. At OSH, you can order three PICKIT4-adaptorISP PCBs for less than €3 (including postage). Note that customs and handling charges have to be paid as well, and it will take 3 weeks for the boards to arrive in Germany.

An alternative is an adapter board, which you can buy at eBay for less than €10. In addition, a few SMD parts have to be soldered, however.
Software
The most crucial thing for a hardware debugger is the software that enables it to talk to the symbolic debugger on your host computer. Microchip offers MPLAB X and Microchip Studio, which I could not get the hang of. Then, there are the open-source GDB server implementations Bloom and AVaRICE, which cater mainly to Linux users. However, there is no platform-agnostic solution that could be used, e.g., as a debugging solution in Arduino IDE 2 or PlatformIO.
Fortunately, though, Microchip has published the Python script pymcuprog, which provides a solid base for implementing a GDB server that can interact with SNAP, Pickit4, Atmel-ICE, Power Debugger, JTAGICE3, and all EDBG development boards. Based on this script, I have implemented dw-gdbserver, a GDB server for all debugWIRE MCUs. You can download the script from PyPI with pipx, or you can download a binary executable from the GitHub repo. If you only want to use the script inside the Arduino IDE 2, you have to install additional board manager URLs in the Preference
dialog:
https://felias-fogg.github.io/ATTinyCore/package_drazzy.com_ATTinyCore_index.json
https://mcudude.github.io/MiniCore/package_MCUdude_MiniCore_index.json
https://mcudude.github.io/MicroCore/package_MCUdude_MicroCore_index.json
After that, install the most recent versions of the respective cores, and you will be ready to debug all classic ATtinys and ATmegaX8 MCUs, provided they offer the debugWIRE interface.
Summary and outlook
The SNAP is a great deal when looking for an affordable hardware debugger. And now there is also a GDB server available that enables the Arduino IDE 2 to make use of it for all the debugWIRE MCUs. However, this is only a first step. JTAG and UPDI MCUs will be (hopefully) covered in the future.
All those of you who use my DIY hardware debugger dw-link can also use the dw-gdbserver script. In this case, the script passes all communication directly to the hardware debugger. And to make the communication with dw-link and the Microchip debuggers as similar as possible, I have adapted the interaction with dw-link.
Appendix: Installing a recent firmware version
To upgrade the SNAP (or PICkit4) with recent firmware, you first have to install the bootloader and then load the a recent firmware. The tool for doing so is the MPLAB X IDE. If you want to use SNAP with Microchip Studio, Internet Wisdom suggests downloading version 6.05 instead of the most recent one. In detail, you have to perform the following steps:
- Download and install the IDE. You only need to download the support for 8-bit devices, and we also do not have any use for the IPE. It is still roughly 1 GB.
- After starting the IDE, choose
Hardware Tool Emergency Boot Firmware Recovery
in theDebug
menu. Follow the instructions. This will restore the boot firmware. - Now create a new project (in the
File
menu), selectMicrochip embedded
andApplication project
. From the device list select aPIC12LF1840
, and select as a tool theSNAP
. Continuing, selectno debug header
,XC8
as the tool-chain, and set the project name to “test”. - Click now (a) the green triangle in the top row (run main project) and select SNAP as the tool, (b) make the
test-Dashboard
visible, and (c) finally click the circular green arrows. This will download the most recent firmware to the SNAP, and we are done!

Now, avrdude should be able to do the rest, as described above.
April 27, 2025 — 22:52
Thanks for sharing. Especially the firmware update section is helpful!