Arduino Build Events and Hooks

Visual Micro supports all standard Arduino build hooks. Multiple hooks can be specified for each event. Visual Micro also provides a custombuild event that will override/replace the entire build process. In this case both the standard build and all other build events will be ignored.

All hooks can reference all board/build properties. Licenced Visual Micro users can use a local project board.txt to define project level events. The platform boards.txt or platform.txt or platform.local.txt can also be used to define hooks (see the visual micro explorer for hardware/platform source locations).

Licenced Visual Micro users can also create platform.txt, boards.txt and applications.txt within the "My Visual Micro" folder structure (see docs or ask in forum for more info)

The examples below define 3 hooks that override the entire build process.

The first hook runs a command the way arduino event hooks and compiler commands are normally run. The output is captured and displayed in the visual studio "micro build" output window.

The last two hooks open windows allowing an external or interactive window/process to be displayed to users.

# custom build event property examples

recipe.hooks.custombuild.pattern=somexe.exe "{sketch_path}"

recipe.hooks.custombuild.working_directory={sketch_path}

 

recipe.hooks.custombuild1.pattern=explorer "{sketch_path}"

recipe.hooks.custombuild1.use_shell_execute=true

recipe.hooks.custombuild1.create_no_window=false

 

recipe.hooks.custombuild2.pattern=https://www.google.co.uk?q={sketch_path}

recipe.hooks.custombuild2.use_shell_execute=true

recipe.hooks.custombuild2.create_no_window=false

recipe.hooks.custombuild2.error_dialog=true

 

Other Pages