Skip to content

Using Eclipse for Arduino development

Terje Io edited this page May 9, 2021 · 3 revisions

It is possible to use the Eclipse editor to develop code for Arduino targeted drivers. This is a walktrough of howto for Windows and the iMRX1062 driver for Teensy 4.x.

The same process can be used for the Due and MKRZERO, Eclipse project folder names for these are Driver SAM3X8E and Driver SAMD21 respectively.

Download and install Eclipse IDE for C/C++ Developers.

Download and install Link Shell Extension.

Clone or download and unzip the relevant grblHAL driver source to a folder somewhere of your choice.

Create a folder for your Eclipse workspace.

Create a folder in the Eclipse workspace folder and name it Driver Teensy4.

  1. Drag and drop with right mouse button from the grblHAL source folder to the Driver Teensy4 folder just created and select Drop here... > Symbolic link from the menu:
  • all files in the IMXRT1062\grblHAL_Teensy4\src folder. Do not drag and drop any folders!
  1. Start Eclipse and select the workspace folder you created above.
  • import the Driver Teensy4 project with File > Open Projects from File System....
  • right click on the newly imported Driver Teensy4 project and select Properties from the menu then Resource > Linked Resources in the Properties dialog.
  • correct path variables that does not match your environment and press Apply and Close
  • right click on the Driver Teensy4 project and select Index > Rebuild. Note that sometimes when changing the configuration it may be necessary to repeat this.

If this went well the Eclipse editor can now be used and you can enjoy syntax coloring, code not compiled in the current configuration with grey background, tooltips, autocomplete and other goodies.

  1. I still use the Arduino IDE for compilation and upload, we have to trick it to use the source files from the grblHAL source like we did for Eclipse:
  • open your Arduino library folder, found in My Documents > Arduino libraries.
  • copy the IMXRT1062\grblHAL_Teensy4 folder from the grbl sources to the library folder.
  • delete the contents of the library\grblHAL_Teensy4\src folder.

Then drag and drop in the same way you did to the Eclipse Driver Teensy4 project folder:

  • all files in the IMXRT1062\grblHAL_Teensy4\src folder except files starting with .. Do not drag and drop any folders!
  • the grbl folder.
  • all plugin folders listed in the IMXRT1062\grblHAL_Teensy4\src folder from the plugins folder.
  1. Start the Arduino IDE and open the grblHAL library for Teensy 4 from the Arduino Examples menu, select the correct board and upload.

  2. If you cloned grblHAL it is now possible to push from the grblHAL folder as all file changes is still stored there.


2021-05-09