mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-12 16:12:07 +00:00
Enable STM32 build (#4339)
* Enable stm32 builds and wio-e5 board * Chmod
This commit is contained in:
parent
6f235232f0
commit
f583837b4e
33
.github/workflows/build_stm32.yml
vendored
Normal file
33
.github/workflows/build_stm32.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
name: Build STM32
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
board:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-stm32:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Build base
|
||||||
|
id: base
|
||||||
|
uses: ./.github/actions/setup-base
|
||||||
|
|
||||||
|
- name: Build STM32
|
||||||
|
run: bin/build-stm32.sh ${{ inputs.board }}
|
||||||
|
|
||||||
|
- name: Get release version string
|
||||||
|
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
||||||
|
id: version
|
||||||
|
|
||||||
|
- name: Store binaries as an artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: firmware-${{ inputs.board }}-${{ steps.version.outputs.version }}.zip
|
||||||
|
overwrite: true
|
||||||
|
path: |
|
||||||
|
release/*.hex
|
||||||
|
release/*.bin
|
10
.github/workflows/main_matrix.yml
vendored
10
.github/workflows/main_matrix.yml
vendored
@ -41,6 +41,7 @@ jobs:
|
|||||||
esp32c3: ${{ steps.jsonStep.outputs.esp32c3 }}
|
esp32c3: ${{ steps.jsonStep.outputs.esp32c3 }}
|
||||||
nrf52840: ${{ steps.jsonStep.outputs.nrf52840 }}
|
nrf52840: ${{ steps.jsonStep.outputs.nrf52840 }}
|
||||||
rp2040: ${{ steps.jsonStep.outputs.rp2040 }}
|
rp2040: ${{ steps.jsonStep.outputs.rp2040 }}
|
||||||
|
stm32: ${{ steps.jsonStep.outputs.stm32 }}
|
||||||
check: ${{ steps.jsonStep.outputs.check }}
|
check: ${{ steps.jsonStep.outputs.check }}
|
||||||
|
|
||||||
check:
|
check:
|
||||||
@ -103,6 +104,15 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
board: ${{ matrix.board }}
|
board: ${{ matrix.board }}
|
||||||
|
|
||||||
|
build-stm32:
|
||||||
|
needs: setup
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix: ${{ fromJson(needs.setup.outputs.stm32) }}
|
||||||
|
uses: ./.github/workflows/build_stm32.yml
|
||||||
|
with:
|
||||||
|
board: ${{ matrix.board }}
|
||||||
|
|
||||||
package-raspbian:
|
package-raspbian:
|
||||||
uses: ./.github/workflows/package_raspbian.yml
|
uses: ./.github/workflows/package_raspbian.yml
|
||||||
|
|
||||||
|
29
bin/build-stm32.sh
Executable file
29
bin/build-stm32.sh
Executable 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
|
@ -1,6 +1,5 @@
|
|||||||
[env:wio-e5]
|
[env:wio-e5]
|
||||||
extends = stm32_base
|
extends = stm32_base
|
||||||
board_level = extra
|
|
||||||
board = lora_e5_dev_board
|
board = lora_e5_dev_board
|
||||||
build_flags =
|
build_flags =
|
||||||
${stm32_base.build_flags}
|
${stm32_base.build_flags}
|
||||||
|
Loading…
Reference in New Issue
Block a user