@@ -56,7 +56,7 @@ def configure_default_packages(self, variables, targets):
5656 "board_build.core" , board_config .get ("build.core" , "arduino" )
5757 ).lower ()
5858
59- if len ( frameworks ) == 1 and "arduino" in frameworks and build_core == "esp32" :
59+ if frameworks == [ "arduino" ] and build_core == "esp32" :
6060 # In case the upstream Arduino framework is specified in the configuration
6161 # file then we need to dynamically extract toolchain versions from the
6262 # Arduino index file. This feature can be disabled via a special option:
@@ -93,6 +93,17 @@ def configure_default_packages(self, variables, targets):
9393 sys .exit (1 )
9494
9595 if "espidf" in frameworks :
96+ if frameworks == ["espidf" ]:
97+ # Starting from v12, Espressif's toolchains are shipped without
98+ # bundled GDB. Instead, it's distributed as separate packages for Xtensa
99+ # and RISC-V targets. Currently only IDF depends on the latest toolchain
100+ for gdb_package in ("tool-xtensa-esp-elf-gdb" , "tool-riscv32-esp-elf-gdb" ):
101+ self .packages [gdb_package ]["optional" ] = False
102+ if IS_WINDOWS :
103+ # Note: On Windows GDB v12 is not able to
104+ # launch a GDB server in pipe mode while v11 works fine
105+ self .packages [gdb_package ]["version" ] = "~11.2.0"
106+
96107 # Common packages for IDF and mixed Arduino+IDF projects
97108 for p in self .packages :
98109 if p in ("tool-cmake" , "tool-ninja" , "toolchain-esp32ulp" ):
@@ -113,6 +124,11 @@ def configure_default_packages(self, variables, targets):
113124 ):
114125 self .packages ["toolchain-%s" % target ]["version" ] = "12.2.0+20230208"
115126
127+ if "arduino" in frameworks :
128+ # Disable standalone GDB packages for Arduino and Arduino/IDF projects
129+ for gdb_package in ("tool-xtensa-esp-elf-gdb" , "tool-riscv32-esp-elf-gdb" ):
130+ self .packages .pop (gdb_package , None )
131+
116132 for available_mcu in ("esp32" , "esp32s2" , "esp32s3" ):
117133 if available_mcu == mcu :
118134 self .packages ["toolchain-xtensa-%s" % mcu ]["optional" ] = False
0 commit comments