Copiling Error To upload to MKS v1.4 board
Trying to compile newly downloaded firmware from online configuration tool for use with an MKS 1.4 board, getting the following compiler error in the newest arduino IDE (1.8.3)
Arduino: 1.8.3 (Windows 7), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"
ui.cpp:2016: error: expected primary-expression before 'const'
uint8_t mtype = HAL::readFlashByte((const prog_char*)&(men->menuType));
^
ui.cpp:2016: error: expected ')' before 'const'
sketch\ui.cpp: In member function 'void UIDisplay::nextPreviousAction(int8_t)':
sketch\ui.cpp:2083:47: warning: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
uint8_t mtype = HAL::readFlashByte((const prog_char*)&(men->menuType));
^
ui.cpp:2083: error: expected primary-expression before 'const'
uint8_t mtype = HAL::readFlashByte((const prog_char*)&(men->menuType));
^
ui.cpp:2083: error: expected ')' before 'const'
sketch\ui.cpp:2087:49: warning: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
uint8_t entType = HAL::readFlashByte((const prog_char*)&(ent->menuType));// 0 = Info, 1 = Headline, 2 = submenu ref, 3 = direct action command
^
ui.cpp:2087: error: expected primary-expression before 'const'
uint8_t entType = HAL::readFlashByte((const prog_char*)&(ent->menuType));// 0 = Info, 1 = Headline, 2 = submenu ref, 3 = direct action command
^
ui.cpp:2087: error: expected ')' before 'const'
exit status 1
expected primary-expression before 'const'
Also having this problem trying to compile under the generic Mega ADK. any ideas?
Arduino: 1.8.3 (Windows 7), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"
ui.cpp:2016: error: expected primary-expression before 'const'
uint8_t mtype = HAL::readFlashByte((const prog_char*)&(men->menuType));
^
ui.cpp:2016: error: expected ')' before 'const'
sketch\ui.cpp: In member function 'void UIDisplay::nextPreviousAction(int8_t)':
sketch\ui.cpp:2083:47: warning: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
uint8_t mtype = HAL::readFlashByte((const prog_char*)&(men->menuType));
^
ui.cpp:2083: error: expected primary-expression before 'const'
uint8_t mtype = HAL::readFlashByte((const prog_char*)&(men->menuType));
^
ui.cpp:2083: error: expected ')' before 'const'
sketch\ui.cpp:2087:49: warning: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
uint8_t entType = HAL::readFlashByte((const prog_char*)&(ent->menuType));// 0 = Info, 1 = Headline, 2 = submenu ref, 3 = direct action command
^
ui.cpp:2087: error: expected primary-expression before 'const'
uint8_t entType = HAL::readFlashByte((const prog_char*)&(ent->menuType));// 0 = Info, 1 = Headline, 2 = submenu ref, 3 = direct action command
^
ui.cpp:2087: error: expected ')' before 'const'
exit status 1
expected primary-expression before 'const'
Also having this problem trying to compile under the generic Mega ADK. any ideas?
Comments