Wifi Provisioning example in ESP-IDF-V5.0 not flashing onto chip

karunt
Posts: 93
Joined: Sat Apr 03, 2021 7:58 am

Wifi Provisioning example in ESP-IDF-V5.0 not flashing onto chip

Postby karunt » Fri Jan 06, 2023 2:17 pm

I'm using the ESP_DevKitC-v4 board which has a ESP-WROOM-32D chip. Trying to flash the wifi-provision example (from ESP-IDF-V5.0) on it fails. Here is the list of errors I get:
from C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c:16:
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c:31:26: error: expected '{' before '(' token
31 | STAILQ_HEAD(http_header, (http_header_item));
| ^
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c: In function 'http_header_init':
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c:38:5: error: 'struct http_heade
' has no member named 'stqh_first'
38 | STAILQ_INIT(header);
| ^~~~~~~~~~~
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c:38:5: error: 'struct http_heade
' has no member named 'stqh_last'
38 | STAILQ_INIT(header);
| ^~~~~~~~~~~
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c:38:5: error: 'struct http_heade
' has no member named 'stqh_first'
38 | STAILQ_INIT(header);
| ^~~~~~~~~~~
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c: In function 'http_header_get_item':
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c:55:5: error: 'struct http_heade
' has no member named 'stqh_first'
55 | STAILQ_FOREACH(item, header, next) {
| ^~~~~~~~~~~~~~
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c: In function 'http_header_new_item':
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c:90:5: error: 'struct http_heade
' has no member named 'stqh_last'
90 | STAILQ_INSERT_TAIL(header, item, next);
| ^~~~~~~~~~~~~~~~~~
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c:90:5: error: 'struct http_heade
' has no member named 'stqh_last'
90 | STAILQ_INSERT_TAIL(header, item, next);
| ^~~~~~~~~~~~~~~~~~
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c: In function 'http_header_delet
':
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c:142:9: error: 'struct http_header' has no member named 'stqh_first'
142 | STAILQ_REMOVE(header, item, http_header_item, next);
| ^~~~~~~~~~~~~
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c:142:9: error: 'struct http_header' has no member named 'stqh_first'
142 | STAILQ_REMOVE(header, item, http_header_item, next);
| ^~~~~~~~~~~~~
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c:142:9: error: 'struct http_header' has no member named 'stqh_first'
142 | STAILQ_REMOVE(header, item, http_header_item, next);
| ^~~~~~~~~~~~~
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c:142:9: error: 'struct http_header' has no member named 'stqh_last'
142 | STAILQ_REMOVE(header, item, http_header_item, next);
| ^~~~~~~~~~~~~
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c:142:9: error: 'struct http_header' has no member named 'stqh_first'
142 | STAILQ_REMOVE(header, item, http_header_item, next);
| ^~~~~~~~~~~~~
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c:142:9: error: 'struct http_header' has no member named 'stqh_first'
142 | STAILQ_REMOVE(header, item, http_header_item, next);
| ^~~~~~~~~~~~~
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c:142:9: error: 'struct http_header' has no member named 'stqh_last'
142 | STAILQ_REMOVE(header, item, http_header_item, next);
| ^~~~~~~~~~~~~
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c: In function 'http_header_generate_string':
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c:179:5: error: 'struct http_header' has no member named 'stqh_first'
179 | STAILQ_FOREACH(item, header, next) {
| ^~~~~~~~~~~~~~
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c:207:5: error: 'struct http_header' has no member named 'stqh_first'
207 | STAILQ_FOREACH(item, header, next) {
| ^~~~~~~~~~~~~~
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c: In function 'http_header_clean':
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c:223:38: error: 'struct http_header' has no member named 'stqh_first'
223 | http_header_item_handle_t item = STAILQ_FIRST(header), tmp;
| ^~~~~~~~~~~~
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c:231:5: error: 'struct http_header' has no member named 'stqh_first'
231 | STAILQ_INIT(header);
| ^~~~~~~~~~~
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c:231:5: error: 'struct http_header' has no member named 'stqh_last'
231 | STAILQ_INIT(header);
| ^~~~~~~~~~~
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c:231:5: error: 'struct http_header' has no member named 'stqh_first'
231 | STAILQ_INIT(header);
| ^~~~~~~~~~~
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c: In function 'http_header_count':
C:/Users/User1/ESP/frameworks/esp-idf-v5.0/components/esp_http_client/lib/http_header.c:239:5: error: 'struct http_header' has no member named 'stqh_first'
239 | STAILQ_FOREACH(item, header, next) {
| ^~~~~~~~~~~~~~
[3/364] Building C object esp-idf/esp_http_client/CMakeFiles/__idf_esp_http_client.dir/lib/http_auth.c.obj
[4/364] Building C object esp-idf/esp_http_server/CMakeFiles/__idf_esp_http_server.dir/src/httpd_txrx.c.obj
[5/364] Building C object esp-idf/esp_http_server/CMakeFiles/__idf_esp_http_server.dir/src/httpd_sess.c.obj
[6/364] Building C object esp-idf/esp_http_server/CMakeFiles/__idf_esp_http_server.dir/src/httpd_main.c.obj
[7/364] Building C object esp-idf/esp_http_server/CMakeFiles/__idf_esp_http_server.dir/src/httpd_parse.c.obj
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the c:\users\User1\esp\frameworks\esp-idf-v5.0\examples\provisioning\wifi_prov_mgr\build\log\idf_py_stderr_output_38696 and c:\users\User1\esp\frameworks\esp-idf-v5.0\examples\provisioning\wifi_prov_mgr\build\log\idf_py_stdout_output_38696
I never had this issue when I was using ESP-IDF versions 3 or 4. Wondering if this has got anything to do with how my ESP-IDF is set up. I've installed ESP-IDF in
C:/Users/User1/ESP
, which then includes folders
tools
and
frameworks
, among others. For user environment variables, I've defined IDF_TOOLS_PATH to be
C:/Users/User1/ESP
. I've also added
C:/Users/User1/ESP/tools
to the system environment variable "Path". When I start a new ESP-IDF powershell, it sets IDF-PATH to
C:/Users/User1/ESP/frameworks/esp-idf-v5.0
. Anything that's incorrect about this set up that might be causing the errors shown above?

I also get the following message (not an error though) when the code performs build step for bootloader:
Bootloader binary size 0x6710 bytes. 0x8f0 bytes (8%) free.
Does this indicate some sort of memory shortage which might be causing the error above and preventing the program from successfully flashing onto the chip? I would think not, but I'm no expert in this arena.

Any idea what the issue might be or how to resolve it? I'm at a loss. Thank you.

User avatar
mbratch
Posts: 303
Joined: Fri Jun 11, 2021 1:51 pm

Re: Wifi Provisioning example in ESP-IDF-V5.0 not flashing onto chip

Postby mbratch » Fri Jan 06, 2023 10:46 pm

It's a compiling problem, not a flashing problem.

It looks like when you moved to ESP-IDF v5 you didn't install your environment correctly. It's difficult to tell what's wrong without knowing your environment in detail, and knowing how you installed it and configured it.

karunt
Posts: 93
Joined: Sat Apr 03, 2021 7:58 am

Re: Wifi Provisioning example in ESP-IDF-V5.0 not flashing onto chip

Postby karunt » Mon Jan 23, 2023 4:41 pm

Issue resolved. Re-installed ESP-IDF with VSCode and it works as expected now.

Who is online

Users browsing this forum: No registered users and 103 guests