Building on Linux
I (Null) don't use Linux for development but I was able to get Matrix OS to build on Linux via WSL and Github Action.
Since I mainly do develop on Windows, the code base might also have case sensitive issues that prevents it from build build on Linux/MacOS.
If you have suggestions or questions, please reach out in our Discord server, Github issue, or a leave a comment on this page.
Install Gitβ
Git is necessary for cloning the Matrix OS repository. Install Git with:
sudo apt update
sudo apt install git
Verify the installation:
git --version
Install Makeβ
Make is essential for building Matrix OS. Install it using:
sudo apt install make
Confirm the installation:
make --version
Clone the Matrix OS Repositoryβ
-
Make sure Git is installed as shown above.
-
Open your terminal.
-
Clone the Matrix OS repository:
git clone https://github.com/203-Systems/MatrixOS.git -
Navigate to the cloned repository:
cd MatrixOS -
Initialize the submodules in the Matrix OS repository:
git submodule update --init
Install ESP-IDFβ
The ESP-IDF (Espressif IoT Development Framework) is required to build and upload Matrix OS to the Mystrix device.
-
Download and install ESP-IDF version V5.3.1. Follow the instructions on ESP-IDF: Standard Setup of Toolchain for Linux to install version V5.3.1.
-
After installation, locate the installation directory (e.g.,
~/esp). -
Run the
install.shscript to complete the setup:~/esp/esp-idf/install.sh
Build Matrix OSβ
-
Load ESP-IDF by sourcing it in your terminal session:
source ~/esp/esp-idf/export.shIn the long run, you will want to automate this. You could add this line to your shell's configuration file (e.g.,
.bashrcor.zshrc) or if you are using VS Code, you can modify the MatrixOS.code-workspace file and adapt it to run it on new terminal. -
Navigate to the Matrix OS root folder if your terminal isnβt already there.
-
Run the following command to build Matrix OS:
make DEVICE=Mystrix build -
Prepare for the upload by ensuring your Mystrix is in upload mode.
-
Install
psutil(only needed once):pip install psutil -
Upload the compiled Matrix OS to your Mystrix device:
make DEVICE=Mystrix uf2-upload -
Your Mystrix device should now flash and start the newly compiled Matrix OS automatically.
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