← index #14350PR #15733
Related · high · value 3.275
QUERY · ISSUE

Build micropython for ESP32 ports & ESP-IDF v5.06. failed with static-assert

openby aso-copened 2024-04-22updated 2024-04-29
bugport-esp32

Checks

  • I agree to follow the MicroPython Code of Conduct to ensure a safe and respectful space for everyone.

  • I've searched for existing issues matching this bug, and didn't find any.

Port, board and/or hardware

esp32 port, ESP32-boards, all variants

MicroPython version

MicroPython v1.22.2-dirty on 2024-04-18; Generic ESP32 module with ESP32; ESP-IDF v.5.0.6

Reproduction

make

Expected behaviour

Build micrpopython port for ESP32, simply make. ;))

Observed behaviour

Build process failed by the static assert with message:

"Synchronize WIFI_AUTH_XXX constants with the ESP-IDF. Look at esp-idf/components/esp_wifi/include/esp_wifi_types.h"

Additional Information

I discover this trouble and detect, that Espressif upgrade it's code in all 5.x.y branches.
Now:

  • location in file: - ports/esp32/network_common.c
  • line: 171
  • source code:
#if ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(5, 1, 1)
_Static_assert(WIFI_AUTH_MAX == 11, "Synchronize WIFI_AUTH_XXX constants with the ESP-IDF. Look at esp-idf/components/esp_wifi/include/esp_wifi_types.h");
#else
_Static_assert(WIFI_AUTH_MAX == 10, "Synchronize WIFI_AUTH_XXX constants with the ESP-IDF. Look at esp-idf/components/esp_wifi/include/esp_wifi_types.h");
#endif
  • Solition: update code as below:
#if ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(5, 1, 1)
_Static_assert(WIFI_AUTH_MAX == 11, "Synchronize WIFI_AUTH_XXX constants with the ESP-IDF. Look at esp-idf/components/esp_wifi/include/esp_wifi_types.h");
//-- Upd begin -----------------------------------------------------------------------
#elif ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(5, 0, 4)
_Static_assert(WIFI_AUTH_MAX == 11, "Synchronize WIFI_AUTH_XXX constants with the ESP-IDF. Look at esp-idf/components/esp_wifi/include/esp_wifi_types.h");
//-- Upd end -------------------------------------------------------------------------
#else
_Static_assert(WIFI_AUTH_MAX == 10, "Synchronize WIFI_AUTH_XXX constants with the ESP-IDF. Look at esp-idf/components/esp_wifi/include/esp_wifi_types.h");
#endif

Upd: I'm detect, that in ESP-IDF, branch v5.2.x - WIFI_AUTH_MAX == 13

CANDIDATE · PULL REQUEST

ports/esp32: Add basic espressif IDF v5.3 compatibility.

mergedby andrewleechopened 2024-08-28updated 2024-12-18
port-esp32

Summary

Espressif have recently release IDF v5.3, this PR is working towards basic compatibility with it.

Testing

I've initially tried running this on a C3 device which only has the builtin USB exposed (no uart->usb).
I do not get repl on the USB connection however, nothing is seen over the USB port after the initial reboot / startup text:

--- esp-idf-monitor 1.4.0 on /dev/ttyUSB0 460800 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0xf (SPI_FAST_FLASH_BOOT)
Saved PC:0x4200832c
0x4200832c: usb_serial_jtag_ll_txfifo_writable at /opt/esp/idf/components/hal/esp32c3/include/hal/usb_serial_jtag_ll.h:160
 (inlined by) usb_serial_jtag_tx_strn at /home/anl/micropython/ports/esp32/usb_serial_jtag.c:109

SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5820,len:0xf28
load:0x403cc710,len:0x93c
load:0x403ce710,len:0x2ac8
entry 0x403cc710

Trade-offs and Alternatives

Unknown at this point.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied