Building on Windows
Install Git​
Git is an essential tool for version control in development. If you haven’t installed it yet, follow these steps:
-
Check if Git is installed by running
git --versionin your terminal.
-
If Git isn’t installed, follow the official installation guide to set it up for your system.
Install Make​
Make is crucial for building projects, especially when working with embedded systems. Matrix OS uses Make on top of the chip vendor-provided build system to achieve cross-platform compatibility.
-
Install Chocolatey, which will be used to get the latest version of Make.
-
Restart your terminal to ensure Chocolatey is ready to use.
-
Install Make:
choco install make -
Restart your terminal to make sure
Makeis ready to use. -
Confirm the installation by typing:
make --versionThis command should output the version of
Make, confirming it is installed correctly.
Clone Matrix OS Repository​
This step helps you download the code of Matrix OS and get it ready for building.
-
Open your Command Prompt or preferred terminal.
-
Clone the Matrix OS repository with the following command:
git clone https://github.com/203-Systems/MatrixOS.git -
Navigate to the cloned repository:
cd MatrixOS -
Initialize Matrix OS repository:
git submodule update --init
Install ESP IDF​
ESP-IDF (Espressif IoT Development Framework) is the vendor-provided toolchain and SDK for the SOC used in Mystrix. It is a critical component of Matrix OS for Mystrix, and it's important to have it installed for building Matrix OS.
- Install ESP-IDF by downloading the online installer and installing
ESP-IDF version V5.3.1. - Go to the installer folder and run the
install.batto finish the installation. If you didn't change the default install path, it should be atC:\espressif\v5.3.1\install.bat.
Build Matrix OS​
Now that you have completed all the requirements, it's time to build Matrix OS!
- Load ESP-IDF. You will need to load ESP-IDF in your current terminal session. You can either use the ESP-IDF installed
ESP-IDF V5.3 CMDshortcut or runC:\espressif\v5.3.1\export.batin a terminal instance.
In the long run, you will want to automate this. If you are using VS Code, you can modify the MatrixOS.code-workspace file and replace the .bat path with yours.
(The reason this needs to be done is that this way you can have multiple different versions of IDF and use a specific one. It also loads associated Python and toolchains into the session.)
-
Go to the root folder of Matrix OS if your terminal isn't there already.
-
Run this command to build Matrix OS:
make DEVICE=Mystrix build
- Upload MatrixOS to your Mystrix. Make sure your Mystrix is in upload mode.
Run this command to install psutil python package. You only have to do this once:
pip install psutil
Run this command to upload your compiled Matrix OS to your Mystrix:
make DEVICE=Mystrix uf2-upload
- Your Mystrix should start flashing and automatically enter the newly compiled Matrix OS.
Build Commands​
Here are some useful build commands you can use in Matrix OS:
clean- Cleans the build.fullclean- Cleans the build more thoroughly. Use this if you encounter undefined references or missing files.build- Builds Matrix OS based on the default config (OS/parameter.h).build-release,build-rc,build-beta,build-nightly,build-dev- Builds Matrix OS in various modes.build-devenables USB logging (see Debug Matrix OS).
You can chain commands together like:
make DEVICE=Mystrix clean build uf2-upload
Comments