Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] I can´t compile Marlin with LCD error #21948

Closed
javigp540 opened this issue May 19, 2021 · 7 comments
Closed

[BUG] I can´t compile Marlin with LCD error #21948

javigp540 opened this issue May 19, 2021 · 7 comments

Comments

@javigp540
Copy link

Did you test the latest bugfix-2.0.x code?

Yes, and the problem still exists.

Bug Description

Hello,

I am trying to install the latest version of Marlin on my printer and keep showing the following error each time I try to compile.

Arduino:1.8.15 (Windows 10), Tarjeta:"Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\marlinui_DOGM.h:31:0,

             from C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\marlinui.cpp:126:

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h: In member function 'void U8GLIB_64128N_2X_HAL::init(pin_t, pin_t, pin_t, pin_t, pin_t)':

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h:37:13: error: 'init' is not a member of 'U8GLIB'

 U8GLIB::init(&u8g_dev_st7565_64128n_HAL_2x_sw_spi, (uint8_t)sck, (uint8_t)mosi, (uint8_t)cs, (uint8_t)a0, (uint8_t)reset);

         ^~~~

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h: In member function 'void U8GLIB_64128N_2X_HAL::init(pin_t, pin_t, pin_t)':

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h:40:13: error: 'init' is not a member of 'U8GLIB'

 U8GLIB::init(&u8g_dev_st7565_64128n_HAL_2x_hw_spi, (uint8_t)cs, (uint8_t)a0, (uint8_t)reset);

         ^~~~

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h: In member function 'void U8GLIB_ST7920_128X64_4X_HAL::init(pin_t, pin_t, pin_t, pin_t)':

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h:53:13: error: 'init' is not a member of 'U8GLIB'

 U8GLIB::init(&u8g_dev_st7920_128x64_HAL_4x_sw_spi, (uint8_t)sck, (uint8_t)mosi, (uint8_t)cs, U8G_PIN_NONE, (uint8_t)reset); // a0 = U8G_PIN_NONE

         ^~~~

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h: In member function 'void U8GLIB_ST7920_128X64_4X_HAL::init(pin_t, pin_t)':

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h:56:13: error: 'init' is not a member of 'U8GLIB'

 U8GLIB::init(&u8g_dev_st7920_128x64_HAL_4x_hw_spi, (uint8_t)cs, U8G_PIN_NONE, (uint8_t)reset); // a0 = U8G_PIN_NONE

         ^~~~

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h: In member function 'void U8GLIB_ST7920_128X64_RRD::init(pin_t, pin_t, pin_t, pin_t)':

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h:71:13: error: 'init' is not a member of 'U8GLIB'

 U8GLIB::init(&u8g_dev_st7920_128x64_rrd_sw_spi, (uint8_t)sck, (uint8_t)mosi, (uint8_t)cs, U8G_PIN_NONE, (uint8_t)reset);   // a0 = U8G_PIN_NONE

         ^~~~

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h: In member function 'void U8GLIB_SH1106_128X64_2X_I2C_2_WIRE::init(uint8_t)':

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h:81:59: error: 'init' is not a member of 'U8GLIB'

void init(uint8_t options = U8G_I2C_OPT_NONE) { U8GLIB::init(&u8g_dev_sh1106_128x64_2x_i2c_2_wire, options); }

                                                       ^~~~

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h: In member function 'void U8GLIB_SSD1306_128X64_2X_I2C_2_WIRE::init(uint8_t)':

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h:90:59: error: 'init' is not a member of 'U8GLIB'

void init(uint8_t options = U8G_I2C_OPT_NONE) { U8GLIB::init(&u8g_dev_ssd1306_128x64_2x_i2c_2_wire, options); }

                                                       ^~~~

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h: In member function 'void U8GLIB_TFT_320X240_UPSCALE_FROM_128X64::init(uint8_t, uint8_t, uint8_t)':

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h:103:77: error: 'init' is not a member of 'U8GLIB'

void init(uint8_t cs, uint8_t rs, uint8_t reset = U8G_PIN_NONE) { U8GLIB::init(&u8g_dev_tft_320x240_upscale_from_128x64, cs, rs, reset); }

                                                                         ^~~~

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h: In member function 'void U8GLIB_MINI12864_2X_HAL::init(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t)':

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h:115:13: error: 'init' is not a member of 'U8GLIB'

 U8GLIB::init(&u8g_dev_uc1701_mini12864_HAL_2x_sw_spi, sck, mosi, cs, a0, reset);

         ^~~~

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h: In member function 'void U8GLIB_MINI12864_2X_HAL::init(uint8_t, uint8_t, uint8_t)':

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h:118:13: error: 'init' is not a member of 'U8GLIB'

 U8GLIB::init(&u8g_dev_uc1701_mini12864_HAL_2x_hw_spi, cs, a0, reset);

         ^~~~

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h: In member function 'void U8GLIB_SSD1309_128X64_HAL::init(pin_t, pin_t, pin_t, pin_t, pin_t)':

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h:131:13: error: 'init' is not a member of 'U8GLIB'

 U8GLIB::init(&u8g_dev_ssd1309_sw_spi, (uint8_t)sck, (uint8_t)mosi, (uint8_t)cs, (uint8_t)a0, (uint8_t)reset);

         ^~~~

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h: In member function 'void U8GLIB_SSD1309_128X64_HAL::init(pin_t, pin_t, pin_t)':

C:\Users\Garcia\Desktop\Marlin-bugfix-2.0.x\Marlin\src\lcd\dogm\HAL_LCD_class_defines.h:134:13: error: 'init' is not a member of 'U8GLIB'

 U8GLIB::init(&u8g_dev_ssd1309_hw_spi, (uint8_t)cs, (uint8_t)a0, (uint8_t)reset);

         ^~~~

exit status 1

Error compilando para la tarjeta Arduino Mega or Mega 2560.

I did try an older version from Marlin but keep showing the same error.

Bug Timeline

No response

Expected behavior

I expect to compile with the right LCD drive

Actual behavior

No response

Steps to Reproduce

No response

Version of Marlin Firmware

Marlin 2.0x

Printer model

Creality CR-10 S5

Electronics

Stock electronics with BL Touch

Add-ons

No response

Your Slicer

No response

Host Software

No response

Additional information & file uploads

No response

@ellensp
Copy link
Contributor

ellensp commented May 19, 2021

Arduino IDE uses wrong U8G library
Use platformio https://marlinfw.org/docs/basics/install_platformio_vscode.html
This use correct U8G library automatically
Otherwise you will have to fight arduino ide and make it use https://github.com/MarlinFirmware/U8glib-HAL

@ellensp
Copy link
Contributor

ellensp commented May 19, 2021

@borjarodi don't hijack issues.
your issues is clearly something different and an already ongoing issue #21576

@borjarodi
Copy link

borjarodi commented May 19, 2021

Hi, it's my first time compiling Marlin and I'm getting this same error. Attached capture of the error that VS shows me. I would appreciate help as I am a beginner. My computer is a Mac and my printer has all the factory items, I have not changed any (Creality V2.2 board).
Captura de pantalla (202)

@Angel996
Copy link

Angel996 commented May 22, 2021

Thanks to ellensp's reply I was able to come up with a working solution to this issue. First, get the latest U8glib library provided by Marlin:

https://github.com/MarlinFirmware/U8glib-HAL

Note: you must download the latest Master branch, not the 2020 release -- that thing is old and won't work! Then, in Arduino IDE locate your sketch folder (File->Preferences->Sketchbook location). There find the libraries folder and delete the U8glib folder. Then use the Arduino IDE Sketch->Include library->Add .zip library... to install the downloaded U8glib. For this to work, you need to rezip the original GitHub package in such a way that the U8glib.h along with other files is located in the zip's root folder, otherwise it won't install.

I also had to copy over the clib folder over to Marlin/src, because it was missing the .h files (for some reason).

@Enzo-Enz
Copy link

Hi @Angel996
Im tried to add U8glib-HAL-master.zip to arduino IDE but I faced with this error:

Arduino: 1.8.15 (Windows 7), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Specified folder/zip file does not contain a valid library

Specified folder/zip file does not contain a valid library

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

could you please help me?

@thisiskeithb
Copy link
Member

@Enzo-Enz: This Issue Queue is for Marlin bug reports and development-related issues, and we prefer not to handle user-support questions here. (As noted on this page.) For best results getting help with configuration and troubleshooting, please use the following resources:

@github-actions
Copy link

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.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants