Xinyuan-LilyGO / T-Dongle-S3

An ESP32S3 development board that can freely use WIFI, BLE, TF, LED, TFT_LCD functions.
MIT License
144 stars 46 forks source link

compile issue with last esp-idf #16

Open chaabanihoussem opened 1 year ago

chaabanihoussem commented 1 year ago

Hi, I could not compile it with esp32 v5.x and I needed to use tiny midi usb which only included in that version all the compiling issues are with the LovyanGFX library I manage to compile with esp idf v4 but I can not use that version in my project

please update the current examples to the last esp idf or provide a screen example that compiles with the last esp idf thanks

limpens commented 1 year ago

A quick fix is to retrieve a newer version of LovyanGFX. The example was based on an older version.

cd into components/LovyanGFX and do a git checkout master Depending on your version of esp-idf, you might need to change the test on line 812 in LovyanGFX/src/lgfx/v1/platforms/esp32/common.cpp.

Using ESP-IDF v5.1.1-dirty, I needed to change the value from 5,1,0 to 5,1,2:


--- a/src/lgfx/v1/platforms/esp32/common.cpp
+++ b/src/lgfx/v1/platforms/esp32/common.cpp
@@ -806,7 +806,7 @@ namespace lgfx
         cmd_val |= (1 << 10); // ACK_VALUE (set NACK)
       }
 #if defined (CONFIG_IDF_TARGET_ESP32S3)
- #if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 2) && ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 1, 0))
+ #if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 2) && ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 1, 2))
       (&dev->comd[0])[index].val = cmd_val;
  #else
       (&dev->comd0)[index].val = cmd_val;