Am I not mistaken that the xTaskCreatePinnedToCore functionalities were removed in the newest release? The functions are still provided to me via my MPU vendor but in an additional header file. What was the issue?
xTaskCreatePinnedToCore was and is a vendor extension and was never part of official FreeRTOS
Strange. I could swear that I saw it in source code some months ago. Anyway, thanks for the answer!
Could the old source code you saw have been a vendor modified version with the extension built in?
The functionality of xTaskCreatePinnedToCore is was added by Espressif to support the ESP32 dual core device. We considered keeping this API but decided in favor of xTaskCreateAffinitySet.
The reasoning for the affinity set method is:
- Core Affinity is the more wide spread vocabulary when referring to tasks that run on a subset of cores.
- When you go beyond dual core devices, it may be reasonable to assign a task to more than one core but not all the cores. The affinity set idea scales to N cores with tasks running on any collection of those cores.
The SMP branch has a design document that explains all the new behaviors. FreeRTOS-Kernel/FreeRTOS SMP change description.pdf at smp · FreeRTOS/FreeRTOS-Kernel · GitHub
It is a good idea to read this document to get an idea of how the FreeRTOS SMP technology will progress.
The ESP-IDF v5 preview is now using the officially supported SMP branch. They have provided the pinnedToCore legacy API by calling the appropriate affinity functions. The documentation also uses the affinity vocabulary words now.