m5stack / M5Dial-UserDemo

M5Dial user demo for hardware evaluation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LovyanGFX does not build in VSCode ESP_IDF

MotoBarsteward opened this issue · comments

commented
C:/ESP-IDF/M5Dial-UserDemo-main/components/LovyanGFX/src/lgfx/v1/platforms/esp32s3/Bus_Parallel16.cpp: In member function 'virtual void lgfx::v1::Bus_Parallel16::beginTransaction()':
C:/ESP-IDF/M5Dial-UserDemo-main/components/LovyanGFX/src/lgfx/v1/platforms/esp32s3/Bus_Parallel16.cpp:181:66: error: 'LCD_CAM_LCD_UPDATE_REG' was not declared in this scope; did you mean 'LCD_CAM_LCD_UPDATE_M'?
  181 |     dev->lcd_user.val = LCD_CAM_LCD_2BYTE_EN | LCD_CAM_LCD_CMD | LCD_CAM_LCD_UPDATE_REG;
      |                                                                  ^~~~~~~~~~~~~~~~~~~~~~
      |                                                                  LCD_CAM_LCD_UPDATE_M

Again, noting that this is a library from else where copied into your repo. In ESP-IDF 5.2.1, it appears that LCD_CAM_LCD_UPDATE_REG has been removed from lcd_cam_reg.h. LCD_CAM_LCD_UPDATE has the same bit value assigned to it so, I suggest, Bus_Parallel8.cpp and Bus_parallel16.cpp are changed to replace LCD_CAM_LCD_UPDATE_REG with LCD_CAM_LCD_UPDATE

C:/ESP-IDF/M5Dial-UserDemo-main/components/LovyanGFX/src/lgfx/v1/platforms/esp32/common.cpp: In function 'cpp::bitwizeshift::result<void, lgfx::v1::error_t> lgfx::v1::spi::init(int, int, int, int, int)':
C:/ESP-IDF/M5Dial-UserDemo-main/components/LovyanGFX/src/lgfx/v1/platforms/esp32/common.cpp:314:29: error: 'INTR_CPU_ID_AUTO' was not declared in this scope
  314 |         buscfg.isr_cpu_id = INTR_CPU_ID_AUTO; 

ESP-IDF 5.2.1 has changed the isr cpu id macro as suggested here. Changing line 314 to
buscfg.isr_cpu_id = ESP_INTR_CPU_AFFINITY_AUTO;
fixes the build issue