4

I'm using visual studio code version(1.59.1) for ESP-IDF version (4.3).I have added in c_cpp_properties.json file all paths in includepath but I still have the same all error gone except this one:

(can't open source file "sys/reent.h" (dependency of freertos/FreeRTOS.h)).

In visual studio terminal it gives me error when I try to use (idf.py command)

'idf.py' is not recognized as an internal or external command, and sometimes it give me python can't open the file where the script exist.

2 Answers 2

1

First open esp-idf terminal then execute "idf.py build" or other idf commands. Once build success "sys/reent.h" error will gone

Sign up to request clarification or add additional context in comments.

1 Comment

thanks I will try it.
0

I follow this solution by modifying c_cpp_properties.json.
My version:

{
"configurations": [
    {
        "name": "Win32",

        "includePath": [
            "${workspaceFolder}/**",
            "${config:idf.espIdfPath}/components/**",
            "${config:idf.espIdfPathWin}/components/**"
        ],
        "browse": {
            "path": [
                "${config:idf.espIdfPath}/components",
                "${config:idf.espIdfPathWin}/components",
                "${workspaceFolder}"
            ],
            "limitSymbolsToIncludedHeaders": false
        },
        "defines": [
            "_DEBUG",
            "UNICODE",
            "_UNICODE"
        ],
        "windowsSdkVersion": "10.0.20348.0",
        "cStandard": "c17",
        "cppStandard": "c++17",
        "compilerPath": "${config:idf.toolsPath}/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc",
        "compileCommands": "${workspaceFolder}/build/compile_commands.json",
    }
],
"version": 4

}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.