Is optimized task selection not available for Cortex-m0+?

Hi

I was trying to enable configUSE_PORT_OPTIMISED_TASK_SELECTION on a CM0+ and the compiler threw a large bunch of “undefined reference to `portGET_HIGHEST_PRIORITY’ tasks.c” and several similar errors at me.

I assume that it means that this is not supported with the CM0 port and if i open port.c I see no mention of configUSE_PORT_OPTIMISED_TASK_SELECTION which support that assumption, but I fail to see it specfied. It would have been nice to get a more informative error/warning if it is indeed not supported. Am I correct in that it is not supported or not?

Running v10.3.1

Best regards
Martin

Yes, you are right that configUSE_PORT_OPTIMISED_TASK_SELECTION is not supported for CM0 port.

You can see that it is implemented using clz instruction (for Cortex-M4): https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/master/portable/GCC/ARM_CM4F/portmacro.h#L135

clz is not availble on M0 and that’s why configUSE_PORT_OPTIMISED_TASK_SELECTION is not available for CM0 port.

Thanks.