I have setup the Tiny Invaders v3.1 attiny85** project from here:
but when I try to compile on my ATTiny85 I get this error:
c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: C:\Users\Brian\AppData\Local\Temp\arduino_build_735037/Tiny-invaders.ino.elf section .text' will not fit in region text'
c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: region `text' overflowed by 198 bytes
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board ATtiny25/45/85.
I can compile another one of the files from that page:
Tiny Lander attiny85
and it runs just fine, including a working OLED screen.
Seems maybe I'm missing something but the error isn't very helpful,
I agree that this error message is not very clear. This is saying that the sketch requires more flash memory than is available on the ATtiny85. The Arduino IDE usually provides a nice error message when this happens, but it is unable to do so in this particular case because the compiler errored out before the IDE had a chance to run its own check on the sketch size. So we're stuck with the more cryptic error message from the compiler.
From this:
The ATtiny25/45/85 board selection provides support for three similar ATtiny parts:
ATtiny25
ATtiny45
ATtiny85
Once you have selected Tools > Board > attiny-avr > ATtiny25/45/85 in the Arduino IDE, a custom Tools > Processor menu appears. By default, this is set to "ATtiny25", which has only 2 kB of flash memory, compared to the 8 kB of your ATtiny85. So make sure you have selected Tools > Processor > ATtiny85. I just tried compiling the sketch here and it does fit in the 8 kB (though just barely!).