Site Tools


Sidebar

work

Projects travel Socials (External)

projects:software:building_meshtastic_firmware_on_wsl

Building Meshtastic Firmware on Windows Subsystem for Linux (WSL)

I needed to build Meshtastic firmware on WSL in order to produce binary UF2 firmware for the Meshtastic XIAO BLE variant.

Here's what I had to do.

Prepare Debian Environment

  1. Open and set up user
  2. sudo apt-get install git python3-venv
  3. curl -fsSL -o get-platformio.py https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py 
    python3 get-platformio.py

Prepare Meshtastic Firmware Build Environment

  1. git clone https://github.com/meshtastic/firmware.git meshtastic-firmware && cd meshtastic-firmware
  2. Optional: check out a tagged release
    git checkout tags/v2.3.8.d490a33
  3. ./variants/xiao_ble/xiao_ble.sh

Build the Firmware

  1. pio run -e xiao_ble
  2. ./bin/uf2conv.py .pio/build/xiao_ble/firmware.hex -c -o firmware.uf2 -f 0xADA52840
  3. cp firmware.uf2 /mnt/c/Users/YOUR_WINDOWS_USERNAME/Desktop/

Upload the Firmware

  1. Connect the XIAO BLE to the computer USB and double tap the reset button, the red LED will breathe and a USB drive “XIAO-BOOT” will be mounted
  2. Copy firmware.uf2 from your desktop to the USB drive
projects/software/building_meshtastic_firmware_on_wsl.txt · Last modified: 2024/05/05 16:45 by Andrew Yong