robotastic / ANCS-Library

Library to handle ANCS notifications with an AVR and Nordic's nrf8001
53 stars 8 forks source link

Issues compiling the program "error: unable to find a register to spill in class 'NO_REGS'" #15

Open OliverMardle opened 6 years ago

OliverMardle commented 6 years ago

Hi, When I try to compile the example code (arcs_lcd) to the Arduino Nano I get the following errors, How do I resolve this issue?

More info! - So it looks to be an issue with the Arduino IDE version I am using which is 1.8.5. I have downloaded a copy of Arduino IDE 1.6.0 which seems to have resolved the issue with it compiling. Would it be possible if a patch could be issued to resolve the issue with version 1.8.5 or the IDE.

Best, Oliver

/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/main.cpp: In function 'main': /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/main.cpp:51:1: error: unable to find a register to spill in class 'NO_REGS' } ^ /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/main.cpp:51:1: error: this is the insn: (insn 1591 1588 1594 128 (set (mem:QI (post_dec:HI (reg/f:HI 32 __SP_L__)) [0 S1 A8]) (subreg:QI (reg/f:HI 1196) 1)) /Users/olivermardle/Documents/Arduino/libraries/ANCS-Library-master/ancs_notification_source.cpp:157 1 {pushqi1} (expr_list:REG_ARGS_SIZE (const_int 13 [0xd]) (nil))) /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/main.cpp:51: confused by earlier errors, bailing out lto-wrapper: /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-gcc returned 1 exit status /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status exit status 1 Error compiling for board Arduino Nano.

per1234 commented 6 years ago

See: https://github.com/arduino/Arduino/issues/3972