Home › Evil Mad Scientist Forums › Clock Kits › alpha Five compile errors
- This topic has 3 replies, 3 voices, and was last updated 11 years, 10 months ago by evil_one.
-
AuthorPosts
-
November 30, 2013 at 2:37 pm #20293evil_oneParticipantArduino 1:1.0.5+dfsg2-1Same errors with two install on two linux machines following wiki procedures and latest files.Any suggestions would be welcome.TimIIn file included from AlphaClock.ino:61:0:/home/down-lap/sketchbook/libraries/alphafive/fiveletterwords.h:29:35: error: variable ‘fiveLetterPosArray’ must be const in order to be put into read-only section by means of ‘__attribute__((progmem))’In file included from AlphaClock.ino:61:0:/home/down-lap/sketchbook/libraries/alphafive/fiveletterwords.h:31:24: error: variable ‘fiveLetterWords’ must be const in order to be put into read-only section by means of ‘__attribute__((progmem))’November 30, 2013 at 7:47 pm #21589Windell OskayKeymaster
The wiki does specify Arduino 1.0.3 as the required software, so that’s only *almost* following wiki procedures. ;)
In any case, I’ve downloaded 1.0.5, and I am unable to reproduce your error (at least on a Mac). The error may have to do with the underlying version of avr-libc installed on your computer.You might try opening up the file in question (fiveletterwords.h) and adding the word “const” in front of that variable definition, like so:const unsigned int fiveLetterPosArray
to see if that fixes it for you.November 30, 2013 at 9:32 pm #21590dnewmanParticipantThis is the has-gotten-to-be-standard push-me-pull-you with the PROGMEM attribute and avr-gcc. I battle this regularly myself as I go between different avr code bases which use different variations on this, each variation intended to appease some specific version of the gcc underlying avr-gcc. (If you turn on the detailed logging in the Arduino app, it’s not at all unusual to see compile time warnings relating to progrmem as Arduino library code is compiled in. But those are just warnings and not errors such as here.)
I tend to get the best mileage out of this particular incantation,const static PROGMEM unsigned int fiveLetterPosArray[] = {363, … };You might also tryprog_int16_t fiveLetterPosArray[] PROGMEM = {363, …};which is the “official” Arduino way (http://arduino.cc/en/Reference/PROGMEM). But that tends to just mean you get a warning and not an error.December 1, 2013 at 6:48 am #21591evil_oneParticipantswitched to the specified 1.0.3 and all is well.
Thank you all. -
AuthorPosts
- You must be logged in to reply to this topic.