diff --git a/tools/autobuild/autobuild.sh b/tools/autobuild/autobuild.sh index bb77b178b9..1532c9820f 100755 --- a/tools/autobuild/autobuild.sh +++ b/tools/autobuild/autobuild.sh @@ -65,9 +65,7 @@ FW_GIT="$(git describe --dirty || echo unknown)" FW_TAG="-$FW_DATE-unstable-$FW_GIT" # build new firmware -cd ports/stm32 -${AUTODIR}/build-stm32-latest.sh ${FW_TAG} ${LOCAL_FIRMWARE} -cd ../cc3200 +cd ports/cc3200 ${AUTODIR}/build-cc3200-latest.sh ${FW_TAG} ${LOCAL_FIRMWARE} cd ../esp8266 ${AUTODIR}/build-esp8266-latest.sh ${FW_TAG} ${LOCAL_FIRMWARE} @@ -81,6 +79,9 @@ cd ../rp2 build_rp2_boards ${FW_TAG} ${LOCAL_FIRMWARE} cd ../samd build_samd_boards ${FW_TAG} ${LOCAL_FIRMWARE} +cd ../stm32 +build_stm32_boards ${FW_TAG} ${LOCAL_FIRMWARE} +${AUTODIR}/build-stm32-extra.sh ${FW_TAG} ${LOCAL_FIRMWARE} popd diff --git a/tools/autobuild/build-boards.sh b/tools/autobuild/build-boards.sh index 1ae795a7a7..bb5d8d344e 100755 --- a/tools/autobuild/build-boards.sh +++ b/tools/autobuild/build-boards.sh @@ -26,16 +26,17 @@ function build_boards { return 1 fi - for board_json in $(find boards/ -name board.json); do + for board_json in $(find boards/ -name board.json | sort); do board=$(echo $board_json | awk -F '/' '{ print $2 }') descr=$(cat $board_json | python3 -c "import json,sys; print(json.load(sys.stdin).get('id', '$board'))") build_dir=/tmp/micropython-build-$board echo "building $descr $board" - $MICROPY_AUTOBUILD_MAKE BOARD=$board BUILD=$build_dir || return 1 - for ext in $@; do - mv $build_dir/firmware.$ext $dest_dir/$descr$fw_tag.$ext - done + $MICROPY_AUTOBUILD_MAKE BOARD=$board BUILD=$build_dir && ( + for ext in $@; do + mv $build_dir/firmware.$ext $dest_dir/$descr$fw_tag.$ext + done + ) rm -rf $build_dir done } @@ -51,3 +52,7 @@ function build_rp2_boards { function build_samd_boards { build_boards $1 $2 samd_soc.c uf2 } + +function build_stm32_boards { + build_boards $1 $2 modpyb.c dfu hex +} diff --git a/tools/autobuild/build-stm32-latest.sh b/tools/autobuild/build-stm32-extra.sh similarity index 82% rename from tools/autobuild/build-stm32-latest.sh rename to tools/autobuild/build-stm32-extra.sh index 283c8a45b8..43842d6c90 100755 --- a/tools/autobuild/build-stm32-latest.sh +++ b/tools/autobuild/build-stm32-extra.sh @@ -1,4 +1,5 @@ #!/bin/bash +# Build additional variants of pyboard firmware (base variants are built by build-boards.sh). # function for building firmware function do_build() { @@ -10,6 +11,7 @@ function do_build() { build_dir=/tmp/stm-build-$board $MICROPY_AUTOBUILD_MAKE $@ BOARD=$board BUILD=$build_dir || exit 1 mv $build_dir/firmware.dfu $dest_dir/$descr$fw_tag.dfu + mv $build_dir/firmware.hex $dest_dir/$descr$fw_tag.hex rm -rf $build_dir } @@ -31,26 +33,15 @@ fi # build the versions do_build pybv3 PYBV3 do_build pybv3-network PYBV3 MICROPY_PY_WIZNET5K=5200 MICROPY_PY_CC3K=1 -do_build pybv10 PYBV10 do_build pybv10-dp PYBV10 MICROPY_FLOAT_IMPL=double do_build pybv10-thread PYBV10 CFLAGS_EXTRA='-DMICROPY_PY_THREAD=1' do_build pybv10-dp-thread PYBV10 MICROPY_FLOAT_IMPL=double CFLAGS_EXTRA='-DMICROPY_PY_THREAD=1' do_build pybv10-network PYBV10 MICROPY_PY_WIZNET5K=5200 MICROPY_PY_CC3K=1 -do_build pybv11 PYBV11 do_build pybv11-dp PYBV11 MICROPY_FLOAT_IMPL=double do_build pybv11-thread PYBV11 CFLAGS_EXTRA='-DMICROPY_PY_THREAD=1' do_build pybv11-dp-thread PYBV11 MICROPY_FLOAT_IMPL=double CFLAGS_EXTRA='-DMICROPY_PY_THREAD=1' do_build pybv11-network PYBV11 MICROPY_PY_WIZNET5K=5200 MICROPY_PY_CC3K=1 -do_build pyblitev10 PYBLITEV10 do_build pyblitev10-dp PYBLITEV10 MICROPY_FLOAT_IMPL=double do_build pyblitev10-thread PYBLITEV10 CFLAGS_EXTRA='-DMICROPY_PY_THREAD=1' do_build pyblitev10-dp-thread PYBLITEV10 MICROPY_FLOAT_IMPL=double CFLAGS_EXTRA='-DMICROPY_PY_THREAD=1' do_build pyblitev10-network PYBLITEV10 MICROPY_PY_WIZNET5K=5200 MICROPY_PY_CC3K=1 -do_build PYBD-SF2 PYBD_SF2 -do_build PYBD-SF3 PYBD_SF3 -do_build PYBD-SF6 PYBD_SF6 - -for board in boards/{NUCLEO_*,STM32F*DISC,B_L*,USBDONGLE_WB55,ESPRUINO_PICO} ; do - bd=$(basename $board) - do_build $bd $bd USE_MBOOT=0 MBOOT_ENABLE_PACKING=0 -done