2025-08-18 7:38 AM - edited 2025-08-18 7:56 AM
I have a FreeRTOS project but I cant use xTaskCreate even though its in the paths list (see image below)
Frustratingly this is the exact same set up I was using last week in a similar project that worked but today.... no dice.
Why isn't the compiler finding the references? They all exist in the directories in the paths & includes list. In fact if I right click & ask to find the definition Cube quite happily opens the correct file, so why cant the compiler find them?
I check that the flag for the xTaskCreate define was set correctly (it is).
EDIT :: User error, I forgot to delete the GCC folders for all the other ARM_CMxx processors that I'm not using. Hence I was getting what were in fact multiple define errors.
Solved! Go to Solution.
2025-08-20 7:14 AM
A number of issues,
1. Needed to add the path to the necessary FreeRTOS source folders under "source location" (used the project root directory). Which then led to multiple define errors.
2. I forgot to delete the GCC folders for all the other ARM_CMxx processors that I'm not using which got rid of the multiple definition errors.
2025-08-18 7:45 AM
Did you #include task.h?
2025-08-18 7:59 AM
Yes, I found the issue, multiple defines. I've edited the OP accordingly.
2025-08-18 8:03 AM
"undefined reference" sounds like an error message from the linker.
Did you add the necessary FreeRTOS source folders under "source location"?
hth
KnarfB
2025-08-20 2:24 AM
Yes that helped (I set a path to the project root) that's when I found the multiple defines.
2025-08-20 6:08 AM
So this this solved? If so, please mark a solution. If not, please show the full Console log after trying a clean build.
2025-08-20 7:14 AM
A number of issues,
1. Needed to add the path to the necessary FreeRTOS source folders under "source location" (used the project root directory). Which then led to multiple define errors.
2. I forgot to delete the GCC folders for all the other ARM_CMxx processors that I'm not using which got rid of the multiple definition errors.