File tree Expand file tree Collapse file tree 4 files changed +66
-23
lines changed Expand file tree Collapse file tree 4 files changed +66
-23
lines changed Original file line number Diff line number Diff line change @@ -13,31 +13,25 @@ if [ x$ZEPHYR_SDK_INSTALL_DIR == x"" ]; then
1313fi
1414
1515if [[ $# -eq 0 ]]; then
16- board=arduino_giga_r1//m7
16+ board=$( jq -cr ' .[0].board' < ./extra/targets.json)
17+ args=$( jq -cr ' .[0].args' < ./extra/targets.json)
1718else
18- board=$1
19- shift
19+ board=$1
20+ shift
2021fi
2122
2223source venv/bin/activate
2324
2425ZEPHYR_BASE=$( west topdir) /zephyr
2526
2627# Get the variant name (NORMALIZED_BOARD_TARGET in Zephyr)
27- tmpdir=$( mktemp -d)
28- variant=$( cmake -DBOARD=$board -P extra/get_variant_name.cmake | grep ' VARIANT=' | cut -d ' =' -f 2)
29- rm -rf ${tmpdir}
28+ variant=$( extra/get_variant_name.sh $board )
3029
3130if [ -z " ${variant} " ] ; then
3231 echo " Failed to get variant name from '$board '"
3332 exit 1
3433fi
3534
36- echo && echo && echo
37- echo ${variant}
38- echo ${variant} | sed -e ' s/./=/g'
39- echo
40-
4135# Build the loader
4236BUILD_DIR=build/${variant}
4337VARIANT_DIR=variants/${variant}
Original file line number Diff line number Diff line change 1- # Update this file if a new board gets supported
2-
3- set -e
4-
5- ./extra/build.sh arduino_giga_r1//m7 --shield giga_display_shield
6- ./extra/build.sh arduino_nano_33_ble//sense
7- ./extra/build.sh arduino_nicla_sense_me
8- ./extra/build.sh arduino_portenta_c33
9- ./extra/build.sh arduino_portenta_h7@1.0.0//m7
10- ./extra/build.sh ek_ra8d1
11- ./extra/build.sh frdm_mcxn947/mcxn947/cpu0
12- ./extra/build.sh frdm_rw612
1+ #! /bin/bash
2+
3+ FORCE=false
4+
5+ while getopts " hfl" opt; do
6+ case $opt in
7+ h)
8+ echo " Usage: $0 [-hfl]"
9+ echo " -h Show this help message"
10+ echo " -f Force build all targets"
11+ exit 0
12+ ;;
13+ f)
14+ FORCE=true
15+ ;;
16+ * )
17+ echo " Invalid option: -$OPTARG " >&2
18+ exit 1
19+ ;;
20+ esac
21+ done
22+
23+ jq -cr ' .[]' < ./extra/targets.json | while read -r item; do
24+ board=$( jq -cr ' .board // ""' <<< " $item" )
25+ args=$( jq -cr ' .args // ""' <<< " $item" )
26+
27+ variant=$( extra/get_variant_name.sh " $board " || echo " $board " )
28+ echo && echo
29+ echo ${variant}
30+ echo ${variant} | sed -e ' s/./=/g'
31+
32+ ./extra/build.sh " $board " $args
33+ result=$?
34+
35+ echo
36+ echo " ${variant} result: $result "
37+ [ $result -ne 0 ] && ! $FORCE && exit $result
38+ done
39+
40+ exit 0
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ source venv/bin/activate
5+
6+ # Get the variant name (NORMALIZED_BOARD_TARGET in Zephyr)
7+ tmpdir=$( mktemp -d)
8+ variant=$( cmake " -DBOARD=$1 " -P extra/get_variant_name.cmake 2> /dev/null | grep ' VARIANT=' | cut -d ' =' -f 2)
9+ rm -rf ${tmpdir}
10+
11+ echo $variant
Original file line number Diff line number Diff line change 1+ [
2+ { "board" : " arduino_giga_r1//m7" , "args" : " --shield giga_display_shield" },
3+ { "board" : " arduino_nano_33_ble//sense" },
4+ { "board" : " arduino_nicla_sense_me" },
5+ { "board" : " arduino_portenta_c33" },
6+ { "board" : " arduino_portenta_h7@1.0.0//m7" },
7+ { "board" : " ek_ra8d1" },
8+ { "board" : " frdm_mcxn947/mcxn947/cpu0" },
9+ { "board" : " frdm_rw612" }
10+ ]
You can’t perform that action at this time.
0 commit comments