Bonjour,
Quand je veux compiler mon programme pour l'envoyer sur mon attiny85 avec un arduino comme ISP, l'ide me met une erreur de compilation :
Le programme fait 5148 kb une fois compilé.Code:c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr25/crttn85.o:(.init9+0x2): relocation truncated to fit: R_AVR_13_PCREL against symbol `exit' defined in .fini9 section in c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/avr25\libgcc.a(_exit.o)
Le programme marche bien car il fonctionne parfaitement quand je le met sur un arduino nano, uno ou mega.
L'attiny85 marche aussi : j'ai réussi à faire clignoter un led.
(j'utilise la bibliothèque VirtualWire.h dans le programme)
Comment réglé ce problème ? merci
Je pense que si sa marche bien avec un autre programme sa doit venir de ce programme mais je ne sait pas où
Le programme est :
Code:#include <VirtualWire.h> byte message[VW_MAX_MESSAGE_LEN]; byte messageLength = VW_MAX_MESSAGE_LEN; String ordre; int delai = 0; void setup(){ vw_setup(2000); //bps vw_rx_start(); pinMode(3, OUTPUT); } void loop(){ ordre=""; if (vw_get_message(message, &messageLength)){ for (int i = 0; i < messageLength; i++){ char c = message[i]; ordre += c; } if (ordre=="0010") { if (delai>10) { digitalWrite(3, LOW); delai=0; } delai=delai+1; } else if (ordre=="0011") { digitalWrite(3, HIGH); delai=0; } } }
-----