Even though openHASP is available in several pre-compiled firmware variants, sometimes the ready-to-flash binaries aren't enough.
If you need to customize some features, or simply change some parameters, then you need to compile a firmware binary yourself.
The guide below will describe how to make your own build from source on your local PC.
Install Visual Studio Code~
Additional packages on Linux:
Make sure to add the
--recursive parameter when cloning the project from GitHub. Otherwise git will not download the required submodules in the
If you already cloned openHASP without the submodules, you can fetch the submodules seperately using:
To switch to a different branch (for example 0.6.0) use:
1 2 3 4
Open in PlatformIO~
Open the project folder in Visual Studio Code. You will receive a popup to install PlatformIO IDE if it is not already installed. This will automatically install all PlatformIO dependencies and the MCU compiler frameworks needed.
Restart Visual Studio Code when the PIO installation completes.
Create a configuration~
platformio_override.ini and uncomment the platforms for
1 2 3 4 5 6
If you use customization, remove the comment from the line
1 2 3 4 5
Then Click on the "Refresh Project tasks" icon in PlatformIO to list all the configured environments.
You can now run "Build" or "Build All" in PlatformIO to compile (all) the firmware.
Native Linux build~
For native linux_sdl builds, you also need:
Native MacOS build~
For native darwin_sdl builds, you also need Homebrew:
Native Windows build~
For native windows_sdl builds, you also need MingW:
Add the path to your Mingw-w64
bin folder to the Windows PATH environment
C:\msys64\mingw64\bin). See instruction, 4.