Hello,
J'étais en train de test de flash un ATTIny85 avec mon Arduino mais j'ai été confronté à pas mal de souci sur l'upload et la compile...
Du coup je me suis fait un projet vierge et j'ai simplement mis ce bout de code :
#include <TinyWireM.h>
#include <Tiny4kOLED.h>
void setup() {
oled.begin();
oled.clear();
oled.on();
oled.setFont(FONT6X8);
}
void loop() {
oled.setCursor(0, 0);
oled.print("TEST");
}
Pourtant, même comme cela j'ai cette erreur :
FQBN: attiny:avr:ATtinyX5:clock=internal8
Using board 'ATtinyX5' from platform in folder: C:\Users\nanosss\AppData\Local\Arduino15\packages\attiny\hardware\avr\1.0.2
Using core 'arduino' from platform in folder: C:\Users\nanosss\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Detecting libraries used...
C:\Users\nanosss\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 -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=attiny25 -DF_CPU=8000000L -DARDUINO=10607 -DARDUINO_attiny -DARDUINO_ARCH_AVR -IC:\Users\nanosss\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\nanosss\AppData\Local\Arduino15\packages\attiny\hardware\avr\1.0.2\variants\tiny8 C:\Users\nanosss\AppData\Local\Temp\arduino\sketches\D5AB8B005E9610E8E6F401BD7ABDE193\sketch\ArduinoISP.ino.cpp -o nul
Alternatives for TinyWireM.h: [TinyWireM@1.1.3]
ResolveLibrary(TinyWireM.h)
-> candidates: [TinyWireM@1.1.3]
C:\Users\nanosss\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 -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=attiny25 -DF_CPU=8000000L -DARDUINO=10607 -DARDUINO_attiny -DARDUINO_ARCH_AVR -IC:\Users\nanosss\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\nanosss\AppData\Local\Arduino15\packages\attiny\hardware\avr\1.0.2\variants\tiny8 -Ic:\Users\nanosss\OneDrive\Documents\Arduino\libraries\TinyWireM C:\Users\nanosss\AppData\Local\Temp\arduino\sketches\D5AB8B005E9610E8E6F401BD7ABDE193\sketch\ArduinoISP.ino.cpp -o nul
Alternatives for Tiny4kOLED.h: [Tiny4kOLED@2.3.0]
ResolveLibrary(Tiny4kOLED.h)
-> candidates: [Tiny4kOLED@2.3.0]
C:\Users\nanosss\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 -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=attiny25 -DF_CPU=8000000L -DARDUINO=10607 -DARDUINO_attiny -DARDUINO_ARCH_AVR -IC:\Users\nanosss\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\nanosss\AppData\Local\Arduino15\packages\attiny\hardware\avr\1.0.2\variants\tiny8 -Ic:\Users\nanosss\OneDrive\Documents\Arduino\libraries\TinyWireM -Ic:\Users\nanosss\OneDrive\Documents\Arduino\libraries\Tiny4kOLED\src C:\Users\nanosss\AppData\Local\Temp\arduino\sketches\D5AB8B005E9610E8E6F401BD7ABDE193\sketch\ArduinoISP.ino.cpp -o nul
Using cached library dependencies for file: c:\Users\nanosss\OneDrive\Documents\Arduino\libraries\TinyWireM\TinyWireM.cpp
Using cached library dependencies for file: c:\Users\nanosss\OneDrive\Documents\Arduino\libraries\TinyWireM\USI_TWI_Master.cpp
Using cached library dependencies for file: c:\Users\nanosss\OneDrive\Documents\Arduino\libraries\Tiny4kOLED\src\Tiny4kOLED.cpp
Generating function prototypes...
C:\Users\nanosss\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 -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=attiny25 -DF_CPU=8000000L -DARDUINO=10607 -DARDUINO_attiny -DARDUINO_ARCH_AVR -IC:\Users\nanosss\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\nanosss\AppData\Local\Arduino15\packages\attiny\hardware\avr\1.0.2\variants\tiny8 -Ic:\Users\nanosss\OneDrive\Documents\Arduino\libraries\TinyWireM -Ic:\Users\nanosss\OneDrive\Documents\Arduino\libraries\Tiny4kOLED\src C:\Users\nanosss\AppData\Local\Temp\arduino\sketches\D5AB8B005E9610E8E6F401BD7ABDE193\sketch\ArduinoISP.ino.cpp -o C:\Users\nanosss\AppData\Local\Temp\3505269448\sketch_merged.cpp
C:\Users\nanosss\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\nanosss\AppData\Local\Temp\3505269448\sketch_merged.cpp
Compiling sketch...
"C:\\Users\\nanosss\\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 -Wno-error=narrowing -MMD -flto -mmcu=attiny25 -DF_CPU=8000000L -DARDUINO=10607 -DARDUINO_attiny -DARDUINO_ARCH_AVR "-IC:\\Users\\nanosss\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\nanosss\\AppData\\Local\\Arduino15\\packages\\attiny\\hardware\\avr\\1.0.2\\variants\\tiny8" "-Ic:\\Users\\nanosss\\OneDrive\\Documents\\Arduino\\libraries\\TinyWireM" "-Ic:\\Users\\nanosss\\OneDrive\\Documents\\Arduino\\libraries\\Tiny4kOLED\\src" "C:\\Users\\nanosss\\AppData\\Local\\Temp\\arduino\\sketches\\D5AB8B005E9610E8E6F401BD7ABDE193\\sketch\\ArduinoISP.ino.cpp" -o "C:\\Users\\nanosss\\AppData\\Local\\Temp\\arduino\\sketches\\D5AB8B005E9610E8E6F401BD7ABDE193\\sketch\\ArduinoISP.ino.cpp.o"
Compiling libraries...
Compiling library "TinyWireM"
Using previously compiled file: C:\Users\nanosss\AppData\Local\Temp\arduino\sketches\D5AB8B005E9610E8E6F401BD7ABDE193\libraries\TinyWireM\USI_TWI_Master.cpp.o
Using previously compiled file: C:\Users\nanosss\AppData\Local\Temp\arduino\sketches\D5AB8B005E9610E8E6F401BD7ABDE193\libraries\TinyWireM\TinyWireM.cpp.o
Compiling library "Tiny4kOLED"
Using previously compiled file: C:\Users\nanosss\AppData\Local\Temp\arduino\sketches\D5AB8B005E9610E8E6F401BD7ABDE193\libraries\Tiny4kOLED\Tiny4kOLED.cpp.o
Compiling core...
Using precompiled core: C:\Users\nanosss\AppData\Local\Temp\arduino\cores\attiny_avr_ATtinyX5_cpu_attiny25,clock_internal8_a561900ebe72f218e8641e245290571a\core.a
Linking everything together...
"C:\\Users\\nanosss\\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=attiny25 -o "C:\\Users\\nanosss\\AppData\\Local\\Temp\\arduino\\sketches\\D5AB8B005E9610E8E6F401BD7ABDE193/ArduinoISP.ino.elf" "C:\\Users\\nanosss\\AppData\\Local\\Temp\\arduino\\sketches\\D5AB8B005E9610E8E6F401BD7ABDE193\\sketch\\ArduinoISP.ino.cpp.o" "C:\\Users\\nanosss\\AppData\\Local\\Temp\\arduino\\sketches\\D5AB8B005E9610E8E6F401BD7ABDE193\\libraries\\TinyWireM\\TinyWireM.cpp.o" "C:\\Users\\nanosss\\AppData\\Local\\Temp\\arduino\\sketches\\D5AB8B005E9610E8E6F401BD7ABDE193\\libraries\\TinyWireM\\USI_TWI_Master.cpp.o" "C:\\Users\\nanosss\\AppData\\Local\\Temp\\arduino\\sketches\\D5AB8B005E9610E8E6F401BD7ABDE193\\libraries\\Tiny4kOLED\\Tiny4kOLED.cpp.o" "C:\\Users\\nanosss\\AppData\\Local\\Temp\\arduino\\sketches\\D5AB8B005E9610E8E6F401BD7ABDE193/..\\..\\cores\\attiny_avr_ATtinyX5_cpu_attiny25,clock_internal8_a561900ebe72f218e8641e245290571a\\core.a" "-LC:\\Users\\nanosss\\AppData\\Local\\Temp\\arduino\\sketches\\D5AB8B005E9610E8E6F401BD7ABDE193" -lm
"C:\\Users\\nanosss\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\nanosss\\AppData\\Local\\Temp\\arduino\\sketches\\D5AB8B005E9610E8E6F401BD7ABDE193/ArduinoISP.ino.elf" "C:\\Users\\nanosss\\AppData\\Local\\Temp\\arduino\\sketches\\D5AB8B005E9610E8E6F401BD7ABDE193/ArduinoISP.ino.eep"
"C:\\Users\\nanosss\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\nanosss\\AppData\\Local\\Temp\\arduino\\sketches\\D5AB8B005E9610E8E6F401BD7ABDE193/ArduinoISP.ino.elf" "C:\\Users\\nanosss\\AppData\\Local\\Temp\\arduino\\sketches\\D5AB8B005E9610E8E6F401BD7ABDE193/ArduinoISP.ino.hex"
Using library TinyWireM at version 1.1.3 in folder: C:\Users\nanosss\OneDrive\Documents\Arduino\libraries\TinyWireM
Using library Tiny4kOLED at version 2.3.0 in folder: C:\Users\nanosss\OneDrive\Documents\Arduino\libraries\Tiny4kOLED
"C:\\Users\\nanosss\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\nanosss\\AppData\\Local\\Temp\\arduino\\sketches\\D5AB8B005E9610E8E6F401BD7ABDE193/ArduinoISP.ino.elf"
Sketch too big; see https://support.arduino.cc/hc/en-us/articles/360013825179 for tips on reducing it.
Sketch uses 2682 bytes (130%) of program storage space. Maximum is 2048 bytes.
Global variables use 84 bytes (65%) of dynamic memory, leaving 44 bytes for local variables. Maximum is 128 bytes.
text section exceeds available space in board
Compilation error: text section exceeds available space in board
Je comprend alors qu'il s'agit bien un problème de place mais je ne comprend pas pourquoi certaines personnes sur internet y arrivent avec simplement ce code...
Comment faire ?
Merci