Skip to content

Commit 040d12d

Browse files
authored
fix: changing regex patterns for toolchains (#853)
1 parent 7ed1e5f commit 040d12d

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

bundles/com.espressif.idf.core/plugin.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -246,55 +246,55 @@ config-only component and an interface library is created instead."
246246
<extension point="com.espressif.idf.core.toolchain">
247247
<ToolChain
248248
arch="xtensa"
249-
compilerPattern="xtensa-esp32-elf-gcc(\.exe)?"
249+
compilerPattern="xtensa-esp32-elf[\\/]+bin[\\/]+xtensa-esp32-elf-gcc(?:\.exe)?$"
250250
debuggerPattern="xtensa-esp32-elf-gdb(\.exe)?"
251251
fileName="toolchain-esp32.cmake"
252252
id="xtensa-esp32-elf"
253253
name="esp32">
254254
</ToolChain>
255255
<ToolChain
256256
arch="xtensa"
257-
compilerPattern="xtensa-esp32s2-elf-gcc(\.exe)?"
257+
compilerPattern="xtensa-esp32s2-elf[\\/]+bin[\\/]+xtensa-esp32s2-elf-gcc(?:\.exe)?$"
258258
debuggerPattern="xtensa-esp32s2-elf-gdb(\.exe)?"
259259
fileName="toolchain-esp32s2.cmake"
260260
id="xtensa-esp32s2-elf"
261261
name="esp32s2">
262262
</ToolChain>
263263
<ToolChain
264264
arch="xtensa"
265-
compilerPattern="xtensa-esp32s3-elf-gcc(\.exe)?"
265+
compilerPattern="xtensa-esp32s3-elf[\\/]+bin[\\/]+xtensa-esp32s3-elf-gcc(?:\.exe)?$"
266266
debuggerPattern="xtensa-esp32s3-elf-gdb(\.exe)?"
267267
fileName="toolchain-esp32s3.cmake"
268268
id="xtensa-esp32s3-elf"
269269
name="esp32s3">
270270
</ToolChain>
271271
<ToolChain
272272
arch="riscv32"
273-
compilerPattern="riscv32-esp-elf-gcc(\.exe)?"
273+
compilerPattern="riscv32-esp-elf[\\/]+bin[\\/]+riscv32-esp-elf-gcc(?:\.exe)?$"
274274
debuggerPattern="riscv32-esp-elf-gdb(\.exe)?"
275275
fileName="toolchain-esp32c2.cmake"
276276
id="riscv32-esp-elf"
277277
name="esp32c2">
278278
</ToolChain>
279279
<ToolChain
280280
arch="riscv32"
281-
compilerPattern="riscv32-esp-elf-gcc(\.exe)?"
281+
compilerPattern="riscv32-esp-elf[\\/]+bin[\\/]+riscv32-esp-elf-gcc(?:\.exe)?$"
282282
debuggerPattern="riscv32-esp-elf-gdb(\.exe)?"
283283
fileName="toolchain-esp32c3.cmake"
284284
id="riscv32-esp-elf"
285285
name="esp32c3">
286286
</ToolChain>
287287
<ToolChain
288288
arch="riscv32"
289-
compilerPattern="riscv32-esp-elf-gcc(\.exe)?"
289+
compilerPattern="riscv32-esp-elf[\\/]+bin[\\/]+riscv32-esp-elf-gcc(?:\.exe)?$"
290290
debuggerPattern="riscv32-esp-elf-gdb(\.exe)?"
291291
fileName="toolchain-esp32c6.cmake"
292292
id="riscv32-esp-elf"
293293
name="esp32c6">
294294
</ToolChain>
295295
<ToolChain
296296
arch="riscv32"
297-
compilerPattern="riscv32-esp-elf-gcc(\.exe)?"
297+
compilerPattern="riscv32-esp-elf[\\/]+bin[\\/]+riscv32-esp-elf-gcc(?:\.exe)?$"
298298
debuggerPattern="riscv32-esp-elf-gdb(\.exe)?"
299299
fileName="toolchain-esp32h2.cmake"
300300
id="riscv32-esp-elf"

bundles/com.espressif.idf.core/src/com/espressif/idf/core/toolchain/ESPToolChainManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ private File findMatchingFile(Path dir, String filePattern)
183183
{
184184
if (Files.isRegularFile(file))
185185
{
186-
Matcher matcher = pattern.matcher(file.getFileName().toString());
187-
if (matcher.matches())
186+
Matcher matcher = pattern.matcher(file.toAbsolutePath().toString());
187+
if (matcher.find())
188188
{
189189
return file.toFile();
190190
}

0 commit comments

Comments
 (0)