This guide will help you to start debugging CircuitPython on the SAMD21 or SAMD51, using Windows 10 and Atmel Studio 7. Yes, it can be done. All that is needed is some jumping on one foot, while juggling chainsaws and singing System Of a Down's Chop Suey. Kidding. Mostly.
We'll discuss using the compiled CircuitPython firmware for Atmel Studio project creation and setup. Then we'll delve into setting and maintaining breakpoints, then displaying information from those breakpoints to diagnose problems (or just for "gee-whiz"). Finally we'll cover some tips and troubleshooting steps.
Understanding CircuitPython & Debugging
This process is somewhat technical, but not difficult. It does require some basis of knowledge with regards to how CircuitPython and debugging work. There are a few guides that will help give a more complete understanding of that basis of knowledge, if needed. I decided not to duplicate all of the information here, since it's explained so well already. The guides you may wish to refer to are:
- Welcome to CircuitPython!
- CircuitPython Essentials
-
Debugging the SAMD21 with GDB
(I never got OpenOCD to work with Windows 10, which led to this AS7 solution) -
Proper Debugging of ATSAMD21 Processors
(Arduino-based, but has loads of useful info)
This list is not all-inclusive, and there are a few others placed elsewhere in the guide.
Parts Used in this Guide
You will need one hardware debugger. The Segger J-Link Pro, Basic, EDU, and EDUmini are all compatible, you should choose to get a version according to Segger's license terms & budget, which is explained on the product page for each device.
Text editor powered by tinymce.