Skip to main content
Senior III
August 18, 2025
Solved

Cube not finding references even though path included

  • August 18, 2025
  • 4 replies
  • 528 views

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.

NicRoberts_0-1755527592294.png

 

 

Best answer by NicRoberts

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.

4 replies

TDK
Super User
August 18, 2025

Did you #include task.h?

"If you feel a post has answered your question, please click ""Accept as Solution""."
Senior III
August 18, 2025

Yes, I found the issue, multiple defines. I've edited the OP accordingly.

KnarfB
Super User
August 18, 2025

"undefined reference" sounds like an error message from the linker.

Did you add the necessary FreeRTOS source folders under "source location"?

hth

KnarfB

Senior III
August 20, 2025

Yes that helped (I set a path to the project root) that's when I found the multiple defines.

TDK
Super User
August 20, 2025

So this this solved? If so, please mark a solution. If not, please show the full Console log after trying a clean build.

"If you feel a post has answered your question, please click ""Accept as Solution""."
NicRobertsAuthorBest answer
Senior III
August 20, 2025

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.