esp32_nat_router icon indicating copy to clipboard operation
esp32_nat_router copied to clipboard

Build with esp-idf V5.4

Open nopnop2002 opened this issue 4 months ago • 2 comments

When I build with esp-idf V5.4, I got this error.

Compilation failed because cmd_router.c (in "cmd_router" component) includes spi_flash_mmap.h, provided by spi_flash component(s).
However, spi_flash component(s) is not in the requirements list of "cmd_router".
To fix this, add spi_flash to PRIV_REQUIRES list of idf_component_register call in /home/nop/esp32_nat_router/components/cmd_router/CMakeLists.txt.

So i changed components/cmd_router/CMakeLists.txt.

idf_component_register(SRCS "cmd_router.c"
                    INCLUDE_DIRS .
                    REQUIRES console nvs_flash esp_wifi driver spi_flash)

We can build with esp-idf V5.4.

On some ESP32S3 boards it gets stuck at:

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce2820,len:0x10e4
load:0x403c8700,len:0x4
load:0x403c8704,len:0xa8c
load:0x403cb700,len:0x2d08
entry 0x403c8894

You will need to edit sdkconfig.defaults and rebuild the binary image.

# Use built in USB_SERIAL_JTAG for console output (S3 and C3)
#CONFIG_ESP_CONSOLE_UART_DEFAULT=n
#CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y
#CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG_ENABLED=y
rm -r build
rm sdkconfig
idf.py set-target esp32s3
idf.py flash monitor

nopnop2002 avatar Jul 22 '25 05:07 nopnop2002