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

Compile extract all artifacts #687

Merged
merged 10 commits into from
May 15, 2020

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented May 6, 2020

Please check if the PR fulfills these requirements

  • The PR has no duplicates
  • 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)

What kind of change does this PR introduce?
This PR implements the suggestion from @rsora -> #675 (comment)
In short:

  • the build artifacts are now saved in the sketch/build/<FQBN>/... directory without any rename
  • all sketch.ino.* files are copied (including .map, .lst, .elf, .zip etc.)

Example:

$ pwd
/home/cmaglie/Arduino/Blink

$ ls
Blink.ino

$ arduino-cli compile -b arduino:avr:uno
Sketch uses 968 bytes (3%) of program storage space. Maximum is 32256 bytes.
Global variables use 11 bytes (0%) of dynamic memory, leaving 2037 bytes for local variables. Maximum is 2048 bytes.

$ ls
Blink.ino  build

$ ls build/
arduino.avr.uno

$ ls build/arduino.avr.uno/
Blink.ino.eep  Blink.ino.elf  Blink.ino.hex  Blink.ino.with_bootloader.hex

$ arduino-cli compile -b arduino:samd:mkr1000
Sketch uses 11204 bytes (4%) of program storage space. Maximum is 262144 bytes.
Global variables use 2368 bytes of dynamic memory.

$ ls build/
arduino.avr.uno  arduino.samd.mkr1000

$ ls build/arduino.samd.mkr1000/
Blink.ino.bin  Blink.ino.elf  Blink.ino.hex  Blink.ino.map  Blink.ino.with_bootloader.hex

$ arduino-cli compile -b arduino:samd:mkr1000 --output-dir anotherdir
Sketch uses 11204 bytes (4%) of program storage space. Maximum is 262144 bytes.
Global variables use 2368 bytes of dynamic memory.

$ ls anotherdir/
Blink.ino.bin  Blink.ino.elf  Blink.ino.hex  Blink.ino.map  Blink.ino.with_bootloader.hex

Does this PR introduce a breaking change?
The options compile --output/-o and upload --input/-i have been removed and replaced by compile --output-dir and upload --input-dir respectively.

Closes #675
Closes #655

@rsora rsora requested review from per1234 and ubidefeo May 6, 2020 15:23
@cmaglie cmaglie force-pushed the compile_extract_all_artifacts branch 3 times, most recently from f9704d4 to 252acf9 Compare May 7, 2020 20:57
@cmaglie cmaglie marked this pull request as ready for review May 8, 2020 18:42
@cmaglie cmaglie requested review from rsora and masci May 8, 2020 18:42
@cmaglie cmaglie self-assigned this May 8, 2020
@cmaglie cmaglie added this to the 0.11.0 milestone May 8, 2020
Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

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

Thanks cmaglie! I tried it out with an assortment of platforms and had no problems uploading.

@ubidefeo
Copy link

tested a bunch of boards with ESP32, ESP8266, SAMD21, ATMega32u4, ATMega328, they all worked and uploaded correctly

@rsora
Copy link
Contributor

rsora commented May 12, 2020

This PR should solve also #641 and #476

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.

I can't give feedback on code changes but the feature works and makes everything much more cleaner

@rsora
Copy link
Contributor

rsora commented May 12, 2020

This PR should also solve #673

Copy link
Contributor

@rsora rsora left a comment

Choose a reason for hiding this comment

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

Excellent! LGTM!
I have tested how this changes affects the debug feature and it's all 👍 (wih a MKRZero)

@cmaglie cmaglie force-pushed the compile_extract_all_artifacts branch from cfe70ff to 31bf766 Compare May 15, 2020 15:30
@cmaglie cmaglie merged commit ebc28e1 into arduino:master May 15, 2020
@cmaglie cmaglie deleted the compile_extract_all_artifacts branch May 15, 2020 15:50
fpistm added a commit to fpistm/Arduino_Core_STM32 that referenced this pull request Jun 29, 2020
With new arduino-cli v0.11.0, output management has changed.
See arduino/arduino-cli#687

Binaries are always copied.

Signed-off-by: Frederic Pillon <[email protected]>
fpistm added a commit to fpistm/Arduino_Core_STM32 that referenced this pull request Jun 29, 2020
With new arduino-cli v0.11.0, output management has changed.
See arduino/arduino-cli#687

Binaries are always copied.

Signed-off-by: Frederic Pillon <[email protected]>
fpistm added a commit to fpistm/Arduino_Core_STM32 that referenced this pull request Jun 30, 2020
With new arduino-cli v0.11.0, output management has changed.
See arduino/arduino-cli#687

Binaries are always copied.

Signed-off-by: Frederic Pillon <[email protected]>
fpistm added a commit to fpistm/Arduino_Core_STM32 that referenced this pull request Jul 2, 2020
With new arduino-cli v0.11.0, output management has changed.
See arduino/arduino-cli#687

Binaries are always copied.

Signed-off-by: Frederic Pillon <[email protected]>
@per1234 per1234 added the topic: code Related to content of the project itself label Mar 31, 2022
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.

4 participants