I am working on a web app to program some nodeMCU devices that were flashed with the arduinoOTA library.


I tried the example and the OTA upload of the binary file compiled from Arduino IDE works.

Let's say my web app will allow user to code in Sketch, is there any open source server side or client side compiler that can compile the Sketch code into the bin file?

  • turn on verbose console output in Arduino IDE and you will see all the executed commands to compile and link. the builder is external and it is Open Source – Juraj Oct 15 '18 at 7:31
  • see for example Sloeber, the Arduino Eclipse plugin, how it uses Arduino toolchain and core packages without Arduino IDE – Juraj Oct 15 '18 at 8:23
  • @Juraj Please write this as an answer or give URL for a tutorial, etc. that already exists on the web, if you know of one. – MichaelT Oct 15 '18 at 10:00
  • 1
    The AVC GCC is used and is open source gcc.gnu.org – CrossRoads Oct 15 '18 at 13:18

Arduino IDE runs external tools to create the hex or bin file. First the ino files of a project are processed by arduino builder to cpp file. Then the arduino builder invokes the toolchain of the MCU architecture - compiler and linker. For example AVR tools for 328p or 2560; ARM toolchain from SAMD; xtensa tools for Espressif chips.

New is Arduino CLI, which focuses on using Arduino with command line.

Tha Arduino builder, Arduino CLI and esp8266 Arduino core are Open Source. Extensa tools and Espressif SDK are not open source, but are free.


Try PlatformIO: https://platformio.org

Opensource and cross platform.

  • Great answer to some other question :) – Mikael Patel Apr 15 at 13:37

Just have a look here https://github.com/arduino/Arduino/wiki/Build-Process to understand the process.

In fact Arduino code is not "C or C++" at 100%. You can't compile directy as some informations are missing. This is why when you "compile" with the IDE, it copies the files in a temp folder, add some lines at beginning of theses files and then call the basic and well known avr-gcc. If you have a dedicated server you just have to search for the avr-gcc package according to the OS. Eg, for Debian: https://packages.debian.org/stretch/gcc-avr

Then or you send directly the code avr-gcc is waitng for, or you apply on the code the same changes the IDE is doing before sending the code to GCC.

Hope this help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.