This repository is a template for creating a new project on ESP-IDF using VSCode. After downloading it, follow these steps
- Unzip into C:\esp
- Rename the unzipped folder
- In Makefile, replace "esp-idf-vscode-procedure" with the new project name
- In the main folder, rename "main_program" (.c file)
- In CMakeLists.txt, replace "main_program" with the new program name
- Start editing!
Sample: https://github.com/espressif/esp-idf/tree/master/examples/get-started/sample_project
C:\esp>cd C:\esp\hello_world
C:\esp\hello_world>idf.py set-target esp32
C:\esp\hello_world>idf.py menuconfig
C:\esp\hello_world>idf.py build
C:\esp\hello_world>idf.py -p COM3 flash
C:\esp\hello_world>idf.py monitor
https://www.youtube.com/watch?v=K58Y2dFsQ2A -> Follow the same procedure
https://www.youtube.com/watch?v=aQi8qiW9fmg&list=PLfcVdODhZSagC8s_13x22eAf0X9TP4zqy&index=9 -> 00:00 to 01:52
- Set Environment Variables
- Enable C/C++ Extension on VSCode
- Enable Native Debug exension on VSCode
https://www.youtube.com/watch?v=KRyvly_SYS8 -> 05:33 to 06:12 PS: I did not do all the extra stuff he was doing for python packages. Also, I had the latest version of python installed and not 2 versions like he had later in the video.
https://www.youtube.com/watch?v=KRyvly_SYS8 -> 10:18 to 14:34
Errors are:
- Include Errors
- portTICK_PERIOD_MS underline
How to resolve them?
Press F1, then select C/C++ Edit configurations (UI).
Include Path :
${workspaceFolder}/**
${env:IDF_PATH}/components/**
build/config
[espressif/vscode-esp-idf-extension#26]
Compiler path
C:\esp\.espressif\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe
[espressif/vscode-esp-idf-extension#27]
IntelliSense mode : Choose gcc-x64(legacy)