Page 1 of 1

ESP-IDF v5.1 - identifier "CONFIG_FREERTOS_HZ" is undefined

Posted: Tue Jul 04, 2023 6:36 am
by username
Just installed ESP-IDF v5.1.
Created a new project using the blink example, it compiles but shows red squiggles.
Screenshot 2023-07-04 013430.png
Screenshot 2023-07-04 013430.png (125.33 KiB) Viewed 10491 times

Re: ESP-IDF v5.1 - identifier "CONFIG_FREERTOS_HZ" is undefined

Posted: Tue Jul 04, 2023 11:14 am
by LochWatenan
Same for me here with the HelloWorld example; missing are here:
* CONFIG_IDF_TARGET
* CONFIG_FREERTOS_HZ

The issue seems to exist for quite some time, see here: https://www.reddit.com/r/esp32/comments ... _examples/ (4yr ago)

When trying to #define the missing identifiers (before #include) I get a warning of a redefinition (inside some sdk header files).

I am totally new to the ESP32 (IDF) world, so currently do not really understand what is going on. But it seems the missing values are defined in the sdkconfig(.h) or config.env files.

So, I do not have a solution, but can confirm the behaviour.

I am using the Espressif IDF release v5.1 on VS Code v1.79.2 on Windows 11.

Re: ESP-IDF v5.1 - identifier "CONFIG_FREERTOS_HZ" is undefined

Posted: Tue Aug 01, 2023 8:20 am
by camztouch
I have the same issue on idf 5.1 on Apple Silicon.
It still compiles, but feels wrong

Re: ESP-IDF v5.1 - identifier "CONFIG_FREERTOS_HZ" is undefined

Posted: Tue Aug 01, 2023 9:44 am
by ESP_igrr
Could you please check if you have compile_commands.json location correctly configured? See https://github.com/espressif/vscode-esp ... mmandsjson.

Re: ESP-IDF v5.1 - identifier "CONFIG_FREERTOS_HZ" is undefined

Posted: Mon Sep 11, 2023 7:16 am
by jhlee1
I'm using VSCode v1.82 and extension Espressif IDF v1.6.4 on Windows 10.

I have the same problem after installing idf v5.1. Even existing projects using idf v5.0 occur the same problem.

I tried adding "compileCommands": "${workspaceFolder}\\build\\compile_commands.json" to the configurations in the c_cpp_properties.json file, but it doesn't work for me.

Re: ESP-IDF v5.1 - identifier "CONFIG_FREERTOS_HZ" is undefined

Posted: Mon Sep 18, 2023 4:02 pm
by kmmaran
I face the same issue and used the solution below and works for me. Please add

"${workspaceFolder}/build/config",

in the c_cpp_properties.json , see below
soultion.png
soultion.png (453.22 KiB) Viewed 9139 times
OR

from https://github.com/espressif/vscode-esp ... URATION.md
last section, please add
"compileCommands": "${workspaceFolder}/build/compile_commands.json"

solution.png
solution.png (382.51 KiB) Viewed 9122 times

Re: ESP-IDF v5.1 - identifier "CONFIG_FREERTOS_HZ" is undefined

Posted: Mon Oct 09, 2023 9:51 pm
by Édipo Duanny
@kmmaran,
In my case, the problem was solved. Thank you.

Re: ESP-IDF v5.1 - identifier "CONFIG_FREERTOS_HZ" is undefined

Posted: Thu Oct 26, 2023 2:49 pm
by Westfaliah
@kmmaran, Thank you!

Re: ESP-IDF v5.1 - identifier "CONFIG_FREERTOS_HZ" is undefined

Posted: Sun Apr 21, 2024 2:50 pm
by MelbourneMick
Thank you - it was driving me crazy!

Re: ESP-IDF v5.1 - identifier "CONFIG_FREERTOS_HZ" is undefined

Posted: Tue May 28, 2024 6:27 pm
by TUHHSTUDENT
Thank you!