prog_char does not name a type
I'm trying to reprogram an OpenBCI 8-bit board. As soon as I try to compile the OpeNBCI_8bit_SD program, I get the following errors from the Arduino IDE:
Poking around a bit, it is clear that this is a legitimate type for OpenBCI to be invoking (see this official Arduino help page: http://arduino.cc/en/Reference/PROGMEM). So, perhaps it's a problem with IDE V1.5.7 versus the latest V1.5.8. I'm downloading V1.5.8 now, but my connection is slow, so I kept digging while I wait.
SDcard.ino:58:1: error: 'prog_char' does not name a type
SDcard.ino:59:1: error: 'prog_char' does not name a type
SDcard.ino:60:1: error: 'prog_char' does not name a type
SDcard.ino:61:1: error: 'prog_char' does not name a type
SDcard.ino:62:1: error: 'prog_char' does not name a type
SDcard.ino:64:1: error: 'prog_char' does not name a type
SDcard.ino:65:1: error: 'prog_char' does not name a type
Followed by a bunch more errors having to do with the variables that were trying to be created at the line numbers shown above. The problem is clearly that my version of the IDE (V1.5.7) doesn't know what type "prog_char" is.
Poking around a bit, it is clear that this is a legitimate type for OpenBCI to be invoking (see this official Arduino help page: http://arduino.cc/en/Reference/PROGMEM). So, perhaps it's a problem with IDE V1.5.7 versus the latest V1.5.8. I'm downloading V1.5.8 now, but my connection is slow, so I kept digging while I wait.
On this older page (http://forum.arduino.cc/index.php?topic=168716.0) I found that a fix is to add:
#define __PROG_TYPES_COMPAT__
In the file SDCard.ino, just before the line:
#include <avr/pgmspace.h>
When I tried compiling again, it gave me an error that all of my lines with "prog_char" needed to be const. OK, so I added const before each prog_char. Then it compiled fine. So, if for some reason you're stuck with the Arduino IDE V1.5.7, this might be a work-around for you.
I'm gonna see if V1.5.8 solves this issue without these annoyances.
Chip
Comments