@@ -56,7 +56,7 @@ def configure_default_packages(self, variables, targets):
56
56
"board_build.core" , board_config .get ("build.core" , "arduino" )
57
57
).lower ()
58
58
59
- if len ( frameworks ) == 1 and "arduino" in frameworks and build_core == "esp32" :
59
+ if frameworks == [ "arduino" ] and build_core == "esp32" :
60
60
# In case the upstream Arduino framework is specified in the configuration
61
61
# file then we need to dynamically extract toolchain versions from the
62
62
# Arduino index file. This feature can be disabled via a special option:
@@ -93,6 +93,17 @@ def configure_default_packages(self, variables, targets):
93
93
sys .exit (1 )
94
94
95
95
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
+
96
107
# Common packages for IDF and mixed Arduino+IDF projects
97
108
for p in self .packages :
98
109
if p in ("tool-cmake" , "tool-ninja" , "toolchain-esp32ulp" ):
@@ -113,6 +124,11 @@ def configure_default_packages(self, variables, targets):
113
124
):
114
125
self .packages ["toolchain-%s" % target ]["version" ] = "12.2.0+20230208"
115
126
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
+
116
132
for available_mcu in ("esp32" , "esp32s2" , "esp32s3" ):
117
133
if available_mcu == mcu :
118
134
self .packages ["toolchain-xtensa-%s" % mcu ]["optional" ] = False
0 commit comments