Source code setup procedure
February 27, 2026 ยท View on GitHub
Before compiling and uploading any of the Arduino sketches provided in this project (under src/Firmware or src/QualityControl), this procedure must be followed.
This is due to how the Arduino IDE works, which prevents a single source file to be shared between many sketches. Those source files are located at folders src/common and src/include.
This procedure relays on a powershell script, named MakeSymLinks.ps1. In order to run any powershell script, you may need to enable them first:
-
Run
powershell.exe -
type and run:
Set-ExecutionPolicy unrestricted -
Now, the script may be run, by typing:
<<path_to_project_folder>>/src/MakeSymLinks.ps1Another way is to open MakeSymLinks.ps1 with "Powershell ISE" and click on the "play" icon (or press F5).
Linux users can use a bash script instead of the PowerShell script:
MakeSymLinks.sh.
Anyway, there are two choices:
Running with administrator privileges (recommended)
In this mode, the script will create symbolic links (aka soft links) to the needed source files. So there is no need to run more than once (unless your project folder gets overwritten by a GIT command).
Note
Just to make things clear: you must run this procedure again after downloading or upgrading to a new version. Otherwise, the firmware will not compile if there are new files.
In order to run powershell.exe or Powershell ISE
with administrator privileges (in Windows):
- Locate the proper icon with the file explorer or through a search at the windows' menu.
- Right-click on the icon.
- Choose "Run as administrator" in the popup menu.
Linux systems do not require the administrator privilege (root) to run the script in this mode.
Running without administrator privileges
In this mode, the script will create many copies of the required source files at each sketch folder. This means that it must be run again if any source file is modified inside folders src/common or src/include.
Note
To prevent you from modifying the wrong file, all copies are set to read-only. Otherwise, you could be editing the wrong files, which is quite confusing.
Troubleshooting
Look for error messages when running this procedure. If you have them, edit the involved "includes.txt" file. Probably, some files have been renamed or removed from the project. Check the release notes.