Problem with Arduino 1.8.8 vs 1.8.5?


(Shriramana Sharma) #1

Ever since getting my M01 I am using the Arduino IDE 1.8.5. Just out of curiosity I checked the Arduino site for an update and saw 1.8.8 and downloaded it. But for the appSwitch function in my sketch it is giving the following errors:

$ make flash
BOARD_HARDWARE_PATH="/home/samjnaa/bn/kbdio//hardware" /home/samjnaa/bn/kbdio//hardware/keyboardio/avr/libraries/Kaleidoscope/bin//kaleidoscope-builder flash
Building output/Model01-Firmware/Model01-Firmware (0.0.0-gv1.22-64-g9506) ...
/tmp/tmp.g0J0Va07wZ/sketch/Model01-Firmware.ino.cpp.o: In function `appSwitch(unsigned char, unsigned char)':
/home/samjnaa/bn/kbdio/sketch/Model01-Firmware.ino:370: undefined reference to `appSwitch(unsigned char, unsigned char)::__m'
/home/samjnaa/bn/kbdio/sketch/Model01-Firmware.ino:370: undefined reference to `appSwitch(unsigned char, unsigned char)::__m'
/home/samjnaa/bn/kbdio/sketch/Model01-Firmware.ino:370: undefined reference to `appSwitch(unsigned char, unsigned char)::__m'
/home/samjnaa/bn/kbdio/sketch/Model01-Firmware.ino:370: undefined reference to `appSwitch(unsigned char, unsigned char)::__m'
/home/samjnaa/bn/kbdio/sketch/Model01-Firmware.ino:370: undefined reference to `appSwitch(unsigned char, unsigned char)::__m'
/home/samjnaa/bn/kbdio/sketch/Model01-Firmware.ino:370: undefined reference to `appSwitch(unsigned char, unsigned char)::__m'
/home/samjnaa/bn/kbdio/sketch/Model01-Firmware.ino:370: undefined reference to `appSwitch(unsigned char, unsigned char)::__m'
/home/samjnaa/bn/kbdio/sketch/Model01-Firmware.ino:370: undefined reference to `appSwitch(unsigned char, unsigned char)::__m'
collect2: error: ld returned 1 exit status
exit status 1
/home/samjnaa/bn/kbdio//hardware/keyboardio/avr/build-tools/makefiles//rules.mk:80: recipe for target 'flash' failed
make: *** [flash] Error 1

However if I use Arduino 1.8.5, I do not get the above errors.


(Gergely Nagy) #2

This sounds like a linker issue… can you check what version of gcc each arduino you use shipped with?

hardware/tools/avr/bin/avr-gcc --version (relative to your Arduino install path) should give you the version.


(Shriramana Sharma) #3

Arduino 1.8.5 comes with AVR GCC 4.9.2 and Arduino 1.8.8 comes with AVR GCC 5.4.0.


(tiltowaitt) #4

I can’t offer any help, but I can say that the firmware compiles just fine for me with avr-gcc 5.4.0 and Arduino 1.8.8.


(Shriramana Sharma) #5

You mean the default firmware? Try including the appSwitch function from my sketch linked above.