Task Create Hook?

Hello; Years/Versions ago, I believe FreeRTOS had a OSTaskCreateHook() configuration option (which an old project used). Now however, it appears there is no such feature (using FreeRTOS Kernel V10.0.1). Am I simply incorrect? Or was there indeed such a feature that was removed in a previous release?
Thanks

OSTaskCreateHook() isn’t named according to the FreeRTOS naming convention, so I doubt it was a direct part of FreeRTOS, the name sounds vaguely like a CMSIS function, so maybe that wrapper has/had such a function.

Searching on that name, it is a function in the Micrium operating system, maybe that application wasn’t a FreeRTOS project but a uC project.

Hmm…Ok, thanks…so odd because the project was definitely a FreeRTOS project. I cannot recall, but for all I know, I may have simply inserted my own callback in the task create routine, because I know it was working…I’m getting too old for this ;-D

You can do this using the traceTASK_CREATE() macro. https://www.freertos.org/rtos-trace-macros.html

Thanks!..that’s it…I found my old config file ( I need to
start on Prevegen)

#define traceTASK_CREATE OSTaskCreateHook

In the mean time, I changed to use

static TaskStatus_t *pTasks, tasks[16];

    pTasks = (TaskStatus_t *)&tasks;

uxTaskGetSystemState(pTasks, 16, NULL);

1 Like