Thank you for the work done on Marlin firmware to fix many stuff on the ESP32 HAL.
I tried to compile bugfix-2.0.x which has all your changes, but when I try to compile for CR10_STOCKDISPLAY (the one that Ender-3 uses, right?), I get the following error. I was wondering how you went around this error.
I have U8glib 1.19.1 installed.
In file included from /tmp/arduino_build_790171/sketch/src/lcd/dogm/../../inc/MarlinConfigPre.h:32:0,
from /tmp/arduino_build_790171/sketch/src/lcd/dogm/../../inc/MarlinConfig.h:28,
from /tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp:26:
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp: In function 'void ST7920_SWSPI_SND_8BIT(uint8_t)':
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h:33:25: error: 'LCD_PINS_ENABLE' was not declared in this scope
#define ST7920_DAT_PIN LCD_PINS_ENABLE
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/../../inc/../core/macros.h:77:23: note: in definition of macro 'TEST'
#define TEST(n,b) !!((n)&_BV(b))
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/../../inc/../HAL/HAL_ESP32/fastio_ESP32.h:47:34: note: in expansion of macro 'IS_I2S_EXPANDER_PIN'
#define WRITE(IO, v) (IS_I2S_EXPANDER_PIN(IO) ? i2s_write(I2S_EXPANDER_PIN_INDEX(IO), v) : digitalWrite(IO, v))
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp:47:3: note: in expansion of macro 'WRITE'
WRITE(ST7920_DAT_PIN, val & 0x80); ST7920_DELAY_2; \
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp:47:9: note: in expansion of macro 'ST7920_DAT_PIN'
WRITE(ST7920_DAT_PIN, val & 0x80); ST7920_DELAY_2; \
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp:55:3: note: in expansion of macro 'ST7920_SND_BIT'
ST7920_SND_BIT; // 1
^
In file included from /tmp/arduino_build_790171/sketch/src/lcd/dogm/../../inc/../HAL/HAL_ESP32/HAL.h:37:0,
from /tmp/arduino_build_790171/sketch/src/lcd/dogm/../../inc/MarlinConfig.h:30,
from /tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp:26:
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp: In function 'uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t*, u8g_dev_t*, uint8_t, void*)':
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h:34:25: error: 'LCD_PINS_RS' was not declared in this scope
#define ST7920_CS_PIN LCD_PINS_RS
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/../../inc/../HAL/HAL_ESP32/fastio_ESP32.h:38:41: note: in definition of macro '_SET_OUTPUT'
#define _SET_OUTPUT(IO) pinMode(IO, OUTPUT)
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp:69:7: note: in expansion of macro 'OUT_WRITE'
OUT_WRITE(ST7920_CS_PIN, LOW);
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp:69:17: note: in expansion of macro 'ST7920_CS_PIN'
OUT_WRITE(ST7920_CS_PIN, LOW);
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h:33:25: error: 'LCD_PINS_ENABLE' was not declared in this scope
#define ST7920_DAT_PIN LCD_PINS_ENABLE
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/../../inc/../HAL/HAL_ESP32/fastio_ESP32.h:38:41: note: in definition of macro '_SET_OUTPUT'
#define _SET_OUTPUT(IO) pinMode(IO, OUTPUT)
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp:70:7: note: in expansion of macro 'OUT_WRITE'
OUT_WRITE(ST7920_DAT_PIN, LOW);
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp:70:17: note: in expansion of macro 'ST7920_DAT_PIN'
OUT_WRITE(ST7920_DAT_PIN, LOW);
^
In file included from /tmp/arduino_build_790171/sketch/src/lcd/dogm/../../inc/MarlinConfigPre.h:32:0,
from /tmp/arduino_build_790171/sketch/src/lcd/dogm/../../inc/MarlinConfig.h:28,
from /tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp:26:
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h:34:25: error: 'LCD_PINS_RS' was not declared in this scope
#define ST7920_CS_PIN LCD_PINS_RS
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/../../inc/../core/macros.h:77:23: note: in definition of macro 'TEST'
#define TEST(n,b) !!((n)&_BV(b))
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/../../inc/../HAL/HAL_ESP32/fastio_ESP32.h:47:34: note: in expansion of macro 'IS_I2S_EXPANDER_PIN'
#define WRITE(IO, v) (IS_I2S_EXPANDER_PIN(IO) ? i2s_write(I2S_EXPANDER_PIN_INDEX(IO), v) : digitalWrite(IO, v))
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h:90:36: note: in expansion of macro 'WRITE'
#define ST7920_CS() { WRITE(ST7920_CS_PIN,1); U8G_DELAY(); }
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h:90:42: note: in expansion of macro 'ST7920_CS_PIN'
#define ST7920_CS() { WRITE(ST7920_CS_PIN,1); U8G_DELAY(); }
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp:73:7: note: in expansion of macro 'ST7920_CS'
ST7920_CS();
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h:34:25: error: 'LCD_PINS_RS' was not declared in this scope
#define ST7920_CS_PIN LCD_PINS_RS
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/../../inc/../core/macros.h:77:23: note: in definition of macro 'TEST'
#define TEST(n,b) !!((n)&_BV(b))
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/../../inc/../HAL/HAL_ESP32/fastio_ESP32.h:47:34: note: in expansion of macro 'IS_I2S_EXPANDER_PIN'
#define WRITE(IO, v) (IS_I2S_EXPANDER_PIN(IO) ? i2s_write(I2S_EXPANDER_PIN_INDEX(IO), v) : digitalWrite(IO, v))
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h:91:36: note: in expansion of macro 'WRITE'
#define ST7920_NCS() { WRITE(ST7920_CS_PIN,0); }
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h:91:42: note: in expansion of macro 'ST7920_CS_PIN'
#define ST7920_NCS() { WRITE(ST7920_CS_PIN,0); }
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp:91:7: note: in expansion of macro 'ST7920_NCS'
ST7920_NCS();
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h:34:25: error: 'LCD_PINS_RS' was not declared in this scope
#define ST7920_CS_PIN LCD_PINS_RS
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/../../inc/../core/macros.h:77:23: note: in definition of macro 'TEST'
#define TEST(n,b) !!((n)&_BV(b))
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/../../inc/../HAL/HAL_ESP32/fastio_ESP32.h:47:34: note: in expansion of macro 'IS_I2S_EXPANDER_PIN'
#define WRITE(IO, v) (IS_I2S_EXPANDER_PIN(IO) ? i2s_write(I2S_EXPANDER_PIN_INDEX(IO), v) : digitalWrite(IO, v))
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h:90:36: note: in expansion of macro 'WRITE'
#define ST7920_CS() { WRITE(ST7920_CS_PIN,1); U8G_DELAY(); }
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h:90:42: note: in expansion of macro 'ST7920_CS_PIN'
#define ST7920_CS() { WRITE(ST7920_CS_PIN,1); U8G_DELAY(); }
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp:103:7: note: in expansion of macro 'ST7920_CS'
ST7920_CS();
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h:34:25: error: 'LCD_PINS_RS' was not declared in this scope
#define ST7920_CS_PIN LCD_PINS_RS
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/../../inc/../core/macros.h:77:23: note: in definition of macro 'TEST'
#define TEST(n,b) !!((n)&_BV(b))
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/../../inc/../HAL/HAL_ESP32/fastio_ESP32.h:47:34: note: in expansion of macro 'IS_I2S_EXPANDER_PIN'
#define WRITE(IO, v) (IS_I2S_EXPANDER_PIN(IO) ? i2s_write(I2S_EXPANDER_PIN_INDEX(IO), v) : digitalWrite(IO, v))
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h:91:36: note: in expansion of macro 'WRITE'
#define ST7920_NCS() { WRITE(ST7920_CS_PIN,0); }
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h:91:42: note: in expansion of macro 'ST7920_CS_PIN'
#define ST7920_NCS() { WRITE(ST7920_CS_PIN,0); }
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp:118:7: note: in expansion of macro 'ST7920_NCS'
ST7920_NCS();
^
In file included from /tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_DOGM.cpp:42:0:
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_DOGM.h:50:36: error: 'LCD_PINS_ENABLE' was not declared in this scope
#define U8G_PARAM LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS // Number of stripes can be adjusted in ultralcd_st7920_u8glib_rrd.h with PAGE_HEIGHT
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_DOGM.cpp:78:15: note: in expansion of macro 'U8G_PARAM'
U8G_CLASS u8g(U8G_PARAM);
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_DOGM.h:50:53: error: 'LCD_PINS_RS' was not declared in this scope
#define U8G_PARAM LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS // Number of stripes can be adjusted in ultralcd_st7920_u8glib_rrd.h with PAGE_HEIGHT
^
/tmp/arduino_build_790171/sketch/src/lcd/dogm/ultralcd_DOGM.cpp:78:15: note: in expansion of macro 'U8G_PARAM'
U8G_CLASS u8g(U8G_PARAM);
^
Error compiling for board ESP32 Dev Module.
After declaring the pins required, I get the following error instead.
/tmp/arduino_build_790171/sketch/src/HAL/HAL_AVR/u8g_com_HAL_AVR_sw_spi.cpp: In function 'void u8g_com_arduino_init_shift_out(uint8_t, uint8_t)':
/tmp/arduino_build_790171/sketch/src/HAL/HAL_AVR/u8g_com_HAL_AVR_sw_spi.cpp:71:15: error: cannot convert 'volatile uint32_t* {aka volatile unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
u8g_outData = portOutputRegister(digitalPinToPort(dataPin));
^
/tmp/arduino_build_790171/sketch/src/HAL/HAL_AVR/u8g_com_HAL_AVR_sw_spi.cpp:72:16: error: cannot convert 'volatile uint32_t* {aka volatile unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
u8g_outClock = portOutputRegister(digitalPinToPort(clockPin));