Enable STM32 build (#4339)

* Enable stm32 builds and wio-e5 board

* Chmod
This commit is contained in:
Ben Meadors
2024-07-27 06:39:16 -05:00
committed by GitHub
parent 6f235232f0
commit f583837b4e
4 changed files with 72 additions and 1 deletions

29
bin/build-stm32.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -e
VERSION=$(bin/buildinfo.py long)
SHORT_VERSION=$(bin/buildinfo.py short)
OUTDIR=release/
rm -f $OUTDIR/firmware*
rm -r $OUTDIR/* || true
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
platformio pkg update -e $1
echo "Building for $1 with $PLATFORMIO_BUILD_FLAGS"
rm -f .pio/build/$1/firmware.*
# The shell vars the build tool expects to find
export APP_VERSION=$VERSION
basename=firmware-$1-$VERSION
pio run --environment $1 # -v
SRCELF=.pio/build/$1/firmware.elf
cp $SRCELF $OUTDIR/$basename.elf
SRCELF=.pio/build/$1/firmware.bin
cp $SRCHEX $OUTDIR/$basename.bin