Movatterモバイル変換


[0]ホーム

URL:


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

Do not recompile the sketch if there are no changes and libraries have not changed #2204

Open
Labels
@cmaglie

Description

@cmaglie

Describe the request

If a sketch is recompiled twice in a row, the Arduino-preprocessed sketchSketch.ino.cpp is recompiled and re-linked even if not necessary.

Describe the current behavior

If you do the same compile twice in a row:

~/Arduino/Blink$ LANG=en arduino-cli compile -b arduino:avr:uno --cleanSketch uses 1636 bytes (5%) of program storage space. Maximum is 32256 bytes.Global variables use 122 bytes (5%) of dynamic memory, leaving 1926 bytes for local variables. Maximum is 2048 bytes.Used library Version Path                                                                       Wire         1.0     /home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6/libraries/WireUsed platform Version Path                                                        arduino:avr   1.8.6   /home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6~/Arduino/Blink$ LANG=en arduino-cli compile -b arduino:avr:uno -vFQBN: arduino:avr:unoUsing board 'uno' from platform in folder: /home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6Using core 'arduino' from platform in folder: /home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6Detecting libraries used...[...]Generating function prototypes...[...]Compiling sketch.../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 -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -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/standard -I/home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6/libraries/Wire/src /tmp/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/sketch/Blink.ino.cpp -o /tmp/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/sketch/Blink.ino.cpp.oCompiling libraries...Compiling library "Wire"Using previously compiled file: /tmp/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/libraries/Wire/utility/twi.c.oUsing previously compiled file: /tmp/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/libraries/Wire/Wire.cpp.oCompiling core...Using precompiled core: /tmp/arduino/cores/arduino_avr_uno_12e4cfbdc0590d50ab9cd20e50a4c3c5/core.aLinking everything together.../home/megabug/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-gcc -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o /tmp/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/Blink.ino.elf /tmp/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/sketch/Blink.ino.cpp.o /tmp/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/libraries/Wire/Wire.cpp.o /tmp/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/libraries/Wire/utility/twi.c.o /tmp/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/../../cores/arduino_avr_uno_12e4cfbdc0590d50ab9cd20e50a4c3c5/core.a -L/tmp/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3 -lm/home/megabug/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /tmp/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/Blink.ino.elf /tmp/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/Blink.ino.eep/home/megabug/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy -O ihex -R .eeprom /tmp/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/Blink.ino.elf /tmp/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/Blink.ino.hexMultiple libraries were found for "Wire.h"  Used: /home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6/libraries/Wire  Not used: /home/megabug/Workspace/Arduino_ThreadsUsing library Wire at version 1.0 in folder: /home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6/libraries/Wire /home/megabug/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-size -A /tmp/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/Blink.ino.elfSketch uses 1636 bytes (5%) of program storage space. Maximum is 32256 bytes.Global variables use 122 bytes (5%) of dynamic memory, leaving 1926 bytes for local variables. Maximum is 2048 bytes.Used library Version Path                                                                       Wire         1.0     /home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6/libraries/WireUsed platform Version Path                                                        arduino:avr   1.8.6   /home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6

🐛 The sketch fileBlink.ino.cpp is recompiled even if there are no changes.

The sketch and linking phase could be completely skipped in this particular case.

Arduino CLI version

nightly

Operating system

N/A

Operating system version

N/A

Additional context

Additional requests

Issue checklist

  • I searched for previous requests inthe issue tracker
  • I verified the feature was still missing when using thenightly build
  • My request contains all necessary details

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp