Overflow error when trying to upload to attiny85

i just burned bootloader onto an attinny85 board and tried to upload a quick test software to it and it gives me this error that i dont understand, help?

Arduino: 1.8.15 (Windows 10), Board: "ATtiny45/85 (Optiboot), Enabled, CPU (CPU frequency), ATtiny85, 8 MHz (internal), B.O.D. Disabled (saves power), Enabled"

c:/users/reese/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: C:\Users\Reese\AppData\Local\Temp\arduino_build_592640/TES_T.ino.elf section `.text' will not fit in region `text'

c:/users/reese/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: region `text' overflowed by 3452 bytes

collect2.exe: error: ld returned 1 exit status

exit status 1

Error compiling for board ATtiny45/85 (Optiboot).



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

and here's the code

#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define OLED_RESET 4
Adafruit_SSD1306 display (OLED_RESET);


void setup()
{
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  display.clearDisplay();
  
}

void loop()
{
  display.setTextSize(4);
  display.setTextColor(WHITE);
  display.setCursor (0,0);
  display.println("000123")
  ;display.display();

}

You've got way too much code for such a tiny controller.

There is your answer

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