0

Flora - Having trouble uploading sketch
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Flora - Having trouble uploading sketch

by janbarten on Fri Nov 20, 2015 5:42 pm

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))'

janbarten
 
Posts: 12
Joined: Tue Dec 02, 2014 7:01 pm

Re: Flora - Having trouble uploading sketch

by plainclothescivilian on Wed Dec 19, 2018 11:48 pm

Did you ever find a solution to this problem?
I've been getting about the same result with the trinket.

plainclothescivilian
 
Posts: 1
Joined: Mon Nov 26, 2018 2:15 pm

Re: Flora - Having trouble uploading sketch

by janbarten on Thu Dec 20, 2018 1:28 pm

It seems that u need an earlier version of the arduino ide. I would suggest Arduino IDE version 1.0.2

janbarten
 
Posts: 12
Joined: Tue Dec 02, 2014 7:01 pm

Re: Flora - Having trouble uploading sketch

by adafruit_support_carter on Thu Dec 20, 2018 1:35 pm

Arduino: 1.6.5 (Mac OS X), Board:"ATtiny, ATtiny45, 1 MHz (internal)"


You need to choose the correct board - choose "Adafruit Flora" from the boards list:
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.

adafruit_support_carter
 
Posts: 8415
Joined: Tue Nov 29, 2016 2:45 pm

Re: Flora - Having trouble uploading sketch

by janbarten on Thu Dec 20, 2018 3:19 pm

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))'

janbarten
 
Posts: 12
Joined: Tue Dec 02, 2014 7:01 pm

Re: Flora - Having trouble uploading sketch

by adafruit_support_carter on Thu Dec 20, 2018 4:41 pm

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

adafruit_support_carter
 
Posts: 8415
Joined: Tue Nov 29, 2016 2:45 pm

Re: Flora - Having trouble uploading sketch

by janbarten on Thu Dec 20, 2018 7:18 pm

its the original sketch dowloaded from the adafruit github repository

janbarten
 
Posts: 12
Joined: Tue Dec 02, 2014 7:01 pm

Re: Flora - Having trouble uploading sketch

by adafruit_support_carter on Thu Dec 20, 2018 9:08 pm

It looks like maybe the TV-B-Gone sketch?
In file included from /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h:28:0,
from sketch/FloraTVB.pde.cpp:1:


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:
https://learn.adafruit.com/getting-star ... nboard-led

adafruit_support_carter
 
Posts: 8415
Joined: Tue Nov 29, 2016 2:45 pm

Re: Flora - Having trouble uploading sketch

by janbarten on Fri Dec 21, 2018 6:04 am

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....

janbarten
 
Posts: 12
Joined: Tue Dec 02, 2014 7:01 pm

Re: Flora - Having trouble uploading sketch

by adafruit2 on Tue Dec 25, 2018 8:56 pm


adafruit2
Site Admin
 
Posts: 17866
Joined: Fri Mar 11, 2005 7:36 pm

Please be positive and constructive with your questions and comments.