Library 'matching' is broken for Wire

Just popped in again to try and break Arduino Create again… and looks like I succeeded! :smiley: :smiley:

Some code which worked the other week when I first joined is now not working… and it wasn’t me! :o

Basically, it looks like if I import the Wire library and have a compile target of either Arduino Uno (or Nano!)… bad things happen. Seems to be trying to import the Intel Wire library, and is complaining that it is incomplete.

Log output is attached as it appears I managed to exceed the 9000 character maximium allowed lenght of messages :fearful:

Simple sample sketch that fails miserably:

#include <Wire.h>

void setup() {
    Wire.begin();
}

void loop() {
    
}

log output.txt (9.88 KB)

Thanks for the report, I opened a bug and we will look into it as quickly as we can.

The fix is online! Sorry about this regression and please keep on breaking the Create Editor, it is really helpful for us :slight_smile:

Let us know if this happens again.

lol… no worries! Thanks for that…

Can’t fix it till you (I?!) break it… :wink:

Pete

I thought this was interesting so I tried the same program on my MEGA ADK board. On the first try, it compiled and gave a ton of output from the compile, but it finished quickly. Then I tried to upload it to the board. It compiled quickly, giving the same verbose output from the compile process, but once again it completed and started uploading to the board. 10 minutes later it was still uploading to the board! I interupted the upload. I selected the board and port again and tried to upload again. It said it couldn’t connect. I selected the board and port again and tried and this time it worked and very quickly, but it did still give very verbose output from the compile. Here is that verbose output…

Warning: platform.txt from core ‘Arduino AVR Boards’ contains deprecated recipe.preproc.macros="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {preproc.macros.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {includes} “{source_file}”, automatically converted to recipe.preproc.macros="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {preproc.macros.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {includes} “{source_file}” -o “{preprocessed_file_path}”. Consider upgrading this core.

“/opt/tools/avr-gcc/4.8.1-arduino5/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_ADK -DARDUINO_ARCH_AVR “-I/opt/cores/arduino/avr/cores/arduino” “-I/opt/cores/arduino/avr/variants/mega” “/tmp/tmp/webide_tmp728250/sketch_feb20b/sketch/sketch_feb20b.ino.cpp” -o “/dev/null”

“/opt/tools/avr-gcc/4.8.1-arduino5/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_ADK -DARDUINO_ARCH_AVR “-I/opt/cores/arduino/avr/cores/arduino” “-I/opt/cores/arduino/avr/variants/mega” “-I/opt/cores/arduino/avr/libraries/Wire” “/tmp/tmp/webide_tmp728250/sketch_feb20b/sketch/sketch_feb20b.ino.cpp” -o “/dev/null”

<… missing output in file attached…> MEGA_ADK-WireExampleOutput.txt

Using library Wire at version 1.0 in folder: /opt/cores/arduino/avr/libraries/Wire

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9801

avrdude: reading input file “C:/Users/Alex/AppData/Local/Temp/arduino-create-agent865913766/sketch_feb20b.ino.hex”

avrdude: writing flash (2348 bytes):

Writing | ################################################## | 100% 0.41s

avrdude: 2348 bytes of flash written

avrdude: verifying flash memory against C:/Users/Alex/AppData/Local/Temp/arduino-create-agent865913766/sketch_feb20b.ino.hex:

avrdude: load data flash data from input file C:/Users/Alex/AppData/Local/Temp/arduino-create-agent865913766/sketch_feb20b.ino.hex:

avrdude: input file C:/Users/Alex/AppData/Local/Temp/arduino-create-agent865913766/sketch_feb20b.ino.hex contains 2348 bytes

avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.33s

avrdude: verifying …

avrdude: 2348 bytes of flash verified

avrdude: safemode: Fuses OK (H:00, E:00, L:00)

avrdude done. Thank you.

MEGA_ADK-WireExampleOutput.txt (19.8 KB)

Every time you upload the sketch, it's compiled again. That's why you get the compilation output every time. We'll probably implement some way of caching it, in order not to compile it every time. For the beta, however, it will probably stay this way.