MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.23k stars 19.22k forks source link

2.0 does not build for CR-10 #10241

Closed RudolphRiedel closed 6 years ago

RudolphRiedel commented 6 years ago

Description

When using the configuration files from Marlin-bugfix-2.0.x\Marlin\src\config\examples\Creality\CR-10 and building with Arduino 1.9beta for Sanguino/ATMega1284P, the build stops with a gazillion of errors.

Steps to Reproduce

Download the archive, unzip it, copy over the CR-10 setup files without touching them, open in Arduino, setup board to Sanguino/ATMega1284P, try to build.

At ultralcd_st7920_u8glib_rrd_AVR.cpp the compiler is starting to throw errors.

Additional Information

In file included from C:\Users\Ich\AppData\Local\Temp\arduino_build_670844\sketch\src\lcd\dogm\../../inc/../HAL/HAL_AVR/HAL_AVR.h:46:0,

                 from C:\Users\Ich\AppData\Local\Temp\arduino_build_670844\sketch\src\lcd\dogm\../../inc/../HAL/HAL.h:38,

                 from C:\Users\Ich\AppData\Local\Temp\arduino_build_670844\sketch\src\lcd\dogm\../../inc/MarlinConfig.h:28,

                 from C:\Users\Ich\AppData\Local\Temp\arduino_build_670844\sketch\src\lcd\dogm\ultralcd_st7920_u8glib_rrd_AVR.cpp:26:

C:\Users\Ich\AppData\Local\Temp\arduino_build_670844\sketch\src\lcd\dogm\../../inc/../pins/pins_MELZI_CREALITY.h:53:31: error: pasting "/* st9720 CLK*/" and "_RPORT" does not give a valid preprocessing token

 #define LCD_PINS_D4        30 // st9720 CLK

                               ^

C:\Users\Ich\AppData\Local\Temp\arduino_build_670844\sketch\src\lcd\dogm\../../inc/../HAL/HAL_AVR/fastio_AVR.h:85:41: note: in definition of macro '_WRITE'

 #define _WRITE(IO, v) do { if (&(DIO ## IO ## _RPORT) >= (uint8_t *)0x100) {_WRITE_C(IO, v); } else {_WRITE_NC(IO, v); }; } while (0)

                                         ^

C:\Users\Ich\AppData\Local\Temp\arduino_build_670844\sketch\src\lcd\dogm\ultralcd_st7920_u8glib_rrd_AVR.cpp:88:3: note: in expansion of macro 'WRITE'

   WRITE(ST7920_CLK_PIN, LOW);        ST7920_DELAY_1; \

   ^

C:\Users\Ich\AppData\Local\Temp\arduino_build_670844\sketch\src\lcd\dogm\ultralcd_st7920_u8glib_rrd_AVR.cpp:32:25: note: in expansion of macro 'LCD_PINS_D4'

 #define ST7920_CLK_PIN  LCD_PINS_D4

                         ^

C:\Users\Ich\AppData\Local\Temp\arduino_build_670844\sketch\src\lcd\dogm\ultralcd_st7920_u8glib_rrd_AVR.cpp:88:9: note: in expansion of macro 'ST7920_CLK_PIN'

   WRITE(ST7920_CLK_PIN, LOW);        ST7920_DELAY_1; \
thinkyhead commented 6 years ago

This is due to a bug —a regression— in Arduino 1.9. This bug has been reported but apparently still not fixed. To work around the issue, remove the comment from the end of this line:

 #define LCD_PINS_D4        30 // st9720 CLK
github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.