Page 1 of 1

Unable to find include files in freertos folder

Posted: Wed Dec 18, 2019 5:40 pm
by ashigupta9
Hi,

In my application i am including freertos files like this #include"freertos/FreeRTOSConfig.h" and this works however if i add only FreeRTOSConfig.h i get a fatal error " FreeRTOS.h: No such file or directory".

Is there any solution of how i can do this.

Regards,
AG

Re: Unable to find include files in freertos folder

Posted: Wed Dec 18, 2019 5:48 pm
by drmacro
Ah, I might be wrong...but, that may be a feature added with FreeRTOS 9.x and above.

ESP-IDF is based on FreeRTOS 8.x

Re: Unable to find include files in freertos folder

Posted: Wed Dec 18, 2019 6:16 pm
by PeterR
I am not sure why having to add the "freertos" in "freertos/FreeRTOSConfig.h" is a problem.
Anyway if it does offend then use "COMPONENT_ADD_INCLUDEDIRS" and point directly at the "freertos" directory.
The problem now is that your project build file will probably now be locked to a specific ESP-IDF (guessing), so I would "suck it in".

There may be a project setting as well.

Re: Unable to find include files in freertos folder

Posted: Wed Dec 18, 2019 6:35 pm
by drmacro
Adding "freertos/" in front does work and is apparent in many examples.

But, my confusion stems from yesterday. I swear I looked for that file because I wanted to use to set
configUSE_DAEMON_USE_TASK_STARTUP_HOOK

And I couldn't find the file FreeRTOSConfig.h. But, today it's there. :oops:

Clarifying my previous comment: :roll:
But, it doesn't have configUSE_DAEMON_USE_TASK_STARTUP_HOOK because the daemon hook was added in FreeRTOS 9.x and above.

Re: Unable to find include files in freertos folder

Posted: Wed Dec 18, 2019 7:00 pm
by PeterR
#confussed
Adding "freertos/" in front does work and is apparent in many examples.
So what's up?
But, my confusion stems from yesterday. I swear I looked for that file because I wanted to use to set
configUSE_DAEMON_USE_TASK_STARTUP_HOOK

And I couldn't find the file FreeRTOSConfig.h. But, today it's there. :oops:
Sorry, no idea what you mean. I had thought that you had an include path issue but ATM I do not understand your problem report.

PS May I suggest that you use nouns rather than pronouns? It does seem odd when you type but it is the best approach and makes it so much easier to help!

Re: Unable to find include files in freertos folder

Posted: Wed Dec 18, 2019 7:40 pm
by drmacro
PeterR wrote:
Wed Dec 18, 2019 7:00 pm
#confussed
Adding "freertos/" in front does work and is apparent in many examples.
So what's up?
But, my confusion stems from yesterday. I swear I looked for that file because I wanted to use to set
configUSE_DAEMON_USE_TASK_STARTUP_HOOK

And I couldn't find the file FreeRTOSConfig.h. But, today it's there. :oops:
Sorry, no idea what you mean. I had thought that you had an include path issue but ATM I do not understand your problem report.

PS May I suggest that you use nouns rather than pronouns? It does seem odd when you type but it is the best approach and makes it so much easier to help!
AG has an issue with finding the .h file. I had an issue, yesterday, finding the .h file when I wanted to change:

Code: Select all

#define configUSE_DAEMON_USE_TASK_STARTUP_HOOK
But, the #define is not in the file because the hook is not in the revision of FreeRTOS that ESP-IDF uses. (At least that is my understanding.)

As for nouns versus pronouns...I have no idea what you mean. :?:

Re: Unable to find include files in freertos folder

Posted: Wed Dec 18, 2019 8:21 pm
by PeterR
"in the file" : pronoun - I ask which file?
"in the specific file that I want - freertos.h" : noun (freertos.h) - you see how that helps?

Sorry, I just don't understand how you get from
include "freertos/FreeRTOSConfig.h" and this works however if i add only FreeRTOSConfig.h i get a fatal error " FreeRTOS.h: No such file or directory.
to
configUSE_DAEMON_USE_TASK_STARTUP_HOOK
Or even why when
and this works
you just dont' use the
and this works
solution?
Maybe restate the problem?
Probably just me as drmacro seems to understand.

Re: Unable to find include files in freertos folder

Posted: Wed Dec 18, 2019 8:55 pm
by drmacro
The confusion is all my fault. :oops:

I stumbled on the relative directory "fix" (i.e. "freertos/FreeRTOSConfig.h") when looking for the file for an issue totally unrelated to the original post of this thread.

The unrelated issue (the use of the startup hook) was mixed into this thread, by me, attempting to explain why I had made the post about having the problem yesterday. (That is I tried on my system to search for the file, in the file browser and with 'find' on the command line and could not find the file. Yet today I did find it.)

So, I mixed things up.

The original post IS about a file not found issue that is corrected by using the relative directory.

I'm sorry I muddied the water. :(

Re: Unable to find include files in freertos folder

Posted: Wed Dec 18, 2019 9:00 pm
by PeterR
Np, you are in good company! I have muddied many a post ;)

For my own benefit I would ask the OP to restate the problem in categorical terms.