Building on macOS
Installing Homebrewβ
Homebrew is used here to install the command-line dependencies needed to build Matrix OS.
- Visit https://brew.sh/ and follow the instructions to install the latest version of Homebrew
- After installation, you may need to follow any on-screen instructions to add Homebrew to your system's PATH. Once installed, verify it by running:
brew --version
Install Dependenciesβ
The Matrix OS codebase is hosted in a Git repository and uses the Espressif IoT Development Framework to build and upload firmware for Mystrix. Install the required command-line dependencies with:
brew install git cmake ninja dfu-util python3 psutil
Clone Matrix OS Repositoryβ
-
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β
Matrix OS Mystrix builds require ESP-IDF 5.3.x and ESP32-S3 tooling. The commands below install v5.3.1.
mkdir -p ~/esp
cd ~/esp
git clone -b v5.3.1 --recursive https://github.com/espressif/esp-idf.git
cd ~/esp/esp-idf
./install.sh esp32s3
python3 $HOME/esp/esp-idf/tools/idf_tools.py install riscv32-esp-elf
Build Matrix OSβ
Use DEVICE=Mystrix for Mystrix 1 family devices. Use DEVICE=Mystrix2 for Mystrix 2 family devices.
-
Load ESP-IDF by sourcing it in your terminal session. You can run this command to set up ESP-IDF for the session:
source ~/esp/esp-idf/export.shFor repeated development, add this command to your shell setup or configure your editor terminal to source ESP-IDF before running Matrix OS build commands. You can also add an alias such as
alias get_idf='. $HOME/esp/esp-idf/export.sh'. -
Go to the root folder of Matrix OS if your terminal isnβt already there.
-
Run this command to build Matrix OS:
make DEVICE=Mystrix buildFor Mystrix 2:
make DEVICE=Mystrix2 build -
Prepare to upload to your Mystrix device. Make sure your Mystrix is in upload mode already.
-
Upload the compiled Matrix OS to Mystrix:
make DEVICE=Mystrix uf2-uploadFor Mystrix 2:
make DEVICE=Mystrix2 uf2-upload -
Your Mystrix device should now flash and automatically start the newly compiled Matrix OS.
For target examples and command chains, see Build Matrix OS. Use build-dev when you need logs; see Debug Your Application (C++).
Comments