tools/autobuild: Update auto-build code to build esp32 port with IDF v5.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2023-06-23 15:51:23 +10:00
parent 6a9db521ed
commit 273ba28c07
2 changed files with 5 additions and 41 deletions

View File

@ -4,8 +4,7 @@
#
# Requirements:
# - All toolchains must be in path (arm-none-eabi-gcc, xtensa-lx106-elf)
# - IDF_PATH_V42 must be set
# - IDF_PATH_V44 must be set
# - IDF_PATH_V50 must be set
# - MICROPY_AUTOBUILD_MICROPYTHON_REPO must be set to location of micropython repository
# - MICROPY_AUTOBUILD_MAKE must be set to the make command to use, eg "make -j2"
#
@ -13,13 +12,8 @@
# - MICROPY_AUTOBUILD_REMOTE_MACHINE can be set to a remote ssh machine to copy files to
# - MICROPY_AUTOBUILD_REMOTE_DIR can be set to destination directory on remote machine
if [ ! -d "$IDF_PATH_V42" ]; then
echo "must set IDF_PATH_V42"
exit 1
fi
if [ ! -d "$IDF_PATH_V44" ]; then
echo "must set IDF_PATH_V44"
if [ ! -d "$IDF_PATH_V50" ]; then
echo "must set IDF_PATH_V50"
exit 1
fi
@ -70,8 +64,7 @@ ${AUTODIR}/build-cc3200-latest.sh ${FW_TAG} ${LOCAL_FIRMWARE}
cd ../esp8266
${AUTODIR}/build-esp8266-latest.sh ${FW_TAG} ${LOCAL_FIRMWARE}
cd ../esp32
(source ${IDF_PATH_V42}/export.sh && build_esp32_boards ${FW_TAG} ${LOCAL_FIRMWARE})
(source ${IDF_PATH_V44}/export.sh && build_esp32_boards ${FW_TAG} ${LOCAL_FIRMWARE})
(source ${IDF_PATH_V50}/export.sh && build_esp32_boards ${FW_TAG} ${LOCAL_FIRMWARE})
cd ../mimxrt
build_mimxrt_boards ${FW_TAG} ${LOCAL_FIRMWARE}
cd ../nrf

View File

@ -62,36 +62,7 @@ function build_boards {
}
function build_esp32_boards {
# check/get parameters
if [ $# != 2 ]; then
echo "usage: $0 <fw-tag> <dest-dir>"
return 1
fi
fw_tag=$1
dest_dir=$2
# check we are in the correct directory
if [ ! -r modesp32.c ]; then
echo "must be in esp32 directory"
return 1
fi
# build the boards, based on the IDF version
for board_json in $(find boards/ -name board.json | sort); do
mcu=$(cat $board_json | python3 -c "import json,sys; print(json.load(sys.stdin).get('mcu', 'unknown'))")
if idf.py --version | grep -q v4.2; then
if [ $mcu = esp32 ]; then
# build standard esp32-based boards with IDF v4.2
build_board $board_json $fw_tag $dest_dir bin elf map
fi
else
if [ $mcu != esp32 ]; then
# build esp32-s2/s3/c3 based boards with IDF v4.4+
build_board $board_json $fw_tag $dest_dir bin elf map uf2
fi
fi
done
build_boards modesp32.c $1 $2 bin elf map uf2
}
function build_mimxrt_boards {