[Tutorial + Demo] Setup configurations for debugging Arduino Zero with Eclipse

This post might be useful for others, it explains the method I use for debugging Arduino boards with Eclipse on Mac OS X. The build and upload process is used from the Arduino IDE (arduino-builder).

Arduino IDE is simple to use, and this was I think one of the key design goals for this software. Eclipse IDE has more features available like: file explorer with library management, click on a variable to see how it's declared, split windows…

Demo video:
Youtube demo

Pre Requisites

Setup configurations

  1. Download example project and place it in the root of /Users/{{Username}}/
    The configuration files are in blinkdebugzero/.cproject. This is a hidden file and the build paths are set to the directory /Users/{{Username}}/

  2. Import example GitHub project in Eclipse. The build and upload targets are configured for using “blinkdebugzero” as project name and most paths are linked to ${HOME}/Library/Arduino15/
    https://github.com/chrise96/Arduino-Zero-Debug-Eclipse

  1. The *.ino file can be opened using:

  2. Build the project

  3. Configure Eclipse debug options


Add "openocdpath" in the variables tab (you must use your username, no ~/):
/Users/{{username}}/Library/Arduino15/packages/arduino/tools/openocd/0.9.0-arduino6-static

OpenOCD setup:
${openocdpath}/bin/openocd

-s ${openocdpath}/share/openocd/scripts -f /${openocdpath}/share/openocd/scripts/board/arduino_zero.cfg

GDB client setup:
/Users/{{username}}/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-gdb

Arrowmax

Detailed Tutorial! Thank You :slight_smile: