Hi,
I am getting error messages when trying to verify or upload the sketch for the flora-board. Any suggestions?
Jan Barten
Error messages:
Arduino: 1.6.5 (Mac OS X), Board:"ATtiny, ATtiny45, 1 MHz (internal)"
In file included from main.h:1:0,
from TVB.pde:33:
TVB:78: error: variable 'NApowerCodes' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
TVB:79: error: variable 'EUpowerCodes' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
TVB.pde: In function 'void xmitCodeElement(uint16_t, uint16_t, uint8_t)':
TVB:87: error: 'TCNT2' was not declared in this scope
TVB:92: error: 'TCCR2A' was not declared in this scope
In file included from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h:99:0,
from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h:88,
from main.h:1,
from TVB.pde:33:
TVB:92: error: 'COM2A0' was not declared in this scope
TVB:92: error: 'COM2B1' was not declared in this scope
TVB:92: error: 'WGM21' was not declared in this scope
TVB:92: error: 'WGM20' was not declared in this scope
TVB:93: error: 'TCCR2B' was not declared in this scope
In file included from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/io.h:99:0,
from /Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/pgmspace.h:88,
from main.h:1,
from TVB.pde:33:
TVB:93: error: 'WGM22' was not declared in this scope
TVB:93: error: 'CS21' was not declared in this scope
TVB:106: error: 'TCCR2A' was not declared in this scope
TVB:107: error: 'TCCR2B' was not declared in this scope
TVB.pde: In function 'void setup()':
TVB:189: error: 'Serial' was not declared in this scope
TVB:191: error: 'TCCR2A' was not declared in this scope
TVB:192: error: 'TCCR2B' was not declared in this scope
In file included from TVB.pde:33:0:
TVB.pde: In function 'void sendAllCodes()':
TVB:43: error: 'Serial' was not declared in this scope
main.h:25:37: note: in definition of macro 'DEBUGP'
#define DEBUGP(x) if (DEBUG == 1) { x ; }
^
TVB.pde:256:12: note: in expansion of macro 'putstring'
TVB:43: error: 'Serial' was not declared in this scope
main.h:25:37: note: in definition of macro 'DEBUGP'
#define DEBUGP(x) if (DEBUG == 1) { x ; }
^
TVB.pde:268:12: note: in expansion of macro 'putstring'
TVB:274: error: 'OCR2A' was not declared in this scope
TVB:275: error: 'OCR2B' was not declared in this scope
In file included from TVB.pde:33:0:
TVB:43: error: 'Serial' was not declared in this scope
main.h:25:37: note: in definition of macro 'DEBUGP'
#define DEBUGP(x) if (DEBUG == 1) { x ; }
^
TVB.pde:278:12: note: in expansion of macro 'putstring'
TVB:43: error: 'Serial' was not declared in this scope
main.h:25:37: note: in definition of macro 'DEBUGP'
#define DEBUGP(x) if (DEBUG == 1) { x ; }
^
TVB.pde:282:5: note: in expansion of macro 'putstring'
TVB:43: error: 'Serial' was not declared in this scope
main.h:25:37: note: in definition of macro 'DEBUGP'
#define DEBUGP(x) if (DEBUG == 1) { x ; }
^
TVB.pde:288:12: note: in expansion of macro 'putstring'
TVB:43: error: 'Serial' was not declared in this scope
main.h:25:37: note: in definition of macro 'DEBUGP'
#define DEBUGP(x) if (DEBUG == 1) { x ; }
^
TVB.pde:294:12: note: in expansion of macro 'putstring'
variable 'NApowerCodes' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
Flora - Having trouble uploading sketch
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- plainclothescivilian
- Posts: 1
- Joined: Mon Nov 26, 2018 2:15 pm
Re: Flora - Having trouble uploading sketch
Did you ever find a solution to this problem?
I've been getting about the same result with the trinket.
I've been getting about the same result with the trinket.
- janbarten
- Posts: 12
- Joined: Tue Dec 02, 2014 7:01 pm
Re: Flora - Having trouble uploading sketch
It seems that u need an earlier version of the arduino ide. I would suggest Arduino IDE version 1.0.2
- adafruit_support_carter
- Posts: 29473
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Flora - Having trouble uploading sketch
You need to choose the correct board - choose "Adafruit Flora" from the boards list:Arduino: 1.6.5 (Mac OS X), Board:"ATtiny, ATtiny45, 1 MHz (internal)"
https://learn.adafruit.com/getting-star ... nboard-led
It would also be a good idea to upgrade your Arduino IDE to the latest version. I just tested uploading the blink example using Arduino 1.8.8 and it worked fine.
- janbarten
- Posts: 12
- Joined: Tue Dec 02, 2014 7:01 pm
Re: Flora - Having trouble uploading sketch
Did so accordingly.
Got the following error message:
Arduino:1.8.8 (Mac OS X), Board:"Adafruit Flora"
In file included from /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h:28:0,
from sketch/FloraTVB.pde.cpp:1:
FloraTVB:84:30: error: variable 'NApowerCodes' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
extern PGM_P *NApowerCodes[] PROGMEM;
^
FloraTVB:85:30: error: variable 'EUpowerCodes' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
extern PGM_P *EUpowerCodes[] PROGMEM;
^
exit status 1
variable 'NApowerCodes' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
Got the following error message:
Arduino:1.8.8 (Mac OS X), Board:"Adafruit Flora"
In file included from /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h:28:0,
from sketch/FloraTVB.pde.cpp:1:
FloraTVB:84:30: error: variable 'NApowerCodes' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
extern PGM_P *NApowerCodes[] PROGMEM;
^
FloraTVB:85:30: error: variable 'EUpowerCodes' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
extern PGM_P *EUpowerCodes[] PROGMEM;
^
exit status 1
variable 'NApowerCodes' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
- adafruit_support_carter
- Posts: 29473
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Flora - Having trouble uploading sketch
It may have something to with that sketch. First try the blink example to make sure your basic setup is working.
https://learn.adafruit.com/getting-star ... nboard-led
https://learn.adafruit.com/getting-star ... nboard-led
- janbarten
- Posts: 12
- Joined: Tue Dec 02, 2014 7:01 pm
Re: Flora - Having trouble uploading sketch
its the original sketch dowloaded from the adafruit github repository
- adafruit_support_carter
- Posts: 29473
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Flora - Having trouble uploading sketch
It looks like maybe the TV-B-Gone sketch?
https://learn.adafruit.com/getting-star ... nboard-led
Try the blink sketch first. It's much simpler and will let us know your basic setup is working OK. The source code listing is on the page linked:In file included from /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h:28:0,
from sketch/FloraTVB.pde.cpp:1:
https://learn.adafruit.com/getting-star ... nboard-led
- janbarten
- Posts: 12
- Joined: Tue Dec 02, 2014 7:01 pm
Re: Flora - Having trouble uploading sketch
The Adafruit TV Bgone sketch won't compile. That' s before uploading.
Uploading the blink sketch is no problem.
I tried the older Arduino IDE and that will compile....
Uploading the blink sketch is no problem.
I tried the older Arduino IDE and that will compile....
- adafruit2
- Posts: 22194
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Flora - Having trouble uploading sketch
i fixed the code, new code is here
https://github.com/adafruit/Adafruit_Le ... _TV_B_Gone
https://github.com/adafruit/Adafruit_Le ... _TV_B_Gone
Please be positive and constructive with your questions and comments.