mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-27 10:21:40 +00:00

This reverts commit5cc8ca59a3
. Revert "Sync Wio lr1110 refresh with master (#4251)" This reverts commitd97e6b86b8
. Revert "update SD_FLASH_SIZE to 0x27000 (#4232)" This reverts commit2df8093fef
.
37 lines
875 B
Bash
Executable File
37 lines
875 B
Bash
Executable File
#!/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
|
|
|
|
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
|
|
DFUPKG=.pio/build/$1/firmware.zip
|
|
cp $SRCELF $OUTDIR/$basename.elf
|
|
cp $DFUPKG $OUTDIR/$basename-ota.zip
|
|
|
|
echo "Generating NRF52 uf2 file"
|
|
SRCHEX=.pio/build/$1/firmware.hex
|
|
bin/uf2conv.py $SRCHEX -c -o $OUTDIR/$basename.uf2 -f 0xADA52840
|
|
|
|
cp bin/device-install.* $OUTDIR
|
|
cp bin/device-update.* $OUTDIR
|
|
cp bin/*.uf2 $OUTDIR
|