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
- Install SAMD boards package 1.6.15 from the Arduino IDE (Eclipse config file is configured for this version)
- Download Eclipse Neon3 C++
- Install GNU ARM OpenOCD debugging inside Eclipse IDE. Eclipse->Help->Install new software...
Download ilg.gnuarmeclipse.repository-3.4.1-201704251808.zip (DEPRECATED > GNU ARM Eclipse)
Setup configurations
-
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}}/ -
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
-
The *.ino file can be opened using:
-
Build the project
-
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