user50336: I am working on a web app to program some nodeMCU devices that were flashed with the arduinoOTA library.
http://esp8266.github.io/Arduino/versions/2.0.0/doc/ota_updates/ota_updates.html
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?

user39978: 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

50336: <p>I am working on a web app to program some nodeMCU devices that were flashed with the arduinoOTA library.</p>

<p><a href="http://esp8266.github.io/Arduino/versions/2.0.0/doc/ota_updates/ota_updates.html" rel="nofollow noreferrer">http://esp8266.github.io/Arduino/versions/2.0.0/doc/ota_updates/ota_updates.html</a></p>

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

<p>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?</p>
 39978: <p>Just have a look here <a href="https://github.com/arduino/Arduino/wiki/Build-Process" rel="nofollow noreferrer">https://github.com/arduino/Arduino/wiki/Build-Process</a> to understand the process.</p>

<p>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: <a href="https://packages.debian.org/stretch/gcc-avr" rel="nofollow noreferrer">https://packages.debian.org/stretch/gcc-avr</a></p>

<p>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.</p>

<p>Hope this help</p>
