{"action":"created","issue":{"url":"https://api.github.com/repos/neu-rah/ArduinoMenu/issues/40","repository_url":"https://api.github.com/repos/neu-rah/ArduinoMenu","labels_url":"https://api.github.com/repos/neu-rah/ArduinoMenu/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/neu-rah/ArduinoMenu/issues/40/comments","events_url":"https://api.github.com/repos/neu-rah/ArduinoMenu/issues/40/events","html_url":"https://github.com/neu-rah/ArduinoMenu/issues/40","id":169124723,"number":40,"title":"ArduinoMenu v2.4 does not build on Teensy 3.1/3.2 due to PROGMEM","user":{"login":"christophepersoz","id":12657220,"avatar_url":"https://avatars.githubusercontent.com/u/12657220?v=3","gravatar_id":"","url":"https://api.github.com/users/christophepersoz","html_url":"https://github.com/christophepersoz","followers_url":"https://api.github.com/users/christophepersoz/followers","following_url":"https://api.github.com/users/christophepersoz/following{/other_user}","gists_url":"https://api.github.com/users/christophepersoz/gists{/gist_id}","starred_url":"https://api.github.com/users/christophepersoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christophepersoz/subscriptions","organizations_url":"https://api.github.com/users/christophepersoz/orgs","repos_url":"https://api.github.com/users/christophepersoz/repos","events_url":"https://api.github.com/users/christophepersoz/events{/privacy}","received_events_url":"https://api.github.com/users/christophepersoz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2016-08-03T12:56:07Z","updated_at":"2016-08-05T14:19:07Z","closed_at":null,"body":"It is just a move of my feedback concerning the build of v2.4 on Teensy board.\r\nBefore posting it I tried to `#include <avr/pgmspace.h>` In menuFields.h but as you noticed this does not solve it. I saw some lib using the same functions that you are using for PROGMEM which seems working. I'm just wondering if it's not a problem related to Template/Macro  \r\n\r\nHere the build error I'm getting on Teensy board:\r\n\r\n```c++\r\nArduino: 1.6.7 (Mac OS X), TD: 1.29, Board: \"Teensy 3.2 / 3.1, Serial, 96 MHz optimized (overclock), US English\"\r\n\r\n/Applications/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware \"/Applications/Arduino.app/Contents/Java/hardware\" -tools \"/Applications/Arduino.app/Contents/Java/tools-builder\" -tools \"/Applications/Arduino.app/Contents/Java/hardware/tools/avr\" -built-in-libraries \"/Applications/Arduino.app/Contents/Java/libraries\" -libraries \"/Users/christophepersoz/Developer/_Arduino/libraries\" -fqbn=teensy:avr:teensy31:usb=serial,speed=96opt,keys=en-us -ide-version=10607 -build-path \"/var/folders/93/95zp52wn3dq81d0dgrtmj_b80000gn/T/build0da4f63f4b42a48bacd9931d3ed57970.tmp\" -warnings=none -verbose \"/Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino\"\r\n/Applications/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware \"/Applications/Arduino.app/Contents/Java/hardware\" -tools \"/Applications/Arduino.app/Contents/Java/tools-builder\" -tools \"/Applications/Arduino.app/Contents/Java/hardware/tools/avr\" -built-in-libraries \"/Applications/Arduino.app/Contents/Java/libraries\" -libraries \"/Users/christophepersoz/Developer/_Arduino/libraries\" -fqbn=teensy:avr:teensy31:usb=serial,speed=96opt,keys=en-us -ide-version=10607 -build-path \"/var/folders/93/95zp52wn3dq81d0dgrtmj_b80000gn/T/build0da4f63f4b42a48bacd9931d3ed57970.tmp\" -warnings=none -verbose \"/Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino\"\r\nBuild options changed, rebuilding all\r\n\r\n...\r\n\r\n\"/Applications/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino5/ctags\" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives \"/var/folders/93/95zp52wn3dq81d0dgrtmj_b80000gn/T/build0da4f63f4b42a48bacd9931d3ed57970.tmp/preproc/ctags_target_for_gcc_minus_e.cpp\"\r\n\"/Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++\" -c -O -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=129 -DARDUINO=10607 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH \"-I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3\" \"-I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI\" \"-I/Users/christophepersoz/Developer/_Arduino/libraries/U8g_teensy\" \"-I/Users/christophepersoz/Developer/_Arduino/libraries/U8glib\" \"-I/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src\" \"/var/folders/93/95zp52wn3dq81d0dgrtmj_b80000gn/T/build0da4f63f4b42a48bacd9931d3ed57970.tmp/sketch/U8Glib_ClickEncoder_Teensy_Demo.ino.ino.cpp\" -o \"/var/folders/93/95zp52wn3dq81d0dgrtmj_b80000gn/T/build0da4f63f4b42a48bacd9931d3ed57970.tmp/sketch/U8Glib_ClickEncoder_Teensy_Demo.ino.ino.cpp.o\"\r\nIn file included from /Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:29:0:\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h:102:8: warning: extra tokens at end of #endif directive [enabled by default]\r\n #endif RSITE_ARDUINOP_MENU_LCD\r\n        ^\r\nIn file included from /Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:27:0:\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h: In constructor 'menuOut::menuOut(int, int, int, int)':\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:48:9: warning: 'menuOut::maxY' will be initialized after [-Wreorder]\r\n     int maxY;\r\n         ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:45:9: warning:   'int menuOut::top' [-Wreorder]\r\n     int top;//top for this device\r\n         ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:56:12: warning:   when initialized here [-Wreorder]\r\n     inline menuOut(int x=0x7F,int y=0x7F,int resX=1,int resY=1)\r\n            ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:51:9: warning: 'menuOut::resY' will be initialized after [-Wreorder]\r\n     int resY;\r\n         ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:44:11: warning:   'menu* menuOut::drawn' [-Wreorder]\r\n     menu* drawn;//last drawn menu, avoiding clear/redraw\r\n           ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:56:12: warning:   when initialized here [-Wreorder]\r\n     inline menuOut(int x=0x7F,int y=0x7F,int resX=1,int resY=1)\r\n            ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h: In constructor 'prompt::prompt(const char*)':\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:123:10: warning: 'prompt::enabled' will be initialized after [-Wreorder]\r\n     bool enabled;\r\n          ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:121:18: warning:   'promptAction prompt::action' [-Wreorder]\r\n     promptAction action;\r\n                  ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:124:12: warning:   when initialized here [-Wreorder]\r\n     inline prompt(const char * text):text(text),enabled(true),action(nothing) {}\r\n            ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h: In constructor 'menuNode::menuNode(const char*)':\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:141:12: warning: 'menuNode::oy' will be initialized after [-Wreorder]\r\n     int ox,oy;//coordinate origin displacement\r\n            ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:140:9: warning:   'int menuNode::width' [-Wreorder]\r\n     int width;//field or menu width\r\n         ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:145:12: warning:   when initialized here [-Wreorder]\r\n     inline menuNode(const char * text):prompt(text),ox(0),oy(0),width(32),previousMenu(NULL) {}\r\n            ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h: In constructor 'menuNode::menuNode(const char*, promptAction)':\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:141:12: warning: 'menuNode::oy' will be initialized after [-Wreorder]\r\n     int ox,oy;//coordinate origin displacement\r\n            ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:140:9: warning:   'int menuNode::width' [-Wreorder]\r\n     int width;//field or menu width\r\n         ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menu.h:146:12: warning:   when initialized here [-Wreorder]\r\n     inline menuNode(const char * text,promptAction action):prompt(text,action),ox(0),oy(0),width(32) {}\r\n            ^\r\nIn file included from /Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:28:0:\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In member function 'virtual bool menuVariant<T>::needRedraw(menuOut&, bool)':\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:139:56: error: there are no arguments to 'pgm_read_ptr_near' that depend on a template parameter, so a declaration of 'pgm_read_ptr_near' must be available [-fpermissive]\r\n    bool nr=((menuValue<T>*)pgm_read_ptr_near(&data[sel]))->value!=target;//||p.lastSel!=sel;\r\n                                                        ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:139:56: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In member function 'void menuVariant<T>::sync()':\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:147:52: error: there are no arguments to 'pgm_read_ptr_near' that depend on a template parameter, so a declaration of 'pgm_read_ptr_near' must be available [-fpermissive]\r\n      if (((menuValue<T>*)pgm_read_ptr_near(&data[n]))->value==target)\r\n                                                    ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In member function 'virtual void menuVariant<T>::printTo(menuOut&)':\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:153:42: error: there are no arguments to 'pgm_read_ptr_near' that depend on a template parameter, so a declaration of 'pgm_read_ptr_near' must be available [-fpermissive]\r\n    ((prompt*)pgm_read_ptr_near(&data[sel]))->printTo(p);\r\n                                          ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In member function 'virtual bool menuSelect<T>::needRedraw(menuOut&, bool)':\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:182:67: error: there are no arguments to 'pgm_read_ptr_near' that depend on a template parameter, so a declaration of 'pgm_read_ptr_near' must be available [-fpermissive]\r\n    return ((menuValue<T>*)pgm_read_ptr_near(&menu::data[menu::sel]))->value!=menuVariant<T>::target;\r\n                                                                   ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In member function 'virtual void menuSelect<T>::printTo(menuOut&)':\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:188:54: error: there are no arguments to 'pgm_read_ptr_near' that depend on a template parameter, so a declaration of 'pgm_read_ptr_near' must be available [-fpermissive]\r\n    ((prompt*)pgm_read_ptr_near(&menu::data[menu::sel]))->printTo(p);\r\n                                                      ^\r\nIn file included from /Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:29:0:\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h: In constructor 'menuU8G::menuU8G(U8GLIB&, unsigned char, unsigned char, unsigned char, unsigned char, uint8_t, uint8_t)':\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h:31:13: warning: 'menuU8G::gfx' will be initialized after [-Wreorder]\r\n     U8GLIB& gfx;\r\n             ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h:25:18: warning:   'unsigned char menuU8G::bgColor' [-Wreorder]\r\n    unsigned char bgColor;\r\n                  ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h:32:5: warning:   when initialized here [-Wreorder]\r\n     menuU8G(\r\n     ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h:27:18: warning: 'menuU8G::disabledColor' will be initialized after [-Wreorder]\r\n    unsigned char disabledColor;\r\n                  ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h:24:18: warning:   'unsigned char menuU8G::hiliteColor' [-Wreorder]\r\n    unsigned char hiliteColor;\r\n                  ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h:32:5: warning:   when initialized here [-Wreorder]\r\n     menuU8G(\r\n     ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h:29:17: warning: 'menuU8G::disabledColorHi' will be initialized after [-Wreorder]\r\n   unsigned char disabledColorHi;\r\n                 ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h:48:63: warning:   base 'menuOut' [-Wreorder]\r\n     menuOut(gfx.getWidth()/resX,gfx.getHeight()/resY,resX,resY)\r\n                                                               ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h:32:5: warning:   when initialized here [-Wreorder]\r\n     menuU8G(\r\n     ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h: In member function 'virtual void menuU8G::printMenu(menu&, bool)':\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuU8G.h:92:56: error: 'pgm_read_ptr_near' was not declared in this scope\r\n      printPrompt(*(prompt*)pgm_read_ptr_near(&m.data[i]),i == m.sel,i+1,m.ox,(i-top)+m.oy,m.width);\r\n                                                        ^\r\nIn file included from /Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:28:0:\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In instantiation of 'menuField<T>::menuField(T&, const char*, const char*, T, T, T, T, bool (*)()) [with T = int]':\r\n/Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:69:1:   required from here\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:57:26: warning: 'menuField<int>::func' will be initialized after [-Wreorder]\r\n   promptFeedback (*func)();\r\n                          ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:56:8: warning:   'bool menuField<int>::tunning' [-Wreorder]\r\n   bool tunning;\r\n        ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:60:3: warning:   when initialized here [-Wreorder]\r\n   menuField(T &value,const char * text,const char *units,T low,T high,T step,T tune=0,promptFeedback (*func)()=nothing)\r\n   ^\r\nIn file included from /Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:28:0:\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In instantiation of 'void menuVariant<T>::sync() [with T = bool]':\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:261:64:   required from 'menuToggle<T>::menuToggle(const char*, unsigned int, menuValue<T>* const*, T&) [with T = bool]'\r\n/Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:59:1:   required from here\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:147:52: error: 'pgm_read_ptr_near' was not declared in this scope\r\n      if (((menuValue<T>*)pgm_read_ptr_near(&data[n]))->value==target)\r\n                                                    ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In instantiation of 'void menuVariant<T>::sync() [with T = int]':\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:226:64:   required from 'menuChoice<T>::menuChoice(const char*, unsigned int, menuValue<T>* const*, T&) [with T = int]'\r\n/Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:81:1:   required from here\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:147:52: error: 'pgm_read_ptr_near' was not declared in this scope\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In instantiation of 'void menuVariant<T>::printTo(menuOut&) [with T = int]':\r\n/Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:121:1:   required from here\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:153:42: error: 'pgm_read_ptr_near' was not declared in this scope\r\n    ((prompt*)pgm_read_ptr_near(&data[sel]))->printTo(p);\r\n                                          ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In instantiation of 'bool menuVariant<T>::needRedraw(menuOut&, bool) [with T = int]':\r\n/Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:121:1:   required from here\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:139:56: error: 'pgm_read_ptr_near' was not declared in this scope\r\n    bool nr=((menuValue<T>*)pgm_read_ptr_near(&data[sel]))->value!=target;//||p.lastSel!=sel;\r\n                                                        ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In instantiation of 'bool menuChoice<T>::activate(menuOut&, Stream&, bool) [with T = int]':\r\n/Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:121:1:   required from here\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:244:76: error: 'pgm_read_ptr_near' was not declared in this scope\r\n     menuValue<T>* cp=(menuValue<T>*)pgm_read_ptr_near(&this->menu::data[op]);\r\n                                                                            ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In instantiation of 'void menuVariant<T>::printTo(menuOut&) [with T = bool]':\r\n/Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:121:1:   required from here\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:153:42: error: 'pgm_read_ptr_near' was not declared in this scope\r\n    ((prompt*)pgm_read_ptr_near(&data[sel]))->printTo(p);\r\n                                          ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In instantiation of 'bool menuVariant<T>::needRedraw(menuOut&, bool) [with T = bool]':\r\n/Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:121:1:   required from here\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:139:56: error: 'pgm_read_ptr_near' was not declared in this scope\r\n    bool nr=((menuValue<T>*)pgm_read_ptr_near(&data[sel]))->value!=target;//||p.lastSel!=sel;\r\n                                                        ^\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h: In instantiation of 'bool menuToggle<T>::activate(menuOut&, Stream&, bool) [with T = bool]':\r\n/Users/christophepersoz/Library/Mobile Documents/com~apple~CloudDocs/Developer/_Arduino/libraries/Menu/examples/U8Glib_ClickEncoder_Teensy_Demo.ino/U8Glib_ClickEncoder_Teensy_Demo.ino.ino:121:1:   required from here\r\n/Users/christophepersoz/Developer/_Arduino/libraries/Menu/src/menuFields.h:268:82: error: 'pgm_read_ptr_near' was not declared in this scope\r\n    menuValue<T>* cp=(menuValue<T>*)pgm_read_ptr_near(&this->menu::data[menu::sel]);\r\n                                                                                  ^\r\nUsing library SPI at version 1.0 in folder: /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/SPI \r\nUsing library U8g_teensy in folder: /Users/christophepersoz/Developer/_Arduino/libraries/U8g_teensy (legacy)\r\nUsing library U8glib in folder: /Users/christophepersoz/Developer/_Arduino/libraries/U8glib (legacy)\r\nUsing library Menu at version 2.4 in folder: /Users/christophepersoz/Developer/_Arduino/libraries/Menu \r\nError compiling for \"Teensy 3.2 / 3.1\"\r\n```\r\n\r\nAnd for both, the Sketch `U8Glib_ClickEncoder_Teensy_Demo.ino.ino` is the one include in the v2.4 named `U8Glib_menu.ino` with the following changes at the beginning to have the same Sketch for 2 different boards.\r\n\r\n```c++\r\n\r\n#include <avr/pgmspace.h>\r\n#if defined(__AVR_ATmega2560__)\r\n  #include <U8glib.h>\r\n#elif defined (__MK20DX256__) || defined(__MK20DX128__) // Teensy 3.2, 3.1 and 3.0\r\n  #include <SPI.h>          // SPI transaction library\r\n  #include <U8g_teensy.h>   // OLED display driver u8g_teensy\r\n#else\r\n  #error \"DEFINE YOUR BOARD TYPE HERE\"\r\n#endif\r\n\r\n\r\n#include <menu.h>//menu macros and objects\r\n#include <menuFields.h>\r\n#include <menuU8G.h>\r\n\r\n#define U8_DC 9\r\n#define U8_CS 10\r\n#define U8_RST 7\r\n\r\n\r\n#if defined(__AVR_ATmega2560__)\r\n  U8GLIB_NHD31OLED_GR u8g(U8_CS, U8_DC, U8_RST); \r\n  //U8GLIB_PCD8544 u8g(U8_CS, U8_DC, U8_RST) ;\r\n#elif defined (__MK20DX256__) || defined(__MK20DX128__) // Teensy 3.2, 3.1 and 3.0\r\n  U8GLIB u8g(&u8g_dev_ssd1322_nhd31oled_2x_gr_hw_spi, u8g_com_hw_spi_fn); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)\r\n#else\r\n  #error \"U8GLIB DISPLAY NEEDED\"\r\n#endif\r\n\r\n\r\nmenuU8G gfx(u8g,1,0,1,1,7,9);\r\n```\r\n\r\nAs you see, there much is much more issues on Teensy. Maybe they are all linked. The main concern is `pgm_read_ptr_near()` which is not recognized.\r\n\r\nIt's a good idea to introduce the use of `#define USEPGM`. Teensy have a lot of SRAM and that will allows us to test the v2.4 ;)\r\nThanks a lot"},"comment":{"url":"https://api.github.com/repos/neu-rah/ArduinoMenu/issues/comments/237862738","html_url":"https://github.com/neu-rah/ArduinoMenu/issues/40#issuecomment-237862738","issue_url":"https://api.github.com/repos/neu-rah/ArduinoMenu/issues/40","id":237862738,"user":{"login":"neu-rah","id":4712642,"avatar_url":"https://avatars.githubusercontent.com/u/4712642?v=3","gravatar_id":"","url":"https://api.github.com/users/neu-rah","html_url":"https://github.com/neu-rah","followers_url":"https://api.github.com/users/neu-rah/followers","following_url":"https://api.github.com/users/neu-rah/following{/other_user}","gists_url":"https://api.github.com/users/neu-rah/gists{/gist_id}","starred_url":"https://api.github.com/users/neu-rah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neu-rah/subscriptions","organizations_url":"https://api.github.com/users/neu-rah/orgs","repos_url":"https://api.github.com/users/neu-rah/repos","events_url":"https://api.github.com/users/neu-rah/events{/privacy}","received_events_url":"https://api.github.com/users/neu-rah/received_events","type":"User","site_admin":false},"created_at":"2016-08-05T14:19:07Z","updated_at":"2016-08-05T14:19:07Z","body":"serial_menu can be a good point\r\n\r\nif it does not run ok => menu nav system\r\nif it runs ok => display system\r\n\r\nno time lost my friend, and I'm grateful for your patience. I had some errors, the kind of ones that compile ok (logic errors), like storing on ram and then trying to read from flash... it compiles but will print trash or reset the chip (unpredictable result).\r\n\r\nand i hope i don't have much more of those ;D"}}
{"actor":{"display_login":"neu-rah"}}