Arduino core for the tinyAVR 0/1/2-series - Ones's digit 2,4,5,7 (pincount, 8,14,20,24), tens digit 0, 1, or 2 (featureset), preceded by flash in kb. Library maintainers: porting help available!
Other
554
stars
144
forks
source link
compilation error for attiny 3216 (also with optiboot) #951
If I compile the same program for attiny 3216 (even in optiboot version), it writes these errors, see below. Could you please take a look at it or fix it? Thank you Radek.
C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_analog.c: In function 'analogWrite':
C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_analog.c:1205:13: error: 'set_inven' undeclared (first use in this function); did you mean 'strnlen'?
set_inven = 1;
^~~~~
strnlen
C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_analog.c:1205:13: note: each undeclared identifier is reported only once for each function it appears in
C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_analog.c:1307:5: error: break statement not within loop or switch
break;
^~~~~
C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_analog.c:1317:5: error: case label not within a switch statement
case NOT_ON_TIMER: /falls through/
^~~~
C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_analog.c:1318:5: error: 'default' label not within a switch statement
default:
^~~
C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_analog.c:1325:7: error: break statement not within loop or switch
break;
^~~~~
In file included from C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\api/ArduinoAPI.h:52:0,
from C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\Arduino.h:26,
from C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_private.h:32,
from C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_analog.c:25:
C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_analog.c: At top level:
C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\api/Common.h:16:26: error: expected ')' before numeric constant
define OUTPUT 1 / used for pinMode() /
^
C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_analog.c:1330:16: note: in expansion of macro 'OUTPUT'
pinMode(pin, OUTPUT);
^~
C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_analog.c:1331:1: error: expected identifier or '(' before '}' token
} // end of analogWrite
^
exit status 1
There was a compilation error with the board ATtiny3226/3216/1626/1616/1606/826/816/806/426/416/406.
Hello. If I compile a simple program for attiny 1614 in Arduino IDE 1.8.19, the compilation is fine.
void setup() { pinMode(5, OUTPUT); }
void loop() { digitalWrite(5, HIGH); delay(100); digitalWrite(5, LOW); delay(100); }
If I compile the same program for attiny 3216 (even in optiboot version), it writes these errors, see below. Could you please take a look at it or fix it? Thank you Radek.
C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_analog.c: In function 'analogWrite': C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_analog.c:1205:13: error: 'set_inven' undeclared (first use in this function); did you mean 'strnlen'? set_inven = 1; ^
~~~~ strnlen C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_analog.c:1205:13: note: each undeclared identifier is reported only once for each function it appears in C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_analog.c:1307:5: error: break statement not within loop or switch break; ^~~~~ C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_analog.c:1317:5: error: case label not within a switch statement case NOT_ON_TIMER: /falls through/ ^~~~ C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_analog.c:1318:5: error: 'default' label not within a switch statement default: ^~~ C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_analog.c:1325:7: error: break statement not within loop or switch break; ^~~~~ In file included from C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\api/ArduinoAPI.h:52:0, from C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\Arduino.h:26, from C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_private.h:32, from C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_analog.c:25: C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_analog.c: At top level: C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\api/Common.h:16:26: error: expected ')' before numeric constantdefine OUTPUT 1 / used for pinMode() /
C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_analog.c:1330:16: note: in expansion of macro 'OUTPUT' pinMode(pin, OUTPUT); ^
~C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.6.7\cores\megatinycore\wiring_analog.c:1331:1: error: expected identifier or '(' before '}' token } // end of analogWrite ^ exit status 1 There was a compilation error with the board ATtiny3226/3216/1626/1616/1606/826/816/806/426/416/406.