Skip to content

Global platform.txt is not supported #999

Open
@NicoHood

Description

@NicoHood

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

  1. Select File > Quit (or Arduino > Quit Arduino for macOS users) from the Arduino IDE 2.x menus.
    All Arduino IDE windows will close.
  2. 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.
  3. Create a file named platform.txt in the hardware folder.
  4. 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
    
  5. Start Arduino IDE 2.x.
  6. Select File > New Sketch from the Arduino IDE menus.
  7. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  8. Check the box next to "Show verbose output during: ☐ compile" in the "Preferences" dialog.
  9. Click the "OK" button.
    The "Preferences" dialog will close.
  10. Select Sketch > Verify/Compile from the Arduino IDE menus.
  11. Wait for the compilation to finish.
  12. 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

b9edb78

Operating system

All

Operating system version

Any

Additional context

Additional reports

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

Metadata

Metadata

Assignees

Labels

topic: codeRelated to content of the project itselftopic: documentationRelated to documentation for the projecttype: imperfectionPerceived defect in any part of project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions