Welcome! Log In Create A New Profile

Advanced

U8GLIB Error, preventing compiling

Posted by Tempest815 
U8GLIB Error, preventing compiling
November 05, 2019 07:41AM
Hello!

I'm getting the following error on compiling the marlin firmware for my printer (Marlin 1.1.3):

In file included from sketch\ultralcd.cpp:65:0:

sketch\ultralcd_impl_DOGM.h: In function 'void lcd_implementation_init()':

ultralcd_impl_DOGM.h:308:94: error: no matching function for call to 'U8GLIB_ST7920_128X64_RRD::drawStr(const uint8_t&, int, double)'

           u8g.drawStr(txt1X, u8g.getHeight() - (DOG_CHAR_HEIGHT) * 3 / 2, STRING_SPLASH_LINE1);

                                                                                              ^

In file included from sketch\ultralcd_st7920_u8glib_rrd.h:41:0,

                 from sketch\ultralcd_impl_DOGM.h:46,

                 from sketch\ultralcd.cpp:65:

C:\Users\Owner\Documents\Arduino\libraries\U8glib/U8glib.h:171:16: note: candidate: u8g_uint_t U8GLIB::drawStr(u8g_uint_t, u8g_uint_t, const char*)

     u8g_uint_t drawStr(u8g_uint_t x, u8g_uint_t y, const char *s) { return u8g_DrawStr(&u8g, x, y, s); }

                ^~~~~~~

C:\Users\Owner\Documents\Arduino\libraries\U8glib/U8glib.h:171:16: note:   no known conversion for argument 3 from 'double' to 'const char*'

C:\Users\Owner\Documents\Arduino\libraries\U8glib/U8glib.h:201:16: note: candidate: u8g_uint_t U8GLIB::drawStr(u8g_uint_t, u8g_uint_t, const __FlashStringHelper*)

     u8g_uint_t drawStr(u8g_uint_t x, u8g_uint_t y, const __FlashStringHelper *s) { return u8g_DrawStrP(&u8g, x, y, (u8g_pgm_uint8_t *)s); }

                ^~~~~~~

C:\Users\Owner\Documents\Arduino\libraries\U8glib/U8glib.h:201:16: note:   no known conversion for argument 3 from 'double' to 'const __FlashStringHelper*'

Multiple libraries were found for "U8glib.h"
 Used: C:\Users\Owner\Documents\Arduino\libraries\U8glib
exit status 1
no matching function for call to 'U8GLIB_ST7920_128X64_RRD::drawStr(const uint8_t&, int, double)'

This is being compiled on a new machine, so I'm not sure if that has something to do with it. I've tried to remove extra instances of U8GLIB to no avail. I have a working firmware version loaded on the board, but I think my measurements are off in terms of build volume on the old firmware, so it needs to be updated. I've been working on this printer for years now off and on and I'm so very close to getting it running, this is driving me mad. I'm a bit of a novice with Marlin so this just eludes me and I don't know where to begin.

Any help would be greatly appreciated.

Edited 1 time(s). Last edit at 11/05/2019 07:47AM by Tempest815.
Re: U8GLIB Error, preventing compiling
November 05, 2019 08:17AM
delete the directory C:\Users\Owner\Documents\Arduino\libraries\U8glib and try again
Re: U8GLIB Error, preventing compiling
November 05, 2019 08:44AM
I updated to 1.1.9 just to see if that would compile, and it did!

But now my graphic controller is heavily artifacted and I'm not sure where the issue is. There were no issues in compiling, no error messages, so now I'm not sure what's what.
Attachments:
open | download - 20191105_084014.jpg (350.1 KB)
Re: U8GLIB Error, preventing compiling
November 05, 2019 04:52PM
Aaaaaand now the motion is totally broken. Ignoring endstops, placing endstop 0.00 at the furthest end of travel, etc. Should I just make a new topic, or just keep dumping my sorrows here?
Re: U8GLIB Error, preventing compiling
November 05, 2019 05:03PM
You replaced the brain of your printer with a new brain, but didn't teach it anything about the body it was in...

You need to configure the firmware to match your hardware.
Re: U8GLIB Error, preventing compiling
November 05, 2019 05:13PM
Quote
Dust
You replaced the brain of your printer with a new brain, but didn't teach it anything about the body it was in...

You need to configure the firmware to match your hardware.

See, I thought I did. I have all my settings ported over, all should be okay. Also when I send M119 I get every endstop reading TRIGGERED. I can upload the configuration tomorrow, but that still doesn't explain the corrupt graphics controller.

So, basically:

Motion is frozen
Corrupt display
All endstops reading TRIGGERED
Re: U8GLIB Error, preventing compiling
November 05, 2019 06:38PM
With endstops triggered the printer thinks its at min and max position at the same time....
it cant move when it thinks its trapped between two endstops

Does the endstop change to open when you close the switch? if so you just need to invert the endstop,
If the endstops don't change it could be pullups aren't enabled


You need to play with the lcd timings

In configuration.h add these to override the defaults.

#define ST7920_DELAY_1 DELAY_NS(0)
#define ST7920_DELAY_2 DELAY_NS(0)
#define ST7920_DELAY_3 DELAY_NS(63) // these are the default values for a 16mhz processor (ie a mega2560)

which is used in this bit of code

#define ST7920_SND_BIT \
WRITE(ST7920_CLK_PIN, LOW); ST7920_DELAY_1; \
WRITE(ST7920_DAT_PIN, val & 0x80); ST7920_DELAY_2; \
WRITE(ST7920_CLK_PIN, HIGH); ST7920_DELAY_3; \
val <<= 1

which means for each bit that is sent
set the clock pin low and wait delay_1
set the data pin and wait delay_2
set the clock pin high and wait delay_3

Other have found that setting #define ST7920_DELAY_3 DELAY_NS(125) works for them.. but it depends on how slow your lcd is...

Edited 3 time(s). Last edit at 11/05/2019 07:18PM by Dust.
Re: U8GLIB Error, preventing compiling
November 06, 2019 12:57PM
Got it back to running motion properly and screen is back to normal, many thanks!

However there's one final problem; the extruder seems to be under extruding or not feeding fast enough, any insight into how to fix that?

#define DEFAULT_MAX_ACCELERATION (4500, 4500, 50, 3200)

Should I double 3200 and see what happens?
Re: U8GLIB Error, preventing compiling
November 07, 2019 12:19PM
Figured out where the new problem is, thanks for the help!
Sorry, only registered users may post in this forum.

Click here to login