Page 1 of 1

Code of arduino of Rostock V1

Posted: Fri Apr 24, 2015 8:29 pm
by fuhao1995323
Hello all, we are facing the wrong code, can any designer help fix this. The wrong code information is below:

Arduino:1.6.3 (Windows 8.1), 板:"Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Extruder.cpp:32:1: error: 'prog_char' does not name a type

prog_char ext0_select_cmd[] PROGMEM = EXT0_SELECT_COMMANDS;

^

Extruder.cpp:33:1: error: 'prog_char' does not name a type

prog_char ext0_deselect_cmd[] PROGMEM = EXT0_DESELECT_COMMANDS;

^

Extruder.cpp:72:4: error: 'ext0_select_cmd' was not declared in this scope

,ext0_select_cmd,ext0_deselect_cmd,EXT0_EXTRUDER_COOLER_SPEED,0

^

Extruder.cpp:72:20: error: 'ext0_deselect_cmd' was not declared in this scope

,ext0_select_cmd,ext0_deselect_cmd,EXT0_EXTRUDER_COOLER_SPEED,0

^

Re: Code of arduino of Rostock V1

Posted: Sat Apr 25, 2015 10:51 am
by Eaglezsoar
Try using an older version of Arduino like 1.04 version

Re: Code of arduino of Rostock V1

Posted: Sat Apr 25, 2015 4:55 pm
by Eric
So you're obviously trying to compile an older version of the firmware on a newer version of the compiler.
Your solutions are (pick one):
* Use an older version of the arduino compiler, like Eagle suggested. Probably easiest if you just need a quick config change and like it the way it is. 1.04 should be old enough.
* Upgrade to a newer version of the firmware.
* Declare the macro as directed in the link below so that prog_char is defined.
* Change the code to eliminate the problem (change "prog_char" to "char" for the first two errors, the other two errors will go away)

Here's the history of the change: http://www.nongnu.org/avr-libc/changes-1.8.html
The change was over three years ago, but the arduino compiler didn't adopt that version of the library until more recently. This library is needed to support newer arduino hardware, so they did need to upgrade.