G+_Chris Schoblocher Posted July 5, 2015 Share Posted July 5, 2015 So I hope someone can help me. I am stuck trying to get my OSD to work. I have two Minim OSD's and I cant get either to work. I have cleared the EPROM and then burnt the boot loader back to the OSD. When I try to upload the firmware I get this error. "In file included from KV_Team_OSD.ino:28:0: GlobalVariables.h:681: error: variable 'item_table' must be const in order to be put into read-only section by means of '__attribute__((progmem))' PROGMEM const char *item_table[] = ^ variable 'item_table' must be const in order to be put into read-only section by means of '__attribute__((progmem))' I'm new to Arduino and all of this so I very well could be missing something simple. Any and all help is much appreciated. Link to comment Share on other sites More sharing options...
G+_Jeff Gros Posted July 6, 2015 Share Posted July 6, 2015 Well, I don't use Arduino myself, and I had to google your Minim OSD to figure out its some quad copter thingy, but I know embedded systems. Arduino uses the Atmel chipset, which uses a harvard architecture. Harvard architecture has separate program and data busses. This means that you have to use special instructions in order to get program data (your item_table), to be accessible on the data bus. I admit, it has been a while since I've used an Atmel part, so I'm not positive on the compiler keyword syntax. However, I found this link (https://www.arduino.cc/en/Reference/PROGMEM) that says the following: const dataType variableName[] PROGMEM = {}; // use this form const PROGMEM dataType variableName[] = {}; // or this form const dataType PROGMEM variableName[] = {}; // not this one Your file KV_Team_OSD.cpp seems to be using the last one in the list, so perhaps this is invalid syntax for your version of Arduino. I think you have a few options: 1. You could try reordering the PROGMEM so it is the last in the list. 2. You could try upgrading your Arduino compiler. That last website I listed seems to indicate that the accepted syntax will depend on the compiler version. I googled your problem and found (http://www.multiwii.com/forum/viewtopic.php?f=8&t=2918&start=900) which seems to indicate that upgrading your Arudino version should help. Or you could wait for someone with more Arduino experience to chime in (or contact the vendor for help). Since I already write firmware I didn't see any reason for me to look at Arduino. Good luck! Link to comment Share on other sites More sharing options...
G+_Chris Schoblocher Posted July 6, 2015 Author Share Posted July 6, 2015 Thanks for the info. I may have figured it out. I had to actually go to an older version of Arduino to get it to upload. Link to comment Share on other sites More sharing options...
G+_Emilio Morla Posted July 7, 2015 Share Posted July 7, 2015 Chris Schoblocher change the line to: PROGMEM const char * const item_table.......... Link to comment Share on other sites More sharing options...
Recommended Posts