Open ldldr opened 6 years ago
Core?
Sorry, what do you mean by "core"?
In order to build for the ATtinyX5 family using the Arduino IDE you had to install a "core". Which one did you install?
Right: https://github.com/damellis/attiny (version 1.0.2)
Good hint. Seems to work with SpenceKonde/ATTinyCore. Why?
I'm having the same issue, and I already have SpenceKonde/ATTinyCore installed
Is the SpenceKonde/ATTinyCore selected when you build?
I also have the same issue, with SpenceKonde/ATTinyCore installed and selected
"have the same issue" cannot be true. According to ldldr, the original poster, using the SpenceKonde/ATTinyCore works.
Hi, The original post from ldldr dates back to 2018. However another user [sebasira] reported having an issue in 2022, and I have a very similar error log. Could it be that issue reappears with more recent versions of SpenceKonde/ATTinyCore? I am using version 1.5.2 (see also log below).
Using board 'attinyx5' from platform in folder: C:\Users\Guido\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.5.2 Using core 'tiny' from platform in folder: C:\Users\Guido\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.5.2 Detecting libraries used... "C:\Users\Guido\AppData\Local\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 -flto -w -x c++ -E -CC -mmcu=attiny85 -DF_CPU=8000000L -DCLOCK_SOURCE=0 -DARDUINO=10607 -DARDUINO_AVR_ATTINYX5 -DARDUINO_ARCH_AVR -DNEOPIXELPORT=PORTB "-IC:\Users\Guido\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.5.2\cores\tiny" "-IC:\Users\Guido\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.5.2\variants\tinyX5" "C:\Users\Guido\AppData\Local\Temp\arduino-sketch-E4A5EB9899A7ECCFF91B7D42D14191EC\sketch\sketch_feb2a.ino.cpp" -o nul Alternatives for TinyDebugKnockBang.h: [TinyDebugKnockBang] ResolveLibrary(TinyDebugKnockBang.h) -> candidates: [TinyDebugKnockBang] "C:\Users\Guido\AppData\Local\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 -flto -w -x c++ -E -CC -mmcu=attiny85 -DF_CPU=8000000L -DCLOCK_SOURCE=0 -DARDUINO=10607 -DARDUINO_AVR_ATTINYX5 -DARDUINO_ARCH_AVR -DNEOPIXELPORT=PORTB "-IC:\Users\Guido\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.5.2\cores\tiny" "-IC:\Users\Guido\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.5.2\variants\tinyX5" "-Ic:\Users\Guido\Documents\Arduino\libraries\TinyDebugKnockBang" "C:\Users\Guido\AppData\Local\Temp\arduino-sketch-E4A5EB9899A7ECCFF91B7D42D14191EC\sketch\sketch_feb2a.ino.cpp" -o nul "C:\Users\Guido\AppData\Local\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 -flto -w -x c++ -E -CC -mmcu=attiny85 -DF_CPU=8000000L -DCLOCK_SOURCE=0 -DARDUINO=10607 -DARDUINO_AVR_ATTINYX5 -DARDUINO_ARCH_AVR -DNEOPIXELPORT=PORTB "-IC:\Users\Guido\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.5.2\cores\tiny" "-IC:\Users\Guido\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.5.2\variants\tinyX5" "-Ic:\Users\Guido\Documents\Arduino\libraries\TinyDebugKnockBang" "c:\Users\Guido\Documents\Arduino\libraries\TinyDebugKnockBang\TinyDebugKnockBang.cpp" -o nul Generating function prototypes... "C:\Users\Guido\AppData\Local\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 -flto -w -x c++ -E -CC -mmcu=attiny85 -DF_CPU=8000000L -DCLOCK_SOURCE=0 -DARDUINO=10607 -DARDUINO_AVR_ATTINYX5 -DARDUINO_ARCH_AVR -DNEOPIXELPORT=PORTB "-IC:\Users\Guido\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.5.2\cores\tiny" "-IC:\Users\Guido\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.5.2\variants\tinyX5" "-Ic:\Users\Guido\Documents\Arduino\libraries\TinyDebugKnockBang" "C:\Users\Guido\AppData\Local\Temp\arduino-sketch-E4A5EB9899A7ECCFF91B7D42D14191EC\sketch\sketch_feb2a.ino.cpp" -o "C:\Users\Guido\AppData\Local\Temp\arduino-sketch-E4A5EB9899A7ECCFF91B7D42D14191EC\preproc\ctags_target_for_gcc_minus_e.cpp" "C:\Users\Guido\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\Guido\AppData\Local\Temp\arduino-sketch-E4A5EB9899A7ECCFF91B7D42D14191EC\preproc\ctags_target_for_gcc_minus_e.cpp" Compiling sketch... "C:\Users\Guido\AppData\Local\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 -MMD -flto -mmcu=attiny85 -DF_CPU=8000000L -DCLOCK_SOURCE=0 -DARDUINO=10607 -DARDUINO_AVR_ATTINYX5 -DARDUINO_ARCH_AVR -DNEOPIXELPORT=PORTB "-IC:\Users\Guido\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.5.2\cores\tiny" "-IC:\Users\Guido\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.5.2\variants\tinyX5" "-Ic:\Users\Guido\Documents\Arduino\libraries\TinyDebugKnockBang" "C:\Users\Guido\AppData\Local\Temp\arduino-sketch-E4A5EB9899A7ECCFF91B7D42D14191EC\sketch\sketch_feb2a.ino.cpp" -o "C:\Users\Guido\AppData\Local\Temp\arduino-sketch-E4A5EB9899A7ECCFF91B7D42D14191EC\sketch\sketch_feb2a.ino.cpp.o" Compiling libraries... Compiling library "TinyDebugKnockBang" "C:\Users\Guido\AppData\Local\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 -MMD -flto -mmcu=attiny85 -DF_CPU=8000000L -DCLOCK_SOURCE=0 -DARDUINO=10607 -DARDUINO_AVR_ATTINYX5 -DARDUINO_ARCH_AVR -DNEOPIXELPORT=PORTB "-IC:\Users\Guido\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.5.2\cores\tiny" "-IC:\Users\Guido\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.5.2\variants\tinyX5" "-Ic:\Users\Guido\Documents\Arduino\libraries\TinyDebugKnockBang" "c:\Users\Guido\Documents\Arduino\libraries\TinyDebugKnockBang\TinyDebugKnockBang.cpp" -o "C:\Users\Guido\AppData\Local\Temp\arduino-sketch-E4A5EB9899A7ECCFF91B7D42D14191EC\libraries\TinyDebugKnockBang\TinyDebugKnockBang.cpp.o" Compiling core... Using precompiled core: C:\Users\Guido\AppData\Local\Temp\arduino-core-cache\core_239b623b643e47bd02ee21189f3c12ba.a Linking everything together... "C:\Users\Guido\AppData\Local\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=attiny85 -o "C:\Users\Guido\AppData\Local\Temp\arduino-sketch-E4A5EB9899A7ECCFF91B7D42D14191EC/sketch_feb2a.ino.elf" "C:\Users\Guido\AppData\Local\Temp\arduino-sketch-E4A5EB9899A7ECCFF91B7D42D14191EC\sketch\sketch_feb2a.ino.cpp.o" "C:\Users\Guido\AppData\Local\Temp\arduino-sketch-E4A5EB9899A7ECCFF91B7D42D14191EC\libraries\TinyDebugKnockBang\TinyDebugKnockBang.cpp.o" "C:\Users\Guido\AppData\Local\Temp\arduino-sketch-E4A5EB9899A7ECCFF91B7D42D14191EC/..\arduino-core-cache\core_239b623b643e47bd02ee21189f3c12ba.a" "-LC:\Users\Guido\AppData\Local\Temp\arduino-sketch-E4A5EB9899A7ECCFF91B7D42D14191EC" -lm C:\Users\Guido\AppData\Local\Temp\cc4f4rjB.s: Assembler messages: C:\Users\Guido\AppData\Local\Temp\cc4f4rjB.s:111: Error: unknown opcode `delay_fine' C:\Users\Guido\AppData\Local\Temp\cc4f4rjB.s:113: Error: unknown opcode `delay_fine' C:\Users\Guido\AppData\Local\Temp\cc4f4rjB.s:216: Error: unknown opcode `delay_roug' C:\Users\Guido\AppData\Local\Temp\cc4f4rjB.s:219: Error: unknown opcode `delay_roug' C:\Users\Guido\AppData\Local\Temp\cc4f4rjB.s:256: Error: unknown opcode `delay_roug' C:\Users\Guido\AppData\Local\Temp\cc4f4rjB.s:259: Error: unknown opcode `delay_fine' C:\Users\Guido\AppData\Local\Temp\cc4f4rjB.s:261: Error: unknown opcode `delay_roug' lto-wrapper.exe: fatal error: C:\Users\Guido\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc returned 1 exit status compilation terminated. c:/users/guido/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: error: lto-wrapper failed collect2.exe: error: ld returned 1 exit status
Using library TinyDebugKnockBang in folder: C:\Users\Guido\Documents\Arduino\libraries\TinyDebugKnockBang (legacy) exit status 1
Compilation error: exit status 1
Consider the following code:
It fails compiling with:
The compiler only picks up the macro definitions when you call TinyDebugKnockBangClass_AssemblyMacros() from inside TinyDebugKnockBangClass::sendByte() and TinyDebugKnockBangClass::knockHello() just before the asm volatile statements, e.g.: