You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using PlatformIO 6.1.16 for project development, I encountered an issue with relative path resolution. Specifically, when using the -Wl,-static flag and relative paths to link library files, the path ./ incorrectly points to C:\Users\admin\.platformio\platforms\ststm32\builder instead of the project root directory, resulting in an error during the linking process.
Steps to Reproduce
Configure platformio.ini with the following build_flags:
2.Run the pio run command in the project root directory.
3.During the linking of firmware.elf, observe the path resolution error and subsequent linking failure.
Expected Behavior
The relative path ./ should point to the project root directory, allowing the library files to be correctly linked. Although using absolute paths can solve the issue, it is not conducive to project portability.
Actual Behavior
The relative path ./ points to C:\Users\admin\.platformio\platforms\ststm32\builder , causing the library file paths to be incorrectly resolved and the linking process to fail.
Error Log
The following error log is produced during the linking process:
*** [.pio\build\genericSTM32F103ZE\firmware.elf] Implicit dependency `C:\Users\admin\.platformio\platforms\ststm32\builder\ExternalLibs\Library1\lib1.a' not found, needed by target `.pio\build\genericSTM32F103ZE\firmware.elf'.
System Information
PlatformIO Version: 6.1.16
Operating System: Windows 10
PLATFORM: ST STM32 (17.6.0) > STM32F103ZE (64k RAM. 512k Flash)
Using absolute paths resolves the issue, but it would be preferable to use relative paths, with the relative paths correctly pointing to the project root directory.
Thank you for your support and assistance!
The text was updated successfully, but these errors were encountered:
Description
While using PlatformIO 6.1.16 for project development, I encountered an issue with relative path resolution. Specifically, when using the
-Wl,-static
flag and relative paths to link library files, the path./
incorrectly points toC:\Users\admin\.platformio\platforms\ststm32\builder
instead of the project root directory, resulting in an error during the linking process.Steps to Reproduce
platformio.ini
with the followingbuild_flags
:build_flags = -Wl,-static ./ExternalLibs/Library1/lib1.a ./ExternalLibs/Library2/lib2.a ./ExternalLibs/Library3/lib3.a ./App/Main/libmain.a
2.Run the pio run command in the project root directory.
3.During the linking of firmware.elf, observe the path resolution error and subsequent linking failure.
Expected Behavior
The relative path
./
should point to the project root directory, allowing the library files to be correctly linked. Although using absolute paths can solve the issue, it is not conducive to project portability.Actual Behavior
The relative path
./
points toC:\Users\admin\.platformio\platforms\ststm32\builder
, causing the library file paths to be incorrectly resolved and the linking process to fail.Error Log
The following error log is produced during the linking process:
*** [.pio\build\genericSTM32F103ZE\firmware.elf] Implicit dependency `C:\Users\admin\.platformio\platforms\ststm32\builder\ExternalLibs\Library1\lib1.a' not found, needed by target `.pio\build\genericSTM32F103ZE\firmware.elf'.
System Information
Additional Information
Using absolute paths resolves the issue, but it would be preferable to use relative paths, with the relative paths correctly pointing to the project root directory.
Thank you for your support and assistance!
The text was updated successfully, but these errors were encountered: