From 857e506595ca46b2e077a15d19abe266394eda98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20V=C3=B6r=C3=B6s?= Date: Sat, 19 Aug 2023 20:26:45 +0200 Subject: [PATCH] generate firmware for PICO with UART and file system support --- scripts/init.sh | 2 +- scripts/rp2/pico.sh | 2 +- scripts/rp2/pico_uart_vfat.sh | 10 ++++++++++ scripts/rp2/rp2.sh | 8 +++++++- 4 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 scripts/rp2/pico_uart_vfat.sh diff --git a/scripts/init.sh b/scripts/init.sh index de4bf1f..e9828e0 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -38,7 +38,7 @@ upython_hash=`cd micropython; git describe --abbrev=8 --always; cd ..` # the cross-compiler is required for each build, so we might as well get it over with make ${MAKEOPTS} -C micropython/mpy-cross -# chose a delimiter that is not probable to turn up in the description of the file +# choose a delimiter that is not probable to turn up in the description of the file write_platforms_list() { if [ -f "platforms.md" ]; then echo $1"| "$1-$upython_hash-$ulab_hash$ext"| " $2 >> ./platforms.list diff --git a/scripts/rp2/pico.sh b/scripts/rp2/pico.sh index 4d147eb..1ed3943 100755 --- a/scripts/rp2/pico.sh +++ b/scripts/rp2/pico.sh @@ -3,7 +3,7 @@ # This file is part of the micropython-builder project, # https://github.com/v923z/micropython-builder # The MIT License (MIT) -# Copyright (c) 2022 Zoltán Vörös +# Copyright (c) 2022-2023 Zoltán Vörös source ./scripts/rp2/rp2.sh diff --git a/scripts/rp2/pico_uart_vfat.sh b/scripts/rp2/pico_uart_vfat.sh new file mode 100644 index 0000000..c5ae373 --- /dev/null +++ b/scripts/rp2/pico_uart_vfat.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# This file is part of the micropython-builder project, +# https://github.com/v923z/micropython-builder +# The MIT License (MIT) +# Copyright (c) 2023 Zoltán Vörös + +source ./scripts/rp2/rp2.sh + +build_rp2_uart_vfat "PICO" \ No newline at end of file diff --git a/scripts/rp2/rp2.sh b/scripts/rp2/rp2.sh index df33b96..ccd6cf4 100755 --- a/scripts/rp2/rp2.sh +++ b/scripts/rp2/rp2.sh @@ -3,7 +3,7 @@ # This file is part of the micropython-builder project, # https://github.com/v923z/micropython-builder # The MIT License (MIT) -# Copyright (c) 2022 Zoltán Vörös +# Copyright (c) 2022-2023 Zoltán Vörös source ./scripts/init.sh @@ -12,3 +12,9 @@ build_rp2() { copy_files rp2/build-$1/firmware.uf2 $1 clean_up rp2 build-$1 } + +build_rp2_uart_vfat() { + make ${MAKEOPTS} -C micropython/ports/rp2 BOARD=$1 USER_C_MODULES=../../../ulab/code/micropython.cmake CFLAGS_EXTRA=-DULAB_HASH=$ulab_hash CFLAGS_EXTRA=-DMICROPY_HW_ENABLE_UART_REPL=1 CFLAGS_EXTRA=-DMICROPY_HW_USB_MSC=1 + copy_files rp2/build-$1/firmware.uf2 "$1"_UART_VFAT + clean_up rp2 build-$1 +}