mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-16 18:13:49 +01:00
Merge pull request #18385 from gschorcht/dist/tools/esptool/install.sh
dist/tools/esptools: add macOS support to install/export scripts
This commit is contained in:
commit
b0bccd9bed
38
dist/tools/esptools/export.sh
vendored
38
dist/tools/esptools/export.sh
vendored
@ -5,17 +5,6 @@ ESP32_GCC_VERSION_DIR="8.4.0"
|
|||||||
|
|
||||||
ESP32_OPENOCD_VERSION="v0.11.0-esp32-20211220"
|
ESP32_OPENOCD_VERSION="v0.11.0-esp32-20211220"
|
||||||
|
|
||||||
# qemu version depends on the version of ncurses lib
|
|
||||||
if [ "$(ldconfig -p | grep libncursesw.so.6)" != "" ]; then
|
|
||||||
ESP32_QEMU_VERSION="esp-develop-20220203"
|
|
||||||
else
|
|
||||||
ESP32_QEMU_VERSION="esp-develop-20210220"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z ${IDF_TOOLS_PATH} ]; then
|
|
||||||
IDF_TOOLS_PATH=${HOME}/.espressif
|
|
||||||
fi
|
|
||||||
|
|
||||||
TOOLS_PATH=${IDF_TOOLS_PATH}/tools
|
TOOLS_PATH=${IDF_TOOLS_PATH}/tools
|
||||||
|
|
||||||
export_arch()
|
export_arch()
|
||||||
@ -67,6 +56,33 @@ export_openocd()
|
|||||||
|
|
||||||
export_qemu()
|
export_qemu()
|
||||||
{
|
{
|
||||||
|
# determine the platform using python
|
||||||
|
PLATFORM_SYSTEM=$(python3 -c "import platform; print(platform.system())")
|
||||||
|
PLATFORM_MACHINE=$(python3 -c "import platform; print(platform.machine())")
|
||||||
|
PLATFORM=${PLATFORM_SYSTEM}-${PLATFORM_MACHINE}
|
||||||
|
|
||||||
|
# map different platform names to a unique OS name
|
||||||
|
case ${PLATFORM} in
|
||||||
|
linux-amd64|linux64|Linux-x86_64|FreeBSD-amd64)
|
||||||
|
OS=linux-amd64
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "error: OS architecture ${PLATFORM} not supported"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# qemu version depends on the version of ncurses lib
|
||||||
|
if [ "$(ldconfig -p | grep libncursesw.so.6)" != "" ]; then
|
||||||
|
ESP32_QEMU_VERSION="esp-develop-20220203"
|
||||||
|
else
|
||||||
|
ESP32_QEMU_VERSION="esp-develop-20210220"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z ${IDF_TOOLS_PATH} ]; then
|
||||||
|
IDF_TOOLS_PATH=${HOME}/.espressif
|
||||||
|
fi
|
||||||
|
|
||||||
TOOLS_DIR=${TOOLS_PATH}/qemu-esp32/${ESP32_QEMU_VERSION}/qemu
|
TOOLS_DIR=${TOOLS_PATH}/qemu-esp32/${ESP32_QEMU_VERSION}/qemu
|
||||||
TOOLS_DIR_IN_PATH=`echo $PATH | grep ${TOOLS_DIR}`
|
TOOLS_DIR_IN_PATH=`echo $PATH | grep ${TOOLS_DIR}`
|
||||||
|
|
||||||
|
|||||||
17
dist/tools/esptools/install.sh
vendored
17
dist/tools/esptools/install.sh
vendored
@ -7,13 +7,6 @@ ESP32_GCC_VERSION_DOWNLOAD="gcc8_4_0"
|
|||||||
ESP32_OPENOCD_VERSION="v0.11.0-esp32-20211220"
|
ESP32_OPENOCD_VERSION="v0.11.0-esp32-20211220"
|
||||||
ESP32_OPENOCD_VERSION_TGZ="0.11.0-esp32-20211220"
|
ESP32_OPENOCD_VERSION_TGZ="0.11.0-esp32-20211220"
|
||||||
|
|
||||||
# qemu version depends on the version of ncurses lib
|
|
||||||
if [ "$(ldconfig -p | grep libncursesw.so.6)" != "" ]; then
|
|
||||||
ESP32_QEMU_VERSION="esp-develop-20220203"
|
|
||||||
else
|
|
||||||
ESP32_QEMU_VERSION="esp-develop-20210220"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# set the tool path to the default if not already set
|
# set the tool path to the default if not already set
|
||||||
if [ -z ${IDF_TOOLS_PATH} ]; then
|
if [ -z ${IDF_TOOLS_PATH} ]; then
|
||||||
IDF_TOOLS_PATH=${HOME}/.espressif
|
IDF_TOOLS_PATH=${HOME}/.espressif
|
||||||
@ -59,6 +52,9 @@ case ${PLATFORM} in
|
|||||||
linux-i686|linux32|Linux-i686|FreeBSD-i386)
|
linux-i686|linux32|Linux-i686|FreeBSD-i386)
|
||||||
OS=linux-i686
|
OS=linux-i686
|
||||||
;;
|
;;
|
||||||
|
Darwin-x86_64)
|
||||||
|
OS=macos
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "error: OS architecture ${PLATFORM} not supported"
|
echo "error: OS architecture ${PLATFORM} not supported"
|
||||||
exit 1
|
exit 1
|
||||||
@ -141,6 +137,13 @@ install_qemu()
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# qemu version depends on the version of ncurses lib
|
||||||
|
if [ "$(ldconfig -p | grep libncursesw.so.6)" != "" ]; then
|
||||||
|
ESP32_QEMU_VERSION="esp-develop-20220203"
|
||||||
|
else
|
||||||
|
ESP32_QEMU_VERSION="esp-develop-20210220"
|
||||||
|
fi
|
||||||
|
|
||||||
TOOLS_DIR=${TOOLS_PATH}/qemu-esp32/${ESP32_QEMU_VERSION}
|
TOOLS_DIR=${TOOLS_PATH}/qemu-esp32/${ESP32_QEMU_VERSION}
|
||||||
|
|
||||||
URL_PATH=https://github.com/espressif/qemu/releases/download
|
URL_PATH=https://github.com/espressif/qemu/releases/download
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user