Copiling Error To upload to MKS v1.4 board

edited June 2017 in Bug Reports
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?


Comments

  • Please try dev version instead. Might be that the compiler has new compile settings preventing compilation, but dev is compiling fine with 1.8.x for me.
Sign In or Register to comment.