Most Wanted
Most Wanted

Reputation: 7069

Cannot build LVGL for esp32 MicroPython

I'm trying to build MicroPython with LVGL for my esp32s3 following this doc, but getting an error for both generic make and make BOARD=GENERIC_S3 commands.

/Users/lilygo/lv_micropython/ports/esp32/network_common.c:220:1: error: static assertion failed: "Synchronize WIFI_AUTH_XXX constants with the ESP-IDF. Look at esp-idf/components/esp_wifi/include/esp_wifi_types.h"
 _Static_assert(WIFI_AUTH_MAX == TEST_WIFI_AUTH_MAX, "Synchronize WIFI_AUTH_XXX constants with the ESP-IDF. Look at esp-idf/components/esp_wifi/include/esp_wifi_types.h");
 ^~~~~~~~~~~~~~
[1393/1743] Building C object esp-idf/main/CMakeFiles.../lilygo/lv_micropython/lib/littlefs/lfs2.c.obj
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
-e See https://github.com/micropython/micropython/wiki/Build-Troubleshooting
make: *** [all] Error 1

idf.py installation has been done like this (as ESP32-S3 currently requires v4.4 or later)

git clone -b release/v4.4 --recursive https://github.com/espressif/esp-idf.git
git submodule update --init --recursive
./install.sh
idf.py --version
ESP-IDF v4.4.7-143-g309ffa5565

How can I debug/fix this error? I found nothing on Build Trobleshooting page and there is no Issues section on lvgl port repository

Upvotes: 0

Views: 788

Answers (2)

Mouse
Mouse

Reputation: 141

I think we should amend ports/esp32/network_common.c of lv_micropython project.

change

#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 3, 0)
    #define TEST_WIFI_AUTH_MAX 9

to

#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 3, 0)
    #define TEST_WIFI_AUTH_MAX 10

the actual number that you should count the position of WIFI_AUTH_MAX at enum wifi_auth_mode_t inside esp-idf/components/esp_wifi/include/esp_wifi_types.h

for my v4.4.8, it's 10, actual position is 11th, but has 1 duplication.

Upvotes: 1

Nicole K
Nicole K

Reputation: 13

Just fixed this problem myself. I had to go into my esp/esp-idf/components/esp_wifi/include/esp_wifi_types_generic.h file and change line 77 to say WIFI_AUTH_MAX = 13 (just added the " = 13"). I've seen some boards saying to change the number to 11. The error message should tell you what value it was expecting. In your case I suppose that would be "TEST_WIFI_AUTH_MAX"

Upvotes: 1

Related Questions