diff --git a/.github/scripts/install-platformio-esp32.sh b/.github/scripts/install-platformio-esp32.sh
index 0d27967bfa8..a19e11b9ae6 100755
--- a/.github/scripts/install-platformio-esp32.sh
+++ b/.github/scripts/install-platformio-esp32.sh
@@ -3,9 +3,9 @@
 export PLATFORMIO_ESP32_PATH="$HOME/.platformio/packages/framework-arduinoespressif32"
 PLATFORMIO_ESP32_URL="https://github.com/platformio/platform-espressif32.git#feature/arduino-idf-master"
 
-XTENSA32_TOOLCHAIN_VERSION="8.4.0+2021r1"
-XTENSA32S2_TOOLCHAIN_VERSION="8.4.0+2021r1"
-RISCV_TOOLCHAIN_VERSION="8.4.0+2021r1"
+XTENSA32_TOOLCHAIN_VERSION="8.4.0+2021r2-patch2"
+XTENSA32S2_TOOLCHAIN_VERSION="8.4.0+2021r2-patch2"
+RISCV_TOOLCHAIN_VERSION="8.4.0+2021r2-patch2"
 ESPTOOLPY_VERSION="~1.30100.0"
 ESPRESSIF_ORGANIZATION_NAME="espressif"