-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Arduino 1.5.7 / avr-gcc 4.8.1 reports multiple:
error: variable ... must be const in order to be put into read-only section by
means of ‘__attribute__((progmem))’
The fix is to make the variable 'const'. Patch below.
What version of the product are you using? On what operating system?
glcd-v3-20111205
Arduino 1.5.7 (which includes avr-gcc 4.8.1)
OS X 10.9.4
Please provide any additional information below.
diff -wur glcd-v3-20111205/bitmaps/ArduinoIcon32.h glcd/bitmaps/ArduinoIcon32.h
--- glcd-v3-20111205/bitmaps/ArduinoIcon32.h 2011-12-05 01:50:18.000000000 +1100
+++ glcd/bitmaps/ArduinoIcon32.h 2014-07-24 20:00:37.000000000 +1000
@@ -10,7 +10,7 @@
#ifndef ArduinoIcon32_H
#define ArduinoIcon32_H
-static uint8_t ArduinoIcon32[] PROGMEM = {
+static const uint8_t ArduinoIcon32[] PROGMEM = {
34, // width
32, // height
diff -wur glcd-v3-20111205/bitmaps/ArduinoIcon32x32.h
glcd/bitmaps/ArduinoIcon32x32.h
--- glcd-v3-20111205/bitmaps/ArduinoIcon32x32.h 2011-12-05 01:50:18.000000000
+1100
+++ glcd/bitmaps/ArduinoIcon32x32.h 2014-07-24 20:02:01.000000000 +1000
@@ -8,7 +8,7 @@
#ifndef ArduinoIcon32x32_H
#define ArduinoIcon32x32_H
-static uint8_t ArduinoIcon32x32[] PROGMEM = {
+static const uint8_t ArduinoIcon32x32[] PROGMEM = {
32, // width
32, // height
diff -wur glcd-v3-20111205/bitmaps/ArduinoIcon64x32.h
glcd/bitmaps/ArduinoIcon64x32.h
--- glcd-v3-20111205/bitmaps/ArduinoIcon64x32.h 2011-12-05 01:50:18.000000000
+1100
+++ glcd/bitmaps/ArduinoIcon64x32.h 2014-07-24 20:02:06.000000000 +1000
@@ -22,7 +22,7 @@
#include <inttypes.h>
#include <avr/pgmspace.h>
-static unsigned char ArduinoIcon64x32[] PROGMEM ={
+static const unsigned char ArduinoIcon64x32[] PROGMEM ={
64, // bitmap width (arduino glcdlib format)
32, // bitmap height (arduino glcdlib format)
0x00, 0x00, 0xc0, 0x20, 0x10, 0x08, 0xc8, 0x88, 0x08, 0x08, 0x10, 0x20, 0xc0, 0x00, 0x00, 0x00,
diff -wur glcd-v3-20111205/bitmaps/ArduinoIcon64x64.h
glcd/bitmaps/ArduinoIcon64x64.h
--- glcd-v3-20111205/bitmaps/ArduinoIcon64x64.h 2011-12-05 01:50:18.000000000
+1100
+++ glcd/bitmaps/ArduinoIcon64x64.h 2014-07-24 20:02:09.000000000 +1000
@@ -8,7 +8,7 @@
#ifndef ArduinoIcon64x64_H
#define ArduinoIcon64x64_H
-static uint8_t ArduinoIcon64x64[] PROGMEM = {
+static const uint8_t ArduinoIcon64x64[] PROGMEM = {
64, // width
64, // height
diff -wur glcd-v3-20111205/bitmaps/ArduinoIcon96x32.h
glcd/bitmaps/ArduinoIcon96x32.h
--- glcd-v3-20111205/bitmaps/ArduinoIcon96x32.h 2011-12-05 01:50:18.000000000
+1100
+++ glcd/bitmaps/ArduinoIcon96x32.h 2014-07-24 20:02:14.000000000 +1000
@@ -13,7 +13,7 @@
#ifndef ArduinoIcon96x32_H
#define ArduinoIcon96x32_H
-static unsigned char ArduinoIcon96x32[] PROGMEM={
+static const unsigned char ArduinoIcon96x32[] PROGMEM={
96, // width
32, //height
0x00, 0x00, 0xc0, 0x20, 0x10, 0x08, 0xc8, 0x88, 0x08, 0x08, 0x10, 0x20, 0xc0, 0x00, 0x00, 0x00,
diff -wur glcd-v3-20111205/fonts/Arial14.h glcd/fonts/Arial14.h
--- glcd-v3-20111205/fonts/Arial14.h 2011-12-05 01:50:16.000000000 +1100
+++ glcd/fonts/Arial14.h 2014-07-24 19:59:00.000000000 +1000
@@ -52,7 +52,7 @@
#define Arial14 Arial_14
-static uint8_t Arial_14[] PROGMEM = {
+static const uint8_t Arial_14[] PROGMEM = {
0x1E, 0x6C, // size
0x0A, // width
0x0E, // height
diff -wur glcd-v3-20111205/fonts/Arial_bold_14.h glcd/fonts/Arial_bold_14.h
--- glcd-v3-20111205/fonts/Arial_bold_14.h 2011-12-05 01:50:16.000000000 +1100
+++ glcd/fonts/Arial_bold_14.h 2014-07-24 19:59:00.000000000 +1000
@@ -45,7 +45,7 @@
#define ARIAL_BOLD_14_WIDTH 10
#define ARIAL_BOLD_14_HEIGHT 14
-static uint8_t Arial_bold_14[] PROGMEM = {
+static const uint8_t Arial_bold_14[] PROGMEM = {
0x22, 0x08, // size
0x0A, // width
0x0E, // height
diff -wur glcd-v3-20111205/fonts/Corsiva_12.h glcd/fonts/Corsiva_12.h
--- glcd-v3-20111205/fonts/Corsiva_12.h 2011-12-05 01:50:16.000000000 +1100
+++ glcd/fonts/Corsiva_12.h 2014-07-24 19:59:00.000000000 +1000
@@ -45,7 +45,7 @@
#define CORSIVA_12_WIDTH 10
#define CORSIVA_12_HEIGHT 11
-static uint8_t Corsiva_12[] PROGMEM = {
+static const uint8_t Corsiva_12[] PROGMEM = {
0x16, 0x3A, // size
0x0A, // width
0x0B, // height
diff -wur glcd-v3-20111205/fonts/SystemFont5x7.h glcd/fonts/SystemFont5x7.h
--- glcd-v3-20111205/fonts/SystemFont5x7.h 2011-12-05 01:50:16.000000000 +1100
+++ glcd/fonts/SystemFont5x7.h 2014-07-24 19:58:50.000000000 +1000
@@ -45,7 +45,7 @@
#define SystemFont5x7 System5x7
-static uint8_t System5x7[] PROGMEM = {
+static const uint8_t System5x7[] PROGMEM = {
0x0, 0x0, // size of zero indicates fixed width font, actual length is width * height
0x05, // width
0x07, // height
diff -wur glcd-v3-20111205/fonts/Verdana_digits_24.h
glcd/fonts/Verdana_digits_24.h
--- glcd-v3-20111205/fonts/Verdana_digits_24.h 2011-12-05 01:50:16.000000000
+1100
+++ glcd/fonts/Verdana_digits_24.h 2014-07-24 19:58:55.000000000 +1000
@@ -46,7 +46,7 @@
#define VERDANA24_WIDTH 10
#define VERDANA24_HEIGHT 24
-static uint8_t Verdana24[] PROGMEM = {
+static const uint8_t Verdana24[] PROGMEM = {
0x0E, 0xF9, // size
0x0A, // width
0x18, // height
diff -wur glcd-v3-20111205/fonts/fixednums15x31.h glcd/fonts/fixednums15x31.h
--- glcd-v3-20111205/fonts/fixednums15x31.h 2011-12-05 01:50:16.000000000 +1100
+++ glcd/fonts/fixednums15x31.h 2014-07-24 19:59:00.000000000 +1000
@@ -20,7 +20,7 @@
#include <avr/pgmspace.h>
-static uint8_t fixednums15x31[] PROGMEM = {
+static const uint8_t fixednums15x31[] PROGMEM = {
0x0, 0x0, // size of zero indicates fixed width font
15, // width
31, // height
diff -wur glcd-v3-20111205/fonts/fixednums7x15.h glcd/fonts/fixednums7x15.h
--- glcd-v3-20111205/fonts/fixednums7x15.h 2011-12-05 01:50:16.000000000 +1100
+++ glcd/fonts/fixednums7x15.h 2014-07-24 19:59:00.000000000 +1000
@@ -18,7 +18,7 @@
#include <avr/pgmspace.h>
-static uint8_t fixednums7x15[] PROGMEM = {
+static const uint8_t fixednums7x15[] PROGMEM = {
0x0, 0x0, // size of zero indicates fixed width font
7, // width
15, // height
diff -wur glcd-v3-20111205/fonts/fixednums8x16.h glcd/fonts/fixednums8x16.h
--- glcd-v3-20111205/fonts/fixednums8x16.h 2011-12-05 01:50:16.000000000 +1100
+++ glcd/fonts/fixednums8x16.h 2014-07-24 19:58:44.000000000 +1000
@@ -23,7 +23,7 @@
#include <avr/pgmspace.h>
-static uint8_t fixednums8x16[] PROGMEM = {
+static const uint8_t fixednums8x16[] PROGMEM = {
0x0, 0x0, // size of zero indicates fixed width font
8, // width
15, // height
Original issue reported on code.google.com by [email protected]
on 24 Jul 2014 at 10:13