MCU
ESP32 DevKit V1(ESP-WROOM-32)
IDE
VSC + ESP-IDF
목표
ESP32 DevKit V1의 LED를 ON-OFF

 

1. ESP-IDF

View - Command Palette

 

blink - Create project using example blink

 

LED GPIO 설정

#define BLINK_GPIO 2
 

 

flash method - UART

 

serial port - COM3

 

Build - 에러남

 

다음과 같이 c_cpp_properties.json를 수정

{
    "configurations": [
        {
            "name": "ESP-IDF",
            "compilerPath": "E:\\WORK\\P_ESP32\\.espressif\\tools\\xtensa-esp32-elf\\esp-12.2.0_20230208\\xtensa-esp32-elf\\bin\\xtensa-esp32-elf-gcc.exe",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "includePath": [
                "${config:idf.espIdfPath}/components/**",
                "${config:idf.espIdfPathWin}/components/**",
                "${config:idf.espAdfPath}/components/**",
                "${config:idf.espAdfPathWin}/components/**",
                "${workspaceFolder}/**"
            ],
            "browse": {
                "path": [
                    "${config:idf.espIdfPath}/components",
                    "${config:idf.espIdfPathWin}/components",
                    "${config:idf.espAdfPath}/components/**",
                    "${config:idf.espAdfPathWin}/components/**",
                    "${workspaceFolder}"
                ],
                "limitSymbolsToIncludedHeaders": false
            },
            "configurationProvider": "ms-vscode.cmake-tools",
            "compileCommands": "${workspaceFolder}/build/compile_commands.json"
        }
    ],
    "version": 4
}
 

 

Build - 에러 없어짐

 

Flash

 

 

 

1. ESP-IDF 설치

: Visual Studio Code가 설치 되어 있어야 한다.(이하 VSC)

: VSC에서 esp-idf를 검색하여 install

 

esp-idf install 후에 실제 IDE를 다운로드 하여 설치한다.

 

ESP-IDF version과 경로를 제대로 적지 않으면 설치가 안됨

 

+ Recent posts