where can i find more infos about the “arduino-builder.exe” in the install folder?

The shell help is not so helpful, a sample with includiing libs, boards ect. would be helpful.

Many thanks for helping.


There's a little bit more information here:

These are the first two examples I found:

Thx Pert!


now the "arduino-builder.exe" working fine with the AVRs, but ARM and other 3rd party board from the board manager doesn't work. All boards installed in the Arduino IDE and work in the IDE.

My demo string to build with the "arduino-builder.exe" is the following:

Dim arduinoHardwarePath1 As String = "C:\Users\myspace\AppData\Local\Arduino15\packages\arduino\hardware\sam" Dim arduinoToolsPath1 As String = "C:\Users\myspace\AppData\Local\Arduino15\packages\arduino\tools"

ArduinoVerifyUploadString = "-compile" & _ " -hardware " & Chr(34) & arduinoHardwarePath1 & Chr(34) & _ " -tools " & Chr(34) & arduinoToolsPath1 & Chr(34) & _ " -tools " & Chr(34) & arduinoToolsBuilderPath & Chr(34) & _ " -libraries " & Chr(34) & Path_ArduinoStandardLibrary & Chr(34) & _ " -libraries " & Chr(34) & Path_ArduinoCoreLibrary & Chr(34) & _ " -libraries " & Chr(34) & Path_Arduino15Local & Chr(34) & _ " -libraries " & Chr(34) & Path_Plugins & Chr(34) & _ " -fqbn " & "arduino:sam:arduino_due_x_dbg" & _ " -build-path " & Chr(34) & arduinBuildPath & Chr(34) & _ " " & Chr(34) & path & Chr(34) ' Ino file

The change between AVRs and board manager is the path from "arduinoHardwarePath1" and "arduinoToolsPath1" changed to the board manager folder.

The Arduino \hardware and \tools folder in the IDE is working with the AVRs.

Please help me :confused:

I found the solution in the arduino source :-)

File installedPackagesFolder = new File(BaseNoGui.getSettingsFolder(), "packages");

addPathFlagIfPathExists(cmd, "-hardware", BaseNoGui.getHardwareFolder()); addPathFlagIfPathExists(cmd, "-hardware", installedPackagesFolder); addPathFlagIfPathExists(cmd, "-hardware", BaseNoGui.getSketchbookHardwareFolder());

addPathFlagIfPathExists(cmd, "-tools", BaseNoGui.getContentFile("tools-builder")); addPathFlagIfPathExists(cmd, "-tools", Paths.get(BaseNoGui.getHardwarePath(), "tools", "avr").toFile()); addPathFlagIfPathExists(cmd, "-tools", installedPackagesFolder);

Now works :-)

Hi Ullis ,

i am Raj ,could you please help me i want to compile and upload my sktech through command line or using arduino builder ,u very much familiar in building.

rajeshkota: i am Raj ,could you please help me i want to compile and upload my sktech through command line or using arduino builder ,u very much familiar in building.

Read the documentation.

Arduino CLI:


Spend some time trying to do what you want to do. If you get stuck come back with specific questions. I would lean towards using Arduino IDE CLI if you want to upload as well as compile.

pert: Read the documentation.

Arduino CLI:


Sorry if I am slightly hi-jacking this.

I have been using the CLI for some time and I was not aware of arduino-builder until now. When I read the ReadMe about it I can't figure how -builder relates to the CLI.

Is -builder just an alternative to downloading and installing the IDE?


arduino-builder is the tool that the Arduino IDE uses for building sketches since 1.6.6 (it was the cause of all that breakage in automatic prototype generation we saw for a long time). In IDE 1.6.5-r5 and older IDE versions all the code for finding includes, generating prototypes, adding the #include <Arduino.h>, adding #line and #file preprocessor directives, compiling, etc. was all mashed into the the IDE code. Arduino decided to break that all out into a separate tool written in golang to make it into a self contained tool that can be used by the IDE but also other applications. This has been very useful for the Arduino Web Editor. Without breaking that code out into arduino-builder it all would have had to be duplicated in the web editor and it’s actually surprisingly complex. I haven’t found a use for it on its own myself. It seems that you can do pretty much everything via the Arduino IDE CLI that you can do via arduino-builder (which makes sense because the IDE is using arduino-builder) and more (install boards via Boards Manager, install libraries via Library Manager, upload) but I’m sure it’s useful for 3rd party application developers. I was considering using it for Travis CI test builds but I needed to install boards via Boards Manager so I’m using the IDE even for that purpose.

Thanks @pert. Very helpful.