olikraus:
I found this statement in here: GCC 4.6 Release Series — Changes, New Features, and Fixes - GNU ProjectOn AVR, variables with the progmem attribute to locate data in flash memory must be qualified as const.
It seems, that PROGMEM requires "const" since gcc 4.6.x.
What an odd choice that they have made. (To break all the old code)
Seems like it should have been a warning when left off as it is obvious what the intent is.
I think my local gcc was updated from 4.5.x to 4.7.x on my last Ubuntu update to 12.10.
I think you are very brave to run the most recent avr gcc releases.
Doesn't the latest AVR stuff have knowledge about const using progmem and how to fetch the data
from progmem on its own without requiring user code to have to use progmem access routines?
I also assume, that the Windows Arduino version comes with an old gcc version. Arduino IDE for Windows will work as long as an old gcc version is shipped with it.
The latest Arduino IDE 1.0.1 also supplies its own full AVR toolset for linux.
which is currently 4.3.2
Are you using the IDE and what IDE version are you using?
If no IDE are you using -Werror ?
My suggestion is to update all GLCD v3 font definitions with the "const" keyword.
Yeah, I agree. My concern is that they will change their mind again.
I'll put it in for the next release - It will require an update to FontCreator2 as well.
I was planning on doing a quick turn release to put in Leonardo support, but I need to
get a few volunteers to test it as I don't have a Leonardo board.
The first round of testing with one person went well and it seems to work
but I want a few more people to test it before I push it out.
I've seen stuff about automatically supporting "const" to put data in progmem
so that the C code no longer has to use progmem access routines to access data stored in flash when using "const".
(I thought that was in gcc starting with 4.6)
I'm not sure what impact that would have on data still being accessed using progmem access
routines.
And also how literal character strings will work as they are normally const by default and
if the compiler now moves const variables to progemem that would seem to break things
when pointers are used, particularly since I bet "const" was not strictly used in many people's
pointer declarations.
I'll have to closely look at all the pointers in code.
--- bill