From 0205e5f2fc26505363e4e0e110dd00bc97e7eae2 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 4 Sep 2017 15:15:48 +0800 Subject: [PATCH 1/6] build system: enable C++ exceptions support by default --- make/project.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/make/project.mk b/make/project.mk index ec4352cd7e..c867da358f 100644 --- a/make/project.mk +++ b/make/project.mk @@ -288,7 +288,6 @@ CXXFLAGS ?= EXTRA_CXXFLAGS ?= CXXFLAGS := $(strip \ -std=gnu++11 \ - -fno-exceptions \ -fno-rtti \ $(OPTIMIZATION_FLAGS) $(DEBUG_FLAGS) \ $(COMMON_FLAGS) \ From 100889f12495f6a0f785a29f5dcb1ed5e6fbfd47 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 4 Sep 2017 15:16:15 +0800 Subject: [PATCH 2/6] build system: update the expected toolchain version --- make/project.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make/project.mk b/make/project.mk index c867da358f..a56025660c 100644 --- a/make/project.mk +++ b/make/project.mk @@ -493,7 +493,7 @@ TOOLCHAIN_COMMIT_DESC := $(shell $(CC) --version | sed -E -n 's|xtensa-esp32-elf TOOLCHAIN_GCC_VER := $(shell $(CC) --version | sed -E -n 's|xtensa-esp32-elf-gcc.*\ \(.*\)\ (.*)|\1|gp') # Officially supported version(s) -SUPPORTED_TOOLCHAIN_COMMIT_DESC := crosstool-NG crosstool-ng-1.22.0-61-gab8375a +SUPPORTED_TOOLCHAIN_COMMIT_DESC := crosstool-NG crosstool-ng-1.22.0-70-gfa0bad1b SUPPORTED_TOOLCHAIN_GCC_VERSIONS := 5.2.0 ifdef TOOLCHAIN_COMMIT_DESC From 5586b4b7993d22e270b843b4671d7c27747519fb Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 11 Sep 2017 15:14:07 +0800 Subject: [PATCH 3/6] Update toolchain download links --- docs/get-started/linux-setup.rst | 6 +++--- docs/get-started/macos-setup.rst | 4 ++-- docs/get-started/windows-setup-scratch.rst | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/get-started/linux-setup.rst b/docs/get-started/linux-setup.rst index 2caf323ddb..918e938e35 100644 --- a/docs/get-started/linux-setup.rst +++ b/docs/get-started/linux-setup.rst @@ -28,17 +28,17 @@ ESP32 toolchain for Linux is available for download from Espressif website: - for 64-bit Linux: - https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz + https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-70-gfa0bad1-5.2.0.tar.gz - for 32-bit Linux: - https://dl.espressif.com/dl/xtensa-esp32-elf-linux32-1.22.0-61-gab8375a-5.2.0.tar.gz + https://dl.espressif.com/dl/xtensa-esp32-elf-linux32-1.22.0-70-gfa0bad1-5.2.0.tar.gz 1. Download this file, then extract it in ``~/esp`` directory:: mkdir -p ~/esp cd ~/esp - tar -xzf ~/Downloads/xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz + tar -xzf ~/Downloads/xtensa-esp32-elf-linux64-1.22.0-70-gfa0bad1-5.2.0.tar.gz .. _setup-linux-toolchain-add-it-to-path: diff --git a/docs/get-started/macos-setup.rst b/docs/get-started/macos-setup.rst index 328e4f2255..0fdb4fc6da 100644 --- a/docs/get-started/macos-setup.rst +++ b/docs/get-started/macos-setup.rst @@ -19,13 +19,13 @@ Toolchain Setup ESP32 toolchain for macOS is available for download from Espressif website: -https://dl.espressif.com/dl/xtensa-esp32-elf-osx-1.22.0-61-gab8375a-5.2.0.tar.gz +https://dl.espressif.com/dl/xtensa-esp32-elf-osx-1.22.0-70-gfa0bad1-5.2.0.tar.gz Download this file, then extract it in ``~/esp`` directory:: mkdir -p ~/esp cd ~/esp - tar -xzf ~/Downloads/xtensa-esp32-elf-osx-1.22.0-61-gab8375a-5.2.0.tar.gz + tar -xzf ~/Downloads/xtensa-esp32-elf-osx-1.22.0-70-gfa0bad1-5.2.0.tar.gz .. _setup-macos-toolchain-add-it-to-path: diff --git a/docs/get-started/windows-setup-scratch.rst b/docs/get-started/windows-setup-scratch.rst index 435bd55511..c397e552bd 100644 --- a/docs/get-started/windows-setup-scratch.rst +++ b/docs/get-started/windows-setup-scratch.rst @@ -72,7 +72,7 @@ Alternative Setup: Just download a toolchain If you already have an MSYS2 install or want to do things differently, you can download just the toolchain here: -https://dl.espressif.com/dl/xtensa-esp32-elf-win32-1.22.0-61-gab8375a-5.2.0.zip +https://dl.espressif.com/dl/xtensa-esp32-elf-win32-1.22.0-70-gfa0bad1-5.2.0.tar.gz .. note:: From e250dbb433bf52b9349775a98cffbfe2f49f514d Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Tue, 12 Sep 2017 13:08:00 +1000 Subject: [PATCH 4/6] windows: Add workaround for "git submodule" stray output bug TW10271 --- tools/windows/windows_install_prerequisites.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/windows/windows_install_prerequisites.sh b/tools/windows/windows_install_prerequisites.sh index b4d6337682..e2a757eaa7 100644 --- a/tools/windows/windows_install_prerequisites.sh +++ b/tools/windows/windows_install_prerequisites.sh @@ -35,6 +35,10 @@ pacman --noconfirm -Syu # This step may require the terminal to be closed and re pacman --noconfirm -S --needed gettext-devel gcc git make ncurses-devel flex bison gperf vim mingw-w64-i686-python2-pip unzip winpty +# Workaround for errors when running "git submodule" commands +# See https://github.com/Alexpux/MSYS2-packages/issues/735 +rm /mingw32/bin/envsubst.exe + python -m pip install --upgrade pip pip install pyserial From 61e3a5bd16e8e4d0b6ffe26c3d8a9f2517e1d26c Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Tue, 12 Sep 2017 13:09:19 +1000 Subject: [PATCH 5/6] windows: Update toolchain & MSYS package download links --- docs/get-started/windows-setup-scratch.rst | 2 +- tools/windows/windows_install_prerequisites.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/get-started/windows-setup-scratch.rst b/docs/get-started/windows-setup-scratch.rst index c397e552bd..94f883d173 100644 --- a/docs/get-started/windows-setup-scratch.rst +++ b/docs/get-started/windows-setup-scratch.rst @@ -72,7 +72,7 @@ Alternative Setup: Just download a toolchain If you already have an MSYS2 install or want to do things differently, you can download just the toolchain here: -https://dl.espressif.com/dl/xtensa-esp32-elf-win32-1.22.0-70-gfa0bad1-5.2.0.tar.gz +https://dl.espressif.com/dl/xtensa-esp32-elf-win32-1.22.0-70-gfa0bad1-5.2.0.zip .. note:: diff --git a/tools/windows/windows_install_prerequisites.sh b/tools/windows/windows_install_prerequisites.sh index e2a757eaa7..5bdf280ee0 100644 --- a/tools/windows/windows_install_prerequisites.sh +++ b/tools/windows/windows_install_prerequisites.sh @@ -44,7 +44,7 @@ python -m pip install --upgrade pip pip install pyserial # Automatically download precompiled toolchain, unpack at /opt/xtensa-esp32-elf/ -TOOLCHAIN_ZIP=xtensa-esp32-elf-win32-1.22.0-61-gab8375a-5.2.0.zip +TOOLCHAIN_ZIP=xtensa-esp32-elf-win32-1.22.0-70-gfa0bad1-5.2.0.zip echo "Downloading precompiled toolchain ${TOOLCHAIN_ZIP}..." cd ~ curl -LO --retry 10 http://dl.espressif.com/dl/${TOOLCHAIN_ZIP} From 82fb2768aaec2bc738826ebb36c37ac26f22ef79 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Tue, 12 Sep 2017 18:50:33 +0800 Subject: [PATCH 6/6] build system: trim crosstool-ng commit ID when checking version Since 2.11.0, git does not default to 7 characters for short commit IDs, instead automatically estimating the number of characters based on repository size [1]. If the toolchain was compiled on a computer with new version of git installed, commit ID will contain 8 characters, and the check for the toolchain version will fail. As a workaround, trim the commit ID to 7 characters when checking the version. [1] https://github.com/git/git/commit/e6c587c733b4634030b353f4024794b08bc86892 --- make/project.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make/project.mk b/make/project.mk index a56025660c..b140db7145 100644 --- a/make/project.mk +++ b/make/project.mk @@ -489,11 +489,11 @@ list-components: # the part after the brackets is extracted into TOOLCHAIN_GCC_VER. ifdef CONFIG_TOOLPREFIX ifndef MAKE_RESTARTS -TOOLCHAIN_COMMIT_DESC := $(shell $(CC) --version | sed -E -n 's|xtensa-esp32-elf-gcc.*\ \(([^)]*).*|\1|gp') +TOOLCHAIN_COMMIT_DESC := $(shell $(CC) --version | sed -E -n 's|.*crosstool-ng-([0-9]+).([0-9]+).([0-9]+)-([0-9]+)-g([0-9a-f]{7}).*|\1.\2.\3-\4-g\5|gp') TOOLCHAIN_GCC_VER := $(shell $(CC) --version | sed -E -n 's|xtensa-esp32-elf-gcc.*\ \(.*\)\ (.*)|\1|gp') # Officially supported version(s) -SUPPORTED_TOOLCHAIN_COMMIT_DESC := crosstool-NG crosstool-ng-1.22.0-70-gfa0bad1b +SUPPORTED_TOOLCHAIN_COMMIT_DESC := 1.22.0-70-gfa0bad1 SUPPORTED_TOOLCHAIN_GCC_VERSIONS := 5.2.0 ifdef TOOLCHAIN_COMMIT_DESC