marlinfirmware / u8glib-hal Goto Github PK
View Code? Open in Web Editor NEWCustomized U8glib for use in Marlin 2.0
License: Other
Customized U8glib for use in Marlin 2.0
License: Other
Could someone please add to the README.md page a description of exactly what use-cases this library is for, and whether it is required or optional for those cases? The blurb on https://github.com/MarlinFirmware says "Customized U8glib for use in Marlin 2.0"... which leads one to believe that it might be required for Marlin 2.0. But then the README says "AVR, Arduino & Due access to the library is not changed." Does that mean that the actual library functions are the same as regular U8glib, which might already be installed in the Arduino libraries? Or should this U8glib-HAL always be used for Marlin 2.0, in which case how to install it?
Also, what is "non-native". If that means "compiling in an environment other than Arduino", please spell that out. Thanks.
Don't know if this repo si still active I would like to know if it may be tollarated to change WIDTH define with LCD_WIDTH.
Related to MarlinFirmware/Marlin#14904
I may post a PR if it's ok
Add a library.properties file into this repository so Arduino IDE users can just drop this version of the library into their Arduino/libraries folder to provide Marlin with the correct U8glib-hal required to compile.
Example library.properties here https://github.com/MarlinFirmware/Marlin/files/6710738/library.properties.zip
Related issues:
MarlinFirmware/Marlin#22218
MarlinFirmware/Marlin#21967
MarlinFirmware/Marlin#21948
MarlinFirmware/Marlin#21995
It looks like #6 bricked my ability to us my Blue Pill (STM32F103CB) with an SSD1306 OLED.
(28e15cd)
By default "U8glib-HAL" is being ignored when compiling for STM32F1 but I found that it did work anyway before the Changes in #6 were made.
under [platformio]
under: [env:STM32F1]
Expected behavior:
I expected the Code to Compile.
Actual behavior:
It didn't :)
Some Errors from the Console:
C:\users[NAME].platformio\packages\[email protected]\STM32F1\cores\maple/wirish_types.h:65:9: error: unknown type name 'bool'
C:\users[NAME].platformio\packages\[email protected]\STM32F1\cores\maple/ext_interrupts.h:90:6: error: conflicting types for 'attachInterrupt'
C:\users[NAME].platformio\packages\[email protected]\STM32F1\cores\maple/wirish_math.h:50:6: error: conflicting types for 'random'
*** [.pioenvs\STM32F1\libe06\U8glib-HAL_ID1932\clib\u8g_com_arduino_common.c.o] Error 1
*** [.pioenvs\STM32F1\libe06\U8glib-HAL_ID1932\clib\u8g_com_arduino_fast_parallel.c.o] Error 1
Full console:
ERROR_STM32F1_SSD1306.txt
####HOTFIX
Since an older Version did compile, I was able to find where the error comes from. Here is how to get it working:
I am not sure why #6 causes these weird errors.
how to use this library in arduino for stm32g474re?
Hello,
It seems the U8glib-HAL library for Marlin bugfix disappeared.
Compiling Marlin (VSCode + PIO) gives this error :
FDUnrecognizedStatusCode: Got an unrecognized status code '404' when downloaded https://github.com/MarlinFirmware/U8glib-HAL/archive/bugfix.zip
typing "https://github.com/MarlinFirmware/U8glib-HAL/archive/bugfix.zip" in a browser also gives a 404 error (and by the way this link is a broken link)
As a result, U8glib-HAL is not installed.
Never had this issue before... Was a "archive" or "bugfix" branch recently removed from this repo ?
Hi, so the REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER is working fine, except the menu is erratic, sometime it will move to next item, sometimes it won't, sometimes it will jump four or five spaces after not doing anything.
Push click ok, display ok, just the scrolling issue
SKR v1.3, Marlin 2
Compiling .pioenvs/LPC1768/libe04/U8glib-HAL_ID1932/clib/u8g_com_msp430_hw_spi.c.o
.piolibdeps/LPC1768/U8glib-HAL_ID1932/src/clib/u8g_com_i2c.c:44:16: warning: 'u8g_i2c_opt' defined but not used [-Wunused-variable]
static uint8_t u8g_i2c_opt; /* U8G_I2C_OPT_NO_ACK, SAM: U8G_I2C_OPT_DEV_1 */
^~~~~~~~~~~
Compiling .pioenvs/LPC1768/libe04/U8glib-HAL_ID1932/clib/u8g_dev_ssd1309_128x64.c.o
.piolibdeps/LPC1768/U8glib-HAL_ID1932/src/clib/u8g_dev_ssd1306_128x32.c:153:22: warning: 'u8g_dev_ssd1306_128x32_univision_init_seq' defined but not used [-Wunused-const-variable=]
static const uint8_t u8g_dev_ssd1306_128x32_univision_init_seq[] PROGMEM = {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.piolibdeps/LPC1768/U8glib-HAL_ID1932/src/clib/u8g_dev_ssd1306_128x32.c:83:22: warning: 'u8g_dev_ssd1306_128x32_adafruit2_init_seq' defined but not used [-Wunused-const-variable=]
static const uint8_t u8g_dev_ssd1306_128x32_adafruit2_init_seq[] PROGMEM = {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.piolibdeps/LPC1768/U8glib-HAL_ID1932/src/clib/u8g_dev_ssd1306_128x32.c:48:22: warning: 'u8g_dev_ssd1306_128x32_adafruit1_init_seq' defined but not used [-Wunused-const-variable=]
static const uint8_t u8g_dev_ssd1306_128x32_adafruit1_init_seq[] PROGMEM = {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Compiling .pioenvs/LPC1768/libe04/U8glib-HAL_ID1932/clib/u8g_dev_ssd1322_nhd31oled_bw.c.o
.piolibdeps/LPC1768/U8glib-HAL_ID1932/src/clib/u8g_dev_ssd1306_128x64.c:146:22: warning: 'u8g_dev_ssd1306_128x64_univision_init_seq' defined but not used [-Wunused-const-variable=]
static const uint8_t u8g_dev_ssd1306_128x64_univision_init_seq[] PROGMEM = {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.piolibdeps/LPC1768/U8glib-HAL_ID1932/src/clib/u8g_dev_ssd1306_128x64.c:44:22: warning: 'u8g_dev_ssd1306_128x64_adafruit1_init_seq' defined but not used [-Wunused-const-variable=]
static const uint8_t u8g_dev_ssd1306_128x64_adafruit1_init_seq[] PROGMEM = {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Compiling .pioenvs/LPC1768/libe04/U8glib-HAL_ID1932/clib/u8g_u16toa.c.o
.piolibdeps/LPC1768/U8glib-HAL_ID1932/src/clib/u8g_rot.c:48:27: warning: initialization of 'uint8_t (*)(u8g_t *, u8g_dev_t *, uint8_t, void *)' {aka 'unsigned char (*)(struct _u8g_t *, struct _u8g_dev_t *, unsigned char, void *)'} from incompatible pointer type 'uint8_t (*)(void *, void *, uint8_t, void *)' {aka 'unsigned char (*)(void *, void *, unsigned char, void *)'} [-Wincompatible-pointer-types]
u8g_dev_t u8g_dev_rot = { u8g_dev_rot_dummy_fn, NULL, NULL };
^~~~~~~~~~~~~~~~~~~~
.piolibdeps/LPC1768/U8glib-HAL_ID1932/src/clib/u8g_rot.c:48:27: note: (near initialization for 'u8g_dev_rot.dev_fn')
Using stock CR10 LCD in ReARM+ramps1.4 (sl1pkn07/Marlin@8351042)
In the u8g_com_stm32duino_hw_spi_fn()
function in u8g_com_stm32duino_hw_spi.cpp
the SPISettings is initialized with SPI_CLOCK_DIV2
instead of a clock speed:
case U8G_COM_MSG_INIT:
u8g_SetPIOutput(u8g, U8G_PI_CS);
u8g_SetPIOutput(u8g, U8G_PI_A0);
u8g_SetPIOutput(u8g, U8G_PI_RESET);
u8g_SetPILevel(u8g, U8G_PI_CS, 1);
spiConfig = SPISettings(SPI_CLOCK_DIV2, MSBFIRST, SPI_MODE0);
SPI.begin();
break;
SPI_CLOCK_DIV2 is defined as:
// Compatibility with sketches designed for AVR @ 16 MHz could not
// be ensured as SPI frequency depends of system clock configuration.
// user have to use appropriate divider for the SPI clock
// This function should not be used in new project.
// Use SPISettings with SPI.beginTransaction() to configure SPI parameters.
#define SPI_CLOCK_DIV2 2
#define SPI_CLOCK_DIV4 4
#define SPI_CLOCK_DIV8 8
#define SPI_CLOCK_DIV16 16
#define SPI_CLOCK_DIV32 32
#define SPI_CLOCK_DIV64 64
#define SPI_CLOCK_DIV128 128
in the core. The SPI_CLOCK_x
constant was intended to be used with the obsolete SPI.setClockDivider(divider)
function.
I'm not 100% sure but I think the SPISettings
should be initialized with a speed of 2500000 (works fine with the FYSETC MINI 12864).
Visual Code informs this library was updated 22 hours ago from 0.52 to 0.53 but the libaray is broken for all STM compiles I try, forcing a roll back to 0.52 resolves the issue:
The error is below:
In file included from Marlin\src\lcd/dogm/u8g_fontutf8.h:11,
from Marlin\src\lcd/lcdprint.h:53,
from Marlin\src\lcd/marlinui.h:74,
from Marlin\src\MarlinCore.cpp:64:
.pio\libdeps\STM32F103RE_creality\U8glib-HAL\src/U8glib-HAL.h: In member function 'void U8GLIB_SSD1309_128X64_F::init(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t)':
.pio\libdeps\STM32F103RE_creality\U8glib-HAL\src/U8glib-HAL.h:944:110: error: 'u8g_dev_ssd1309_128x64_f_sw_spi' was not declared in this scope; did you mean 'u8g_dev_ssd1309_128x64_sw_spi'?
944 | void init(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) { U8GLIB::init(&u8g_dev_ssd1309_128x64_f_sw_spi, sck, mosi, cs, a0, reset); }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| u8g_dev_ssd1309_128x64_sw_spi
u8g.h Has
/* OLED 128x64 Display with SSD1309 Controller - Fast Single Page */
extern u8g_dev_t u8g_dev_ssd1309_128x64_f_sw_spi;
extern u8g_dev_t u8g_dev_ssd1309_128x64_f_hw_spi;
extern u8g_dev_t u8g_dev_ssd1309_128x64_f_sw_spi;
But last line should be
extern u8g_dev_t u8g_dev_ssd1309_128x64_f_i2c;
Also in platformio the download https://dl.registry.platformio.org/libraries/6b/fa/5589b9bdde2f8434f3753af1e086f7415ace71f9e7e05c486d3f3e656675/U8glib-HAL-0.5.3.tar.gz the updated u8g.h is not present
It can also be seen as missing in .pio/libdeps/{env}/U8glib-HAL/src/clib/u8g.h
which I cannot explain, its there if I download the library manually from github
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.