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

username
Posts: 539
Joined: Thu May 03, 2018 1:18 pm

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

Postby username » Tue Jul 04, 2023 6:36 am

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 10760 times

LochWatenan
Posts: 1
Joined: Tue Jul 04, 2023 11:06 am

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

Postby LochWatenan » Tue Jul 04, 2023 11:14 am

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.

camztouch
Posts: 5
Joined: Sat May 09, 2020 8:13 pm

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

Postby camztouch » Tue Aug 01, 2023 8:20 am

I have the same issue on idf 5.1 on Apple Silicon.
It still compiles, but feels wrong

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

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

Postby ESP_igrr » Tue Aug 01, 2023 9:44 am

Could you please check if you have compile_commands.json location correctly configured? See https://github.com/espressif/vscode-esp ... mmandsjson.

jhlee1
Posts: 10
Joined: Mon Sep 11, 2023 7:03 am

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

Postby jhlee1 » Mon Sep 11, 2023 7:16 am

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.

kmmaran
Posts: 24
Joined: Tue Oct 23, 2018 6:20 am

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

Postby kmmaran » Mon Sep 18, 2023 4:02 pm

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 9408 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 9391 times

Édipo Duanny
Posts: 1
Joined: Mon Oct 09, 2023 9:43 pm

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

Postby Édipo Duanny » Mon Oct 09, 2023 9:51 pm

@kmmaran,
In my case, the problem was solved. Thank you.

Westfaliah
Posts: 1
Joined: Thu Oct 26, 2023 2:46 pm

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

Postby Westfaliah » Thu Oct 26, 2023 2:49 pm

@kmmaran, Thank you!

MelbourneMick
Posts: 1
Joined: Sun Apr 21, 2024 2:40 pm

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

Postby MelbourneMick » Sun Apr 21, 2024 2:50 pm

Thank you - it was driving me crazy!

TUHHSTUDENT
Posts: 1
Joined: Tue May 28, 2024 6:18 pm

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

Postby TUHHSTUDENT » Tue May 28, 2024 6:27 pm

Thank you!

Who is online

Users browsing this forum: No registered users and 66 guests