Unverified Commit 79b83505 authored by per1234's avatar per1234 Committed by GitHub

feat(tools):Use Windows native path separator in ESP_SR model copy command pattern (#9649)

* fix(platform): Use Win path separator in ESP_SR 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.

* fix(release): Remove windows path to libs when releasing

---------
Co-authored-by: default avatarme-no-dev <hristo@espressif.com>
parent 55e340ce
...@@ -221,6 +221,7 @@ RVTC_NEW_NAME="esp-rv32" ...@@ -221,6 +221,7 @@ RVTC_NEW_NAME="esp-rv32"
echo "Generating platform.txt..." echo "Generating platform.txt..."
cat "$GITHUB_WORKSPACE/platform.txt" | \ cat "$GITHUB_WORKSPACE/platform.txt" | \
sed "s/version=.*/version=$RELEASE_TAG/g" | \ sed "s/version=.*/version=$RELEASE_TAG/g" | \
sed 's/tools\.esp32-arduino-libs\.path\.windows=.*//g' | \
sed 's/{runtime\.platform\.path}.tools.esp32-arduino-libs/\{runtime.tools.esp32-arduino-libs.path\}/g' | \ sed 's/{runtime\.platform\.path}.tools.esp32-arduino-libs/\{runtime.tools.esp32-arduino-libs.path\}/g' | \
sed 's/{runtime\.platform\.path}.tools.xtensa-esp-elf-gdb/\{runtime.tools.xtensa-esp-elf-gdb.path\}/g' | \ sed 's/{runtime\.platform\.path}.tools.xtensa-esp-elf-gdb/\{runtime.tools.xtensa-esp-elf-gdb.path\}/g' | \
sed 's/{runtime\.platform\.path}.tools.xtensa-esp32-elf/\{runtime.tools.xtensa-esp32-elf-gcc.path\}/g' | \ sed 's/{runtime\.platform\.path}.tools.xtensa-esp32-elf/\{runtime.tools.xtensa-esp32-elf-gcc.path\}/g' | \
......
...@@ -2,6 +2,7 @@ name=ESP32 Arduino ...@@ -2,6 +2,7 @@ name=ESP32 Arduino
version=3.0.0 version=3.0.0
tools.esp32-arduino-libs.path={runtime.platform.path}/tools/esp32-arduino-libs tools.esp32-arduino-libs.path={runtime.platform.path}/tools/esp32-arduino-libs
tools.esp32-arduino-libs.path.windows={runtime.platform.path}\tools\esp32-arduino-libs
tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32-elf tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32-elf
tools.xtensa-esp32s2-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32s2-elf tools.xtensa-esp32s2-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32s2-elf
tools.xtensa-esp32s3-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32s3-elf 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/ ...@@ -30,6 +31,7 @@ compiler.path={tools.{build.tarch}-{build.target}-elf-gcc.path}/bin/
compiler.prefix={build.tarch}-{build.target}-elf- compiler.prefix={build.tarch}-{build.target}-elf-
compiler.sdk.path={tools.esp32-arduino-libs.path}/{build.mcu} compiler.sdk.path={tools.esp32-arduino-libs.path}/{build.mcu}
compiler.sdk.path.windows={tools.esp32-arduino-libs.path}\{build.mcu}
# EXPERIMENTAL feature: optimization flags # EXPERIMENTAL feature: optimization flags
# - this is alpha and may be subject to change without notice # - this is alpha and may be subject to change without notice
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment