In here lies the different Espressef IDF project folders for various different programs along with 2 different templates for syntax-highlighting
Check out the official docs’ get started section:
- https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/index.html
- Use version (stable v5.1.1)
- Under Installation, use VS Code as IDE (and install it in VS code)
- Now close the docs website (you wont need to anymore)
VS Code Espressif IDF installation
- Once the extension is installed, follow the Espressif IDF VS Code extension TUTORIAL
- Follow very precisely, and install v.5.1.1 when able
- (For windows users please install the ESP-IDF Tools installer first and thereafter delete two folders (idf-git and idf-python folder). Then you can follow the VS code extension tutorial.)
- Once Espressif IDF is installed, click on the basic use link
VS Code Espressif IDF Basic use
NOTE: Til windows skal man IKKE hente DockerWSL eller sige ja tak til Linux subsystem
- Follow the basic use tutorial and get an example running
VS Code C++ Configuration
By default, Espressif IDF uses PATH variables to reach different libraries and so on. Therefore, you have to create the IDF_PATH
path variable using this tutorial
NOTE: For Linux, if using
~/.profile
does not work for some reason, put it in~/.bashrc
instead
Make sure to open the folder of the project, rather than the Github folder
So if you want to open project station
, right click on the folder station
and click "Open with Visual Studio Code".
Alternative: In Visual Code -> File -> Open folder, and then click on the project folder
The project folder makes a .vscode/
folder for you, with relevant configuration for IntelliSense autocomplete
/station/.vscode/c_cpp_properties.json
. All good!
Because the .vscode/
is different from computer to computer, it is ignored by in .gitignore
(to not cause problems).
Therefore, you have to add it yourself the first time you open an already existing project.
Do that with the VSCode command: ESP-IDF: Add vscode configuration folder
!
This will create the .vscode/
folder which fits your operating system perfectly!