-
Notifications
You must be signed in to change notification settings - Fork 1k
2.8.0 breaks core reference #2445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Have you an zip to reproduce this? I don't understand what you called a custom variant? Or any Arduino documentation ? |
Unfortunately, we do not have a zip that we can share publicly. Here is the part of the platform specification that describes referencing another platform: https://arduino.github.io/arduino-cli/1.0/platform-specification/#referencing-another-core-variant-or-tool . In our %SKETCHBOOK%\hardware\MyOrg\stm32\boards.txt file we have a line similar to: myboard.build.core=STMicroelectronics:arduino Which allows us to use the ST core even though we have our own separate boards.txt. This works fine on 2.7.1, but on 2.8.0 the compile fails because the ST include path now has the {runtime.platform.path} variable in it, and the {runtime.platform.path} variable changes from "%LOCALAPPDATA%\Arduino15\packages\STMicroelectronics\hardware\stm32\2.8.0" to "%SKETCHBOOK%\hardware\MyOrg\stm32" when a board from the local platform is selected. |
Allow me to make this easier. We were able to solve the problem by replacing lines 31-33 of your platform.txt with:
|
Also, if a board listing does not specify build.vid and build.pid it will also not compile because there are no valid default values for those parameters. The comment on line 110 of platform.txt says that we should be able to omit them, but this is not the case. |
due to {runtime.platform.path} usage when other platform reference the core. - {runtime.platform.path}: The absolute path of the board platform folder (i.e. the folder containing boards.txt) - {build.core.path}: The path to the selected board's core folder (inside the core platform, for example hardware/STMicroelectronics/stm32/core/arduino) Ref: https://arduino.github.io/arduino-cli/1.0/platform-specification/#referencing-another-core-variant-or-tool Fixes stm32duino#2445 Signed-off-by: Frederic Pillon <[email protected]>
About default vid/pid, it is mentionned in this commit message:
I agree the message was not updated in platform.txt. I will update it or try to define a default ones. |
About:
I've made a PR to fix it: #2454 |
Describe the bug
When compiling an Arduino sketch for a custom variant defined in the sketchbook's /hardware/ folder, the SrcWrapper library is not found because the path to the SrcWrapper library is specified with the {runtime.platform.path} variable which points to the hardware folder in the sketchbook instead of the hardware folder in the ST package.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Libraries are found and sketch compiles.
Screenshots
None
Desktop (please complete the following information):
Board (please complete the following information):
Additional context
Line 32 of platform.txt changed the path of several includes to point to a path including the {runtime.platform.path} variable. This variable does not always point to the ST board package and thus breaks the include path for custom variants specified in the sketchbook folder.
The text was updated successfully, but these errors were encountered: