Flora - Having trouble uploading sketch

Get help and show off your TV-B-Gone kit!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
janbarten
 
Posts: 12
Joined: Tue Dec 02, 2014 7:01 pm

Flora - Having trouble uploading sketch

Post by janbarten »

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

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

Re: Flora - Having trouble uploading sketch

Post by plainclothescivilian »

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

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

Re: Flora - Having trouble uploading sketch

Post by janbarten »

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

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Flora - Having trouble uploading sketch

Post by adafruit_support_carter »

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.

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

Re: Flora - Having trouble uploading sketch

Post by janbarten »

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

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Flora - Having trouble uploading sketch

Post by adafruit_support_carter »

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

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

Re: Flora - Having trouble uploading sketch

Post by janbarten »

its the original sketch dowloaded from the adafruit github repository

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Flora - Having trouble uploading sketch

Post by adafruit_support_carter »

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

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

Re: Flora - Having trouble uploading sketch

Post by janbarten »

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

User avatar
adafruit2
 
Posts: 22111
Joined: Fri Mar 11, 2005 7:36 pm

Re: Flora - Having trouble uploading sketch

Post by adafruit2 »


Locked
Please be positive and constructive with your questions and comments.

Return to “TV-B-Gone Kit”