summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrobert-hh <robert@hammelrath.com>2021-06-23 21:18:45 +0200
committerDamien George <damien@micropython.org>2021-07-01 12:29:16 +1000
commitefa97beb992049978f0e7be6e4e2f01249054362 (patch)
tree9092cabadd1638309ff8ff22a1cef38dd6a2a6e7
parent8182f34584d577da4ff8e26acbe677765cfbca23 (diff)
tools/autobuild: Add mimxrt port to build scripts for nightly builds.
The firmware for Teensy 4.0, Teensy 4.1 and MIMXRT1020_EVK are created. Users of other MIMXRT10xx_EVK boards should be able to build the firmware themselves, they might need specific DEBUG settings. The Makefile had to be changed in order to build the .bin file as well.
-rw-r--r--ports/mimxrt/Makefile2
-rwxr-xr-xtools/autobuild/autobuild.sh2
-rwxr-xr-xtools/autobuild/build-mimxrt-latest.sh36
3 files changed, 39 insertions, 1 deletions
diff --git a/ports/mimxrt/Makefile b/ports/mimxrt/Makefile
index 870248373..fdb1325fd 100644
--- a/ports/mimxrt/Makefile
+++ b/ports/mimxrt/Makefile
@@ -297,7 +297,7 @@ OBJ += $(BUILD)/pins_gen.o
# Workaround for bug in older gcc, warning on "static usbd_device_t _usbd_dev = { 0 };"
$(BUILD)/lib/tinyusb/src/device/usbd.o: CFLAGS += -Wno-missing-braces
-all: $(BUILD)/firmware.hex
+all: $(BUILD)/firmware.hex $(BUILD)/firmware.bin
$(BUILD)/firmware.elf: $(OBJ)
$(ECHO) "LINK $@"
diff --git a/tools/autobuild/autobuild.sh b/tools/autobuild/autobuild.sh
index 45822f2b7..049844381 100755
--- a/tools/autobuild/autobuild.sh
+++ b/tools/autobuild/autobuild.sh
@@ -66,6 +66,8 @@ cd ../esp32
${AUTODIR}/build-esp32-latest.sh ${IDF_PATH_V4} ${FW_TAG} ${LOCAL_FIRMWARE}
cd ../rp2
${AUTODIR}/build-rp2-latest.sh ${FW_TAG} ${LOCAL_FIRMWARE}
+cd ../mimxrt
+${AUTODIR}/build-mimxrt-latest.sh ${FW_TAG} ${LOCAL_FIRMWARE}
popd
diff --git a/tools/autobuild/build-mimxrt-latest.sh b/tools/autobuild/build-mimxrt-latest.sh
new file mode 100755
index 000000000..e36b294ac
--- /dev/null
+++ b/tools/autobuild/build-mimxrt-latest.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+# function for building firmware
+function do_build() {
+ descr=$1
+ board=$2
+ ext=$3
+ shift
+ shift
+ shift
+ echo "building $descr $board"
+ build_dir=/tmp/mimxrt-build-$board
+ $MICROPY_AUTOBUILD_MAKE $@ BOARD=$board BUILD=$build_dir || exit 1
+ mv $build_dir/firmware.$ext $dest_dir/$descr$fw_tag.$ext
+ rm -rf $build_dir
+}
+
+# check/get parameters
+if [ $# != 2 ]; then
+ echo "usage: $0 <fw-tag> <dest-dir>"
+ exit 1
+fi
+
+fw_tag=$1
+dest_dir=$2
+
+# check we are in the correct directory
+if [ ! -r modmimxrt.c ]; then
+ echo "must be in mimxrt directory"
+ exit 1
+fi
+
+# build the boards
+do_build TEENSY40 TEENSY40 hex
+do_build TEENSY41 TEENSY41 hex
+do_build MIMXRT1020_EVK MIMXRT1020_EVK bin