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

Print FQBN in verbose compile output #2134

Merged
merged 4 commits into from
Mar 31, 2023
Merged

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Mar 29, 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?

Prints the FQBN at the beginning of the verbose compile output.
This is useful when compiling from the Arduino IDE to easily get an FQBN suitable for the arduino-cli.

What is the current behavior?

What is the new behavior?

$ arduino-cli compile -b arduino:avr:mega:cpu=atmega1280 -v
FQBN: arduino:avr:mega:cpu=atmega1280
Utilizzo della scheda 'mega' dalla piattaforma nella cartella: /home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6
Utilizzo del core 'arduino' dalla piattaforma nella cartella: /home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6

Rilevamento delle librerie utilizzate in corso...
/home/megabug/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega1280 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA -DARDUINO_ARCH_AVR -I/home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6/variants/mega /tmp/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/sketch/Blink.ino.cpp -o /dev/null
Alternative per Wire.h: [Wire@1.0]
ResolveLibrary(Wire.h)
  -> candidati: [Wire@1.0]
/home/megabug/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega1280 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA -DARDUINO_ARCH_AVR -I/home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6/variants/mega -I/home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6/libraries/Wire/src /tmp/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/sketch/Blink.ino.cpp -o /dev/null
...

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

Other information

Fix #2117

@cmaglie cmaglie added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Mar 29, 2023
@cmaglie cmaglie self-assigned this Mar 29, 2023
@codecov
Copy link

codecov bot commented Mar 29, 2023

Codecov Report

Patch coverage: 78.12% and project coverage change: +0.03 🎉

Comparison is base (5a67f3b) 62.62% compared to head (532f3fd) 62.65%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2134      +/-   ##
==========================================
+ Coverage   62.62%   62.65%   +0.03%     
==========================================
  Files         231      231              
  Lines       19610    19648      +38     
==========================================
+ Hits        12281    12311      +30     
- Misses       6229     6234       +5     
- Partials     1100     1103       +3     
Flag Coverage Δ
unit 62.65% <78.12%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
legacy/builder/target_board_resolver.go 75.00% <55.55%> (-5.65%) ⬇️
arduino/cores/packagemanager/package_manager.go 75.24% <81.25%> (+1.58%) ⬆️
arduino/cores/fqbn.go 100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link

@ubidefeo ubidefeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FQBN is correctly printed to IDE's output.
LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate full fqbn with options and print as one of the first lines in compile output
2 participants