# ATTiny85 Tiny Joypad compile problems

**URL:** <https://forum.arduino.cc/t/attiny85-tiny-joypad-compile-problems/882003>\
**Category:** Programming\
**Created:** [July 5, 2021, 11:39pm UTC](https://forum.arduino.cc/t/attiny85-tiny-joypad-compile-problems/882003 "2021-07-05T23:39:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkumanchik](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@bkumanchik](https://forum.arduino.cc/u/bkumanchik)\
**Post date:** [July 5, 2021, 11:39pm UTC](https://forum.arduino.cc/t/attiny85-tiny-joypad-compile-problems/882003/1 "2021-07-05T23:39:16Z")

</div>

I have setup the **Tiny Invaders v3.1** attiny85\*\* project from here:

> **[www.tinyjoypad.com - TINYJOYPAD\_ATTINY85](https://www.tinyjoypad.com/tinyjoypad_attiny85)**
>
> HOME

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,

Any help would be appreciated, thanks

Brian

---

<div class="post-metadata">

**Author:** ![pert](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/pert/32/217111_2.png) [@pert](https://forum.arduino.cc/u/pert)\
**Post date:** [July 6, 2021, 12:28am UTC](https://forum.arduino.cc/t/attiny85-tiny-joypad-compile-problems/882003/2 "2021-07-06T00:28:19Z")

</div>

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:

> [@bkumanchik](#):
>
> Error compiling for board ATtiny25/45/85.

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!).

---

<div class="post-metadata">

**Author:** ![bkumanchik](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@bkumanchik](https://forum.arduino.cc/u/bkumanchik)\
**Post date:** [July 6, 2021, 12:49am UTC](https://forum.arduino.cc/t/attiny85-tiny-joypad-compile-problems/882003/3 "2021-07-06T00:49:38Z")

</div>

Thanks for checking, I did get it working 🙂

---

<div class="post-metadata">

**Author:** ![pert](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/pert/32/217111_2.png) [@pert](https://forum.arduino.cc/u/pert)\
**Post date:** [July 6, 2021, 1:11am UTC](https://forum.arduino.cc/t/attiny85-tiny-joypad-compile-problems/882003/4 "2021-07-06T01:11:47Z")

</div>

You're welcome. I'm glad to hear it's working now. Enjoy!  
Per

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [November 3, 2021, 1:11am UTC](https://forum.arduino.cc/t/attiny85-tiny-joypad-compile-problems/882003/5 "2021-11-03T01:11:54Z")

</div>

Closed on November 3, 2021, 1:11am UTC

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.
