From dd59f2daba48bfb86ac258a467bbe7af76397816 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 16 Jun 2024 00:48:36 +0100 Subject: [PATCH] roms: simplify the serprog build functions Signed-off-by: Leah Rowe --- script/roms | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/script/roms b/script/roms index 294cc8c..6e26eed 100755 --- a/script/roms +++ b/script/roms @@ -77,25 +77,21 @@ mkserprog() build_rp2040_rom() { - board="$1" - printf "Building pico-serprog for %s\n" "$board" - x_ cmake -DPICO_BOARD="$board" -DPICO_SDK_PATH="$picosdk" \ + x_ cmake -DPICO_BOARD="$1" -DPICO_SDK_PATH="$picosdk" \ -B "$picosrc/build" "$picosrc" x_ cmake --build "$picosrc/build" x_ mv "$picosrc/build/pico_serprog.uf2" \ - "bin/serprog_rp2040/serprog_$board.uf2" - printf "output to bin/serprog_rp2040/serprog_%s.uf2\n" "$board" + "bin/serprog_rp2040/serprog_$1.uf2" + printf "output to bin/serprog_rp2040/serprog_%s.uf2\n" "$1" } build_stm32_rom() { - board="$1" - printf "Building stm32-vserprog for %s\n" "$board" - x_ make -C "$stm32src" libopencm3-just-make BOARD=$board - x_ make -C "$stm32src" BOARD=$board + x_ make -C "$stm32src" libopencm3-just-make BOARD=$1 + x_ make -C "$stm32src" BOARD=$1 x_ mv "$stm32src/stm32-vserprog.hex" \ - "bin/serprog_stm32/serprog_$board.hex" - printf "output to bin/serprog_stm32/serprog_%s.hex\n" "$board" + "bin/serprog_stm32/serprog_$1.hex" + printf "output to bin/serprog_stm32/serprog_%s.hex\n" "$1" } list_serprog_boards()