Visual Micro Arduino Command Line Interface

March 2017 - draft - beta

A new free CLI tool available shortly will be accompanied by an installer package.

In the meantime a beta is provided in zip format here.

The tool can compile standard arduino projects or visual studio projects.

When compilng a folder or .ino name, only the standard arduino project folder and project\src... folder structure is compiled.

When comping a visual studio project the project governs the files to be compiled (as expected for visual micro). Shared linked external source code, shared code projects and shared library projects are all supported (as normal).

All paramaters can optionally be enclosed with double quotes (speech marks). Paths that contain spaces and other special characters must be enclosed with double quotes!

Examples:

1. Build and upload a visual studio (visual micro) project.  Uses the first board that has a name or id containing the text "2560". Upload using serial port COM3 (verbose enabled)

VMBuilder.exe -builder.verbose=true -builder.build=true -builder.upload=true -builder.board_id=2560 -builder.project_path="C:\Users\Test\Documents\Arduino\ArduinoProject\ArduinoProject.vcxproj" -builder.serial_port=COM3

2. Build and upload a simple arduino project via the master .ino name.  Uses the first board that has a name or id containing the text "Uno". Upload using serial port COM3

VMBuilder.exe -builder.build=true -builder.upload=true -builder.board_id=Uno -builder.project_path="C:\Users\Test\Documents\Arduino\ArduinoProject1\ArduinoProject1.ino" -builder.serial_port=COM3

3. Build and upload a simple arduino project via the folder name.  Uses the first board that has a name or id containing the text "Uno". Upload using serial port COM3

VMBuilder.exe -builder.build=true -builder.upload=true -builder.board_id=Uno -builder.project_path="C:\Users\Test\Documents\Arduino\ArduinoProject\ArduinoProject.vcxproj" -builder.serial_port=COM3

4. Clean the temp build cache for the given project and the Uno board 

VMBuilder.exe -builder.clean=true -builder.board_id=Uno -builder.project_path="C:\Users\Test\Documents\ArduinoProject\ArduinoProject.vcxproj" -builder.serial_port=COM3

5. Burn a bootloader using the specified programmer

VMBuilder.exe  -builder.board_id=Uno -builder.project_path="C:\Users\Test\Documents\Arduino\ArduinoProject" -builder.burn_bootloaderx=true -builder.programmer=avrispmkii

6. Copy final output files to specified directory.

VMBuilder.exe -builder.output_directory="c:\test\output\sketch"  -builder.clean=true -builder.board_id=Uno -builder.project_path="C:\Users\Test\Documents\Arduino\ArduinoProject\ArduinoProject.ino" -builder.serial_port=COM3

7. Print a list of boards for the currently selected ide/configuration

VMBuilder.exe -builder.dump_boards=false

8. Build and upload a visual studio (visual micro) project.  Uses the first board that has a name or id containing the test "2560". Upload using programmer

VMBuilder.exe -builder.build=true -builder.upload=true -builder.board_id=2560 -builder.project_path="C:\Users\Test\Documents\Arduino\ArduinoProject\ArduinoProject.vcxprojj" -builder.programmer=avrispmkii

9. Override the Arduino IDE location on-the-fly

VMBuilder.exe -builder.ide_path="D:\Arduino\arduino-1.8.1" -builder.build=true -builder.upload=true -builder.board_id=2560 -builder.project_path="C:\Users\Test\Documents\Arduino\ArduinoProject\ArduinoProject.vcxproj" -builder.programmer=avrispmkii

.........

This initial version supports the following switches along with the ability to override any of the standard build settings:-

All settings are optional apart from board_id and project_path

  • -builder.project_path="C:\Users\Test\Documents\Arduino\ArduinoProject\ArduinoProject.vcxproj" 
  • -builder.board_id=2560 
  • -builder.build=true
  • -builder.upload=true
  • -builder.clean=false 
  • -builder.application_id=arduino16x 
  • -builder.ide_path="D:\Arduino\arduino-1.8.1" 
  • -builder.verbose=true 
  • -builder.verbose_warnings=true 
  • -builder.serial_port=COM3 
  • -builder.dump_props=false 
  • -builder.rebuild=false 
  • -builder.parallel_build=false 
  • -builder.dump_boards=false 
  • -builder.output_directory="c:\test\output\sketch" 
  • -builder.dump_source_list=true 
  • -builder.burn_bootloaderx=true 
  • -builder.programmerx=avrispmkii