Skip to content
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

Report board platform and build platform on compile JSON output #1608

Merged
merged 2 commits into from
Dec 29, 2021

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Dec 29, 2021

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • What kind of change does this PR introduce?
    Added two fields board_platform and build_platform in the compile JSON output.

board_platform is the platform where the board is defined.
build_platform is the platform used to build the sketch (it may be different if the board_platform reference a core from another platform)

$ arduino-cli compile -b arduino:avr:uno --format json
{
  "compiler_out": "Sketch uses 2406 bytes (7%) of program storage space. Maximum is 32256 bytes.\nGlobal variables use 1212 bytes (59%) of dynamic memory, leaving 836 bytes for local variables. Maximum is 2048 bytes.\n",
  "compiler_err": "",
  "builder_result": {
    "build_path": "/tmp/arduino-sketch-3A27009D252C3EBEA95BE31BD605BF0D",
    "executable_sections_size": [
      {
        "name": "text",
        "size": 2406,
        "max_size": 32256
      },
      {
        "name": "data",
        "size": 1212,
        "max_size": 2048
      }
    ],
    "board_platform": {
      "id": "arduino:avr",
      "version": "1.8.4"
    },
    "build_platform": {
      "id": "arduino:avr",
      "version": "1.8.4"
    }
  },
  "success": true
}
  • Other information:
    Slightly refactored the way commands.Compile returns the result.

@cmaglie cmaglie merged commit 4506bf9 into arduino:master Dec 29, 2021
@cmaglie cmaglie deleted the increase_compile_json_output branch December 29, 2021 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants