spaces-in-path for custom linker script in $PROJECT_DIR #2479
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
quick fix for a spaces-in-path error when using a linker script inside $PROJECT_DIR
lines 371~373:
https://github.com/thijses/Arduino_Core_STM32/blob/e7d39cc6ee10d52506fe8f9baff1d0479a1cda6c/tools/platformio/platformio-build.py#L371
produces (in my case) the string:
which later gets translated to a full/absolute path, where the spaces in my windows username are not accounted for.
Adding some quotes around the whole thing fixes it (on my machine).
(some of the other path strings (which include an absolute path early on) do not suffer from this issue, so i suspect that someone has already attempted to prevent spaces-in-path errors by dynamically adding quotes at some point, but has not accounted for unparsed paths ('$PROJECT_DIR') when checking for spaces.)
I came across this while trying to impement the example shown here:
https://github.com/maxgerhardt/pio-custom-stm32duino-variants