Giter Club home page Giter Club logo

u8glib-hal's People

Contributors

dbuezas avatar gmagician avatar idorobots avatar jmz52 avatar luxflow avatar manuelmclure avatar mathiasvr avatar p3p avatar ramiropolla avatar swills avatar thinkyhead avatar tpruvot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

u8glib-hal's Issues

Confusion over what U8glib is for

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.

[BUG] [dev] STM32F1 and SSD1306 compile problem

Description

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.

Steps to Reproduce

  1. Get new Marlin bugfix-2.0.x code and open in VS Code
  2. Make the following changes in "platformio.ini"
  • under [platformio]

    • env_default = STM32F1
  • under: [env:STM32F1]

    • change "lib_ignore = U8glib-HAL" to "lib_ignore = ;U8glib-HAL"
    • change "board = genericSTM32F103RE" to "board = genericSTM32F103CB"
  1. Make the following changes in "Configuration.h"
  • "#define SERIAL_PORT 0" to "#define SERIAL_PORT 1"
  • "#define MOTHERBOARD BOARD_RAMPS_14_EFB" to "#define MOTHERBOARD BOARD_MORPHEUS"
  • "//#define U8GLIB_SSD1306" to "#define U8GLIB_SSD1306"

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:

  1. Coplete: "### Steps to Reproduce"
  2. Get U8glib-HAL code from: November 2018: https://github.com/MarlinFirmware/U8glib-HAL/tree/99e44fa4903174ce8660860ee166504e13d0483a
  3. Replace "src" and "library.json" in "...\Marlin-bugfix-2.0.x.piolibdeps\U8glib-HAL_ID1932" with files from Nov 2018
  4. Restart VS Code

Additional Information

I am not sure why #6 causes these weird errors.

[SOLVED] https://github.com/MarlinFirmware/U8glib-HAL/archive/bugfix.zip : error 404

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 ?

REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER Random Movement

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

[BUG] Warnings when build

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)

Incorrect parameter to SPISettings in u8g_com_stm32duino_hw_spi.cpp

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).

U8glib-HAL 0.53 fails on Marlin STM builds

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

Typo in src/clib/u8g.h#L451

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.