Skip to content

Commit 4e79456

Browse files
committed
Use Windows native path separator in ESP_SR model copy command pattern
Although Windows generally supports the use of the POSIX compliant slash path separator in addition to the Windows native backslash separator, in the specific use case where a path is present in a native command executed via an argument to `cmd /c` in a platform command pattern, it is mandatory to use backslash path separators. Previously, a slash path separator was used in the `tools.esp32-arduino-libs.path` and `compiler.sdk.path` platform properties, which were referenced in a `copy` command in the `cmd /c` argument part of the platform's `recipe.hooks.objcopy.postobjcopy.2.pattern.windows` command pattern. This caused compilation to fail with a "The syntax of the command is incorrect." error under the following conditions: - The compilation is performed on a Windows machine - The compiled sketch uses the ESP_SR library This is fixed by adding Windows override variants of the properties, with backslash path separators.
1 parent 50ef6f4 commit 4e79456

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

platform.txt

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name=ESP32 Arduino
22
version=3.0.0
33

44
tools.esp32-arduino-libs.path={runtime.platform.path}/tools/esp32-arduino-libs
5+
tools.esp32-arduino-libs.path.windows={runtime.platform.path}\tools\esp32-arduino-libs
56
tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32-elf
67
tools.xtensa-esp32s2-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32s2-elf
78
tools.xtensa-esp32s3-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32s3-elf
@@ -30,6 +31,7 @@ compiler.path={tools.{build.tarch}-{build.target}-elf-gcc.path}/bin/
3031
compiler.prefix={build.tarch}-{build.target}-elf-
3132

3233
compiler.sdk.path={tools.esp32-arduino-libs.path}/{build.mcu}
34+
compiler.sdk.path.windows={tools.esp32-arduino-libs.path}\{build.mcu}
3335

3436
# EXPERIMENTAL feature: optimization flags
3537
# - this is alpha and may be subject to change without notice

0 commit comments

Comments
 (0)