Arduino is world wide platform for pretty handy embedded programming. Usually Arduino IDE is enough for your small weekend projects but sometimes you may need to tackle with a rather big project such as open source Arduino project like Marlin, which is one of most typical 3D printer firmwares.
Thankfully Atmel provides with native on board debugger for Arduino boards with Atmel Studio 7. Here is how.
- What you need
- Arduino Mega
- Windows PC with Atmel Studio 7
- AS is currently only for Windows
- Atmel ICE or some compatible debuggers
- Breakout board for JTAG interface
- How to connect them all
- Software Settings on Atmel Studio
- Run Atmel Studio 7.
- Connect Arduino Mega and Atmel ICE via ICSP and PC via USB.
- Go to Tools>Device programming and open Fuses tab.
- See if JTAGEN and OCDEN is marked and if no enable them and flash the fuse settings. Ignore the meaningless warnings if any.
- Connect Atmel ICE and Arduino Mega board via JTAG. Now you’re ready for neat and smooth debugging!