Page 1 of 1

IDF在vscode中编译,使用sdkconfig.h问题

Posted: Thu Sep 30, 2021 12:46 am
by lihyxx
ESP32S2使用VSCODE编译,在调用sdkconfig.h头文件时,总是会调用 build->bootLoader->config->sdkconfig.h文件,但是正确的文件在build->config->sdkconfig.h

Re: IDF在vscode中编译,使用sdkconfig.h问题

Posted: Mon Oct 09, 2023 2:34 pm
by lingcoln
在c_cpp_properties.json文件里添加 "${workspaceFolder}/build/config"

Code: Select all

{
    "configurations": [
        {
            "name": "MACOS",
            "includePath": [
                "${workspaceFolder}/**",
                "${workspaceFolder}/include/**",
                "${workspaceFolder}/components/**",
                "/Users/esp32/.espressif/esp-mdf/components/**",
                "/Users/esp32/.espressif/esp-mdf/esp-idf/components/**",
                "${workspaceFolder}/build/config"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "cStandard": "c17",
            "cppStandard": "c++17",
            "compilerPath": "/Users/esp32/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc",
            "intelliSenseMode": "macos-gcc-x64",
            "browse": {
                "path": [
                    "${workspaceFolder}/",
                    "${workspaceFolder}/include/",
                    "${workspaceFolder}/components/",
                    "/Users/esp32/.espressif/esp-mdf/components/",
                    "/Users/esp32/.espressif/esp-mdf/esp-idf/components/",
                    "${workspaceFolder}/build/config"
                ]
            }
        }
    ],
    "version": 4
}