Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added programmer field in debug info output #2391

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

Merged
cmaglie merged 2 commits into arduino:master from cmaglie:more_debug_output
Oct 25, 2023

Conversation

Copy link
Member

@cmaglie cmaglie commented Oct 25, 2023

Please check if the PR fulfills these requirements

See how to contribute

  • 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)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

The output of debug --info --format json now has the programmer field that contains the programmer specified with the -P flag.

What is the current behavior?

~/Arduino/Blink$ arduino-cli debug -b arduino:samd:mkr1000 -P atmel_ice --info --format json
{
 "executable": "/tmp/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/Blink.ino.elf",
 "toolchain": "gcc",
 "toolchain_path": "/home/megabug/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/",
 "toolchain_prefix": "arm-none-eabi-",
 "server": "openocd",
 "server_path": "/home/megabug/.arduino15/packages/arduino/tools/openocd/0.10.0-arduino7/bin/openocd",
 "server_configuration": {
 "path": "/home/megabug/.arduino15/packages/arduino/tools/openocd/0.10.0-arduino7/bin/openocd",
 "scripts_dir": "/home/megabug/.arduino15/packages/arduino/tools/openocd/0.10.0-arduino7/share/openocd/scripts/",
 "scripts": [
 "/home/megabug/.arduino15/packages/arduino/hardware/samd/1.8.13/variants/mkr1000/openocd_scripts/arduino_zero.cfg"
 ]
 }
}

What is the new behavior?

~/Arduino/Blink$ arduino-cli debug -b arduino:samd:mkr1000 -P atmel_ice --info --format json
{
 "executable": "/tmp/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/Blink.ino.elf",
 "toolchain": "gcc",
 "toolchain_path": "/home/megabug/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/",
 "toolchain_prefix": "arm-none-eabi-",
 "server": "openocd",
 "server_path": "/home/megabug/.arduino15/packages/arduino/tools/openocd/0.10.0-arduino7/bin/openocd",
 "server_configuration": {
 "path": "/home/megabug/.arduino15/packages/arduino/tools/openocd/0.10.0-arduino7/bin/openocd",
 "scripts_dir": "/home/megabug/.arduino15/packages/arduino/tools/openocd/0.10.0-arduino7/share/openocd/scripts/",
 "scripts": [
 "/home/megabug/.arduino15/packages/arduino/hardware/samd/1.8.13/variants/mkr1000/openocd_scripts/arduino_zero.cfg"
 ]
 },
 "programmer": "atmel_ice" <-----
}

Does this PR introduce a breaking change, and is titled accordingly?

Other information

@cmaglie cmaglie self-assigned this Oct 25, 2023
@cmaglie cmaglie added type: enhancement Proposed improvement topic: CLI Related to the command line interface labels Oct 25, 2023
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ba72833) 64.48% compared to head (30bd611) 64.51%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@ Coverage Diff @@
## master #2391 +/- ##
==========================================
+ Coverage 64.48% 64.51% +0.02% 
==========================================
 Files 207 207 
 Lines 19593 19592 -1 
==========================================
+ Hits 12634 12639 +5 
+ Misses 5867 5863 -4 
+ Partials 1092 1090 -2 
Flag Coverage Δ
unit 64.51% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
commands/debug/debug_info.go 67.06% <100.00%> (+0.19%) ⬆️
internal/cli/debug/debug.go 73.68% <100.00%> (+0.19%) ⬆️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cmaglie cmaglie merged commit ef72bde into arduino:master Oct 25, 2023
@cmaglie cmaglie deleted the more_debug_output branch October 25, 2023 16:14
cmaglie added a commit that referenced this pull request Oct 26, 2023
* Added `programmer` field to debug info response
* Added integration test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@ubidefeo ubidefeo Awaiting requested review from ubidefeo

@MatteoPologruto MatteoPologruto Awaiting requested review from MatteoPologruto

2 more reviewers

@alessio-perugini alessio-perugini alessio-perugini approved these changes

@umbynos umbynos umbynos approved these changes

Reviewers whose approvals may not affect merge requirements
Labels
topic: CLI Related to the command line interface type: enhancement Proposed improvement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Debug: CLI should return programmer inside Debug Info structure upon GRPC call from IDE

AltStyle によって変換されたページ (->オリジナル) /