xTaskCreatePinnedToCoreWithCaps not found in v5.4 compile

celerity
Posts: 8
Joined: Sat Jan 20, 2018 5:57 pm

xTaskCreatePinnedToCoreWithCaps not found in v5.4 compile

Postby celerity » Tue Mar 18, 2025 2:40 pm

I'm getting a compile error with v5.4, missing: xTaskCreatePinnedToCoreWithCaps, cannot figure out how to address. this issue. Any help would be appreciated:

The function appears to be defined here:
/esp/esp-idf/components/freertos/esp_additions/include/freertos/idf_additions.h
/esp/esp-idf/components/freertos/esp_additions/idf_additions.c

Where the .h definition is tucked inside a #if,
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
BaseType_t xTaskCreatePinnedToCoreWithCaps( TaskFunction_t pvTaskCode,
const char * const pcName,...


Where my sdkconfig has that compile flag turned on:
% grep "STATIC_ALLOCATION" sdkconfig
CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y


I've tried completely reinstalling v5.4,

I've added a debug message to /Users/myname/esp/esp-idf/CMakeLists.txt where idf_additions.c is added to the build:

# Add ESP-additions source files
list(APPEND srcs
"esp_additions/freertos_compatibility.c"
"esp_additions/idf_additions_event_groups.c"
"esp_additions/idf_additions.c")

message(STATUS, "===zzz== after adding idf_additions.c to srcs ${srcs}")


Where the compile output shows:
STATUS,===zzz== after adding idf_additions.c to srcs heap_idf.c;app_startup.c;port_common.c;port_systick.c;FreeRTOS-Kernel-SMP/list.c;FreeRTOS-Kernel-SMP/queue.c;FreeRTOS-Kernel-SMP/tasks.c;FreeRTOS-Kernel-SMP/timers.c;FreeRTOS-Kernel-SMP/event_groups.c;FreeRTOS-Kernel-SMP/stream_buffer.c;FreeRTOS-Kernel-SMP/portable/xtensa/port.c;FreeRTOS-Kernel-SMP/portable/xtensa/portasm.S;FreeRTOS-Kernel-SMP/portable/xtensa/xtensa_init.c;FreeRTOS-Kernel-SMP/portable/xtensa/xtensa_overlay_os_hook.c;esp_additions/freertos_compatibility.c;esp_additions/idf_additions_event_groups.c;esp_additions/idf_additions.c


=================== Here is the stack fail during the compile ================

-MF esp-idf/esp_http_server/CMakeFiles/__idf_esp_http_server.dir/src/httpd_main.c.obj.d -o esp-idf/esp_http_server/CMakeFiles/__idf_esp_http_server.dir/src/httpd_main.c.obj -c /Users/myname/esp/esp-idf/components/esp_http_server/src/httpd_main.c
In file included from /Users/myname/esp/esp-idf/components/esp_http_server/src/esp_httpd_priv.h:19,
from /Users/myname/esp/esp-idf/components/esp_http_server/src/httpd_main.c:17:
/Users/myname/esp/esp-idf/components/esp_http_server/src/port/esp32/osal.h: In function 'httpd_os_thread_create':
/Users/myname/esp/esp-idf/components/esp_http_server/src/port/esp32/osal.h:30:15: error: implicit declaration of function 'xTaskCreatePinnedToCoreWithCaps' [-Wimplicit-function-declaration]
30 | int ret = xTaskCreatePinnedToCoreWithCaps(thread_routine, name, stacksize, arg, prio, thread, core_id, caps);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/myname/esp/esp-idf/components/esp_http_server/src/port/esp32/osal.h: In function 'httpd_os_thread_delete':
/Users/myname/esp/esp-idf/components/esp_http_server/src/port/esp32/osal.h:40:5: error: implicit declaration of function 'vTaskDeleteWithCaps' [-Wimplicit-function-declaration]
40 | vTaskDeleteWithCaps(xTaskGetCurrentTaskHandle());
| ^~~~~~~~~~~~~~~~~~~
[16/1715] Building C object esp-idf/esp_http_client/CMakeFiles/__idf_esp_http_client.dir/esp_http_client.c.obj
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the /Users/Shared/Code/MyProject/device/devicewebsocket/build/log/idf_py_stderr_output_98120 and /Users/Shared/Code/MyProject/device/devicewebsocket/build/log/idf_py_stdout_output_98120
myname@My-MacBook-Pro-2 devicewebsocket %

Sprite
Espressif staff
Espressif staff
Posts: 10593
Joined: Thu Nov 26, 2015 4:08 am

Re: xTaskCreatePinnedToCoreWithCaps not found in v5.4 compile

Postby Sprite » Wed Mar 19, 2025 12:46 am

Does it give that error on the latest esp-idf master as well?

celerity
Posts: 8
Joined: Sat Jan 20, 2018 5:57 pm

Re: xTaskCreatePinnedToCoreWithCaps not found in v5.4 compile

Postby celerity » Wed Mar 19, 2025 1:08 pm

Yes, still occurring. I pull the latest changes, ran install.sh, export.sh, fullclean, reconfigure, build, same error.

celerity
Posts: 8
Joined: Sat Jan 20, 2018 5:57 pm

Re: xTaskCreatePinnedToCoreWithCaps not found in v5.4 compile

Postby celerity » Wed Mar 19, 2025 1:29 pm

Sorry, I pulled the latest updates on v5.4, not master (which is now 5.5).

I cannot compile master due to no arduino compatible subcomponent available for v5.5. If one exists, I can test it.

celerity
Posts: 8
Joined: Sat Jan 20, 2018 5:57 pm

Re: xTaskCreatePinnedToCoreWithCaps not found in v5.4 compile

Postby celerity » Wed Mar 19, 2025 2:02 pm

I installed v5.3, same error there. So, the issue isn't specific to v5.4. Ugh.

Who is online

Users browsing this forum: No registered users and 2 guests