Description
Describe the problem
Arduino IDE 1.x supports defining platform properties for all boards platforms via a "global platform.txt
":
https://arduino.github.io/arduino-cli/dev/platform-specification/#global-platformtxt
Arduino CLI does not provide this feature.
Due to the deficiency in Arduino CLI, Arduino IDE 2.x does not provide this feature, but that deficiency is not documented in the Arduino Platform Specification.
To reproduce
- Select File > Quit (or Arduino > Quit Arduino for macOS users) from the Arduino IDE 2.x menus.
All Arduino IDE windows will close. - Create a folder named
hardware
under the Arduino IDE 2.x installation folder.- ⓘ It is necessary to create this folder because, unlike Arduino IDE 1.x, the 2.x installation does not have such a folder.
- ⓘ Arduino IDE is used for this demo because the information in the Arduino Platform Specification is specific to Arduino IDE and doesn't give any indication of how the feature might work with Arduino CLI if implemented.
- Create a file named
platform.txt
in thehardware
folder. - Add the following content to the
platform.txt
file:recipe.hooks.sketch.prebuild.42.pattern=echo hello world recipe.hooks.sketch.prebuild.42.pattern.windows=cmd /c echo hello world
- Start Arduino IDE 2.x.
- Select File > New Sketch from the Arduino IDE menus.
- Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open. - Check the box next to "Show verbose output during: ☐ compile" in the "Preferences" dialog.
- Click the "OK" button.
The "Preferences" dialog will close. - Select Sketch > Verify/Compile from the Arduino IDE menus.
- Wait for the compilation to finish.
- Examine the contents of the black "Output" panel at the bottom of the Arduino IDE window.
🐛 The output does not contain the "hello world
" message that should have been produced by the build hook defined in the global platform.txt
file.
Expected behavior
All features described in the Arduino Platform Specification work.
When a feature is not available in some versions of Arduino development tools, this must be documented in the Arduino Platform Specification.
Arduino CLI version
Original report
Not specified.
Last verified with
Operating system
All
Operating system version
Any
Additional context
Additional reports
- Global platform.txt is not supported #999 (comment)
- Global platform.txt is not supported #999 (comment)
- Global platform.txt is not supported #999 (comment)
- https://forum.arduino.cc/t/global-platform-txt-on-mac-osx/1359912
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the nightly build
- My report contains all necessary details