Chances are if you're programming firmware on a microcontroller you've had to do some 'fun' debugging. Button presses, interrupts, small memory spaces...it can make debugging quite a challenge! A lot of beginners lean on tried-and-true (if a little frustrating) printf statments or toggling GPIO's with LEDs on them. And don't get me wrong, those techniques work pretty well. But if you come from a software background you're probably used to really nice debugging setups, often built into the IDE

Of course its a ton easier to debug software when the computer is running both software and development platform. It's a lot tougher when the processor is physically separated, with its own memory, clocks, peripherals, and its not even of the same processor family!

No worries though, there's a full industry set up to create programming/debug dongles and adapters! One of our favorites is SEGGER's J-Link family. They're not cheap but they do support a vast number of chips.

Atmel also has it's own debugger chip, the EDBG (apparently its a AT32UC3A4256 programmed with Atmels proprietary firmware)

This chip comes on every Arduino Zero and is used to both program and debug firmware

You may be wondering "OK so how do I actually do said debugging?" Well you've come to the right place because we're gonna show you how. In this guide we'll show how to debug the ATSAMD21 family (specifically the ATSAMD21G18) which is in the Arduino Zero and Feather M0 family, by using the EDBG or J-Link.

This guide was first published on Feb 25, 2016. It was last updated on Mar 08, 2024.

This page (Overview) was last updated on Feb 25, 2016.

Text editor powered by tinymce.