iperf example fails to compile for ESP32-P4

rosspeters-precision
Posts: 1
Joined: Thu Oct 24, 2024 10:03 pm

iperf example fails to compile for ESP32-P4

Postby rosspeters-precision » Thu Oct 24, 2024 10:16 pm

I am attempting to run the Wi-Fi iperf example on an ESP32-P4 Function_EV_Board V1.4, but it is failing to compile.

I am unable to use `idf.py build` to run the examples/wifi/iperf application in v5.3.1 of ESP-IDF. I did set the target as esp32p4..

It seems like the proper files are not being included, because it's complaining about undefined functions that do exist in ESP-IDF. Including a snippet below, attaching the full build log.

Two questions:
- Is this iperf example expected to compile for ESP32-P4? It does say it is supported in the example's README.
- This ESP32-P4 dev board includes an ESP32-C6 mini. My understanding is I need to use the ESP32-C6 mini as the Wi-Fi chip. How do I flash the ESP32-C6 for the iperf project?

Thank you very much for your time and support.


Compilation Log:

Code: Select all

/Users/r/workspace/esp-idf/examples/wifi/iperf/main/iperf_example_main.c: In function 'app_main':
/Users/r/workspace/esp-idf/examples/wifi/iperf/main/iperf_example_main.c:80:5: error: unknown type name 'app_wifi_initialise_config_t'; did you mean 'wifi_init_config_t'?
   80 |     app_wifi_initialise_config_t config = APP_WIFI_CONFIG_DEFAULT();
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |     wifi_init_config_t
/Users/r/workspace/esp-idf/examples/wifi/iperf/main/iperf_example_main.c:80:43: error: implicit declaration of function 'APP_WIFI_CONFIG_DEFAULT'; did you mean 'WIFI_INIT_CONFIG_DEFAULT'? [-Werror=implicit-function-declaration]
   80 |     app_wifi_initialise_config_t config = APP_WIFI_CONFIG_DEFAULT();
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~
      |                                           WIFI_INIT_CONFIG_DEFAULT
/Users/r/workspace/esp-idf/examples/wifi/iperf/main/iperf_example_main.c:81:11: error: request for member 'storage' in something not a structure or union
   81 |     config.storage = WIFI_STORAGE_RAM;
      |           ^
/Users/r/workspace/esp-idf/examples/wifi/iperf/main/iperf_example_main.c:82:11: error: request for member 'ps_type' in something not a structure or union
   82 |     config.ps_type = WIFI_PS_NONE;
      |           ^
/Users/r/workspace/esp-idf/examples/wifi/iperf/main/iperf_example_main.c:83:5: error: implicit declaration of function 'app_initialise_wifi' [-Werror=implicit-function-declaration]
   83 |     app_initialise_wifi(&config);
      |     ^~~~~~~~~~~~~~~~~~~
/Users/r/workspace/esp-idf/examples/wifi/iperf/main/iperf_example_main.c:114:5: error: implicit declaration of function 'app_register_all_wifi_commands'; did you mean 'app_register_ping_commands'? [-Werror=implicit-function-declaration]
  114 |     app_register_all_wifi_commands();
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |     app_register_ping_commands
Attachments
iperf_p4_build.rtf
(31.46 KiB) Downloaded 205 times

chmod000
Posts: 2
Joined: Wed Jul 17, 2024 5:40 am

Re: iperf example fails to compile for ESP32-P4

Postby chmod000 » Tue Dec 31, 2024 11:55 pm

I was seeing the same issue. There is a file called "sdkconfig.ci.esp32p4_with_extconn" in the directory that shows some sdkconfig settings. Specifically:

CONFIG_IDF_TARGET="esp32p4"
CONFIG_ESP_HOST_WIFI_ENABLED=y
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y

After manually configuring my project to match using idf.py menuconfig, the project successfully built. However, when running the resulting binary on a ESP32-P4-Function-EV-Board, I'm seeing:

Code: Select all

E (546) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
HINT: Please reboot the board and then try again
W (546) fw_dl: slave init failed 0x107, retry...
E (1073) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
HINT: Please reboot the board and then try again
W (1073) fw_dl: slave init failed 0x107, retry...
E (1600) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
HINT: Please reboot the board and then try again
W (1600) fw_dl: slave init failed 0x107, retry...
E (2127) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
HINT: Please reboot the board and then try again
W (2127) fw_dl: slave init failed 0x107, retry...
E (2654) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
HINT: Please reboot the board and then try again
W (2654) fw_dl: slave init failed 0x107, retry...
E (3181) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
HINT: Please reboot the board and then try again
W (3181) fw_dl: slave init failed 0x107, retry...
E (3708) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
HINT: Please reboot the board and then try again
W (3708) fw_dl: slave init failed 0x107, retry...
E (4235) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
HINT: Please reboot the board and then try again
W (4235) fw_dl: slave init failed 0x107, retry...
E (4762) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
HINT: Please reboot the board and then try again
W (4762) fw_dl: slave init failed 0x107, retry...
I'll keep digging but it woudl be helpful if someone from Espressif could comment.

JohnnyZ
Posts: 36
Joined: Thu Jan 11, 2024 10:24 am

Re: iperf example fails to compile for ESP32-P4

Postby JohnnyZ » Sat Jan 11, 2025 2:13 pm

You are using incorrect SDIO pins.
When wrong pins are used:
E (440) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
W (440) fw_dl: slave init failed 0x107, retry...
E (967) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
W (967) fw_dl: slave init failed 0x107, retry...
When correct pins are used:
I (459) fw_dl: sdmmc init success 0x0
Name:
Type: SDIO
Speed: 20.00 MHz (limit: 20.00 MHz)
Size: 0MB
CSD: ver=1, sector_size=0, capacity=0 read_bl_len=0
SCR: sd_spec=0, bus_width=0
I (496) esp_host: IOE: 0x06
I (496) esp_host: IE: 0x07
I (496) esp_host: BUS_WIDTH GET: 0x42
I (496) esp_host: BUS_WIDTH SET: 0x62
I (496) esp_host: Function 1 read: 0000
I (500) esp_host: Function 1 set: 0200
You can set SDIO pins with with:
idf menuconfig

Component config → ESP external connectivity
(54) Slave enable pin
(1) Slave enable gpio level
(6) Slave boot pin
Component config → ESP external connectivity → IO Configuration → SDIO Slot configuration
(1) host slot
(18) clk
(19) cmd
(14) D0
(15) D1
(16) D2
(17) D3
However, I didn't managed to get much further:
E (510) sdmmc_io: sdmmc_io_rw_extended: sdmmc_send_cmd returned 0x107
E (516) esp_host: read ESP_SLC_CONF1_REG error 0x107
E (521) esp_host: esp_extconn_sdio_init(210): esp host init slave link failed
I (528) extconn: extconn init ret 0x107

Who is online

Users browsing this forum: No registered users and 1 guest