Skip to content

runtime.hardware.path should evaluate to "board platform" #1448

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

Closed
JAndrassy opened this issue Feb 17, 2022 · 9 comments
Closed

runtime.hardware.path should evaluate to "board platform" #1448

JAndrassy opened this issue Feb 17, 2022 · 9 comments

Comments

@JAndrassy
Copy link

Sloeber, plugin version 4.4.1.202202160121
Eclipse 2020-12 (4.18.0)
Linux Mint

When using customized board definitions in sketchbook's hardware folder, Sloeber evaluates runtime.hardware.path to referenced "core platform", but it should evaluate to "board platform".

The property runtime.platform.path is evaluated OK in Sloeber.

Arduino doc on global properties: https://arduino.github.io/arduino-cli/0.21/platform-specification/#global-predefined-properties

my customized boards definitions as example: https://github.com/jandrassy/my_boards

@jantje
Copy link
Member

jantje commented Feb 17, 2022

When using customized board definitions in sketchbook's hardware folder, Sloeber evaluates runtime.hardware.path to referenced "core platform",

Yes it does

allVars.put(ENV_KEY_HARDWARE_PATH, coreHardwarePath.removeLastSegments(1).toOSString());

Arduino doc on global properties: https://arduino.github.io/arduino-cli/0.21/platform-specification/#global-predefined-properties

Seems the documentation has become a bit more clear since I last read it. Seems I should do some refactoring to get the code compliant with https://arduino.github.io/arduino-cli/0.21/platform-specification/#platform-terminology

my customized boards definitions as example: https://github.com/jandrassy/my_boards

Can you describe a case where the build fails due to this issue? I'm considering to add it as a test case. in the regression tests

@JAndrassy
Copy link
Author

in my_boards/avr I use my build of arduinoOTA tool (with a timeout parameter). the path is defined in platform.txt with runtime.hardware.path

@jantje
Copy link
Member

jantje commented Feb 17, 2022

in my_boards/avr I use my build of arduinoOTA tool (with a timeout parameter). the path is defined in platform.txt with runtime.hardware.path

If this is your description of a case where the build fails due to this issue; I fear I will need a more detailed description.

@JAndrassy
Copy link
Author

JAndrassy commented Feb 17, 2022

for example property tools.arduinoOTA.cmd={runtime.hardware.path}/tools/arduinoOTA
in file /home/juraj/Documents/Arduino/hardware/my_boards/avr/platform.txt
for board from /home/juraj/Documents/Arduino/hardware/my_boards/avr/boards.txt
evaluates in Arduino IDE to /home/juraj/Documents/Arduino/hardware/my_boards/tools/arduinoOTA
but in Sloeber it evaluates to /home/juraj/eclipse/arduinoPlugin/packages/arduino/hardware/avr/tools/arduinoOTA

doc:

{runtime.hardware.path}: the absolute path of the hardware folder (i.e. the folder containing the board platform folder)

The "board platform" is the platform that defines the currently selected board (e.g. the platform that contains the board.txt the board is defined in

so by the example the {runtime.hardware.path} should evaluate to /home/juraj/Documents/Arduino/hardware/my_boards

@jantje jantje self-assigned this May 30, 2022
@jantje
Copy link
Member

jantje commented Jan 16, 2023

Based on https://arduino.github.io/arduino-cli/0.21/platform-specification/#global-predefined-properties
I would say runtime.hardware.path is the parent of runtime.platform.path

@jantje
Copy link
Member

jantje commented Jan 16, 2023

@JAndrassy can you validate the change?

@JAndrassy
Copy link
Author

it is OK
(sorry, it took me hours to build and run Sloeber from sources)

@jantje
Copy link
Member

jantje commented Jan 18, 2023

sorry, it took me hours to build and run Sloeber from sources

That is not needed as Sloeber supports github actions and these have the artifacts that are the product and the update site

@jantje
Copy link
Member

jantje commented Jan 18, 2023

Closing as fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants