I am new to the ESP32. I just did a clean install of the latest Ubuntu, VS Code, and the ESP-IDF extension. I used the installation instructions here: https://github.com/espressif/vscode-esp ... install.md. I useed the "Express" option.
Everything seemed to go well.
I then started in on the "basic use" part of the tutorial. The only problem I had with the directions was that the "ESP-IDF: Set Espressif device target " command also asked me for my board. Since I cannot identify my board (i got some ESP-32-WROOM board off of amazon) so I just chose the "custom board" option. in the "ESP-IDF: SDK Configuration editor command" I just accepted the defaults.
The project seemed to build fine, although viewing the main file shows two constants undefined:
CONFIG_BLINK_PERIOD and portTICK_PERIOD_MS. I can see that CONFIG_BLINK_PERIOD is defined in sdkconfig.h in my project but pointing at the #include "sdkconfig.h" line and choosing "Go to definition" shows me the sdkconfig.h at /home/bigbill/esp/esp-idf/components/wear_levelling/test_wl_host/sdkconfig/sdkconfig.h.
I can see a whole bunch of header files that contain a definition of portTICK_PERIOD_MS but I dont know which one is supposed to be included.
I look in my c_cpp_properties.json and I am unsure where the include paths are pointing because I cant figure out how to check the values of ${config:idf.espIdfPath} and ${workspaceFolder}.
My questions are:
1] Where are ${config:idf.espIdfPath} and ${workspaceFolder} defined.
2] How can I check their values?
3] Which header file is supposed to be included to define portTICK_PERIOD_MS?
4] What did I do wrong?
Here is the output of the Doctor command:
---------------------------------------------- ESP-IDF Extension for Visual Studio Code report ---------------------------------------------
OS linux x64 6.2.0-36-generic
System environment variable IDF_PYTHON_ENV_PATH
undefined
System environment variable PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
System environment variable PYTHON
undefined
Visual Studio Code version 1.84.2
Visual Studio Code language en
Visual Studio Code shell /usr/bin/bash
ESP-IDF Extension version 1.6.5
Workspace folder <HOMEPATH>/esp/Projects/blink
---------------------------------------------------- Extension configuration settings ------------------------------------------------------
ESP-ADF Path (idf.espAdfPath) ${env:ADF_PATH}
ESP-IDF Path (idf.espIdfPath) <HOMEPATH>/esp/esp-idf
ESP-MDF Path (idf.espMdfPath) ${env:MDF_PATH}
ESP-Matter Path (idf.espMatterPath) ${env:ESP_MATTER_PATH}
Custom extra paths (idf.customExtraPaths) <HOMEPATH>/.espressif/tools/xtensa-esp-elf-gdb/12.1_20221002/xtensa-esp-elf-gdb/bin:<HOMEPATH>/.espressif/tools/riscv32-esp-elf-gdb/12.1_20221002/riscv32-esp-elf-gdb/bin:<HOMEPATH>/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin:<HOMEPATH>/.espressif/tools/xtensa-esp32s2-elf/esp-12.2.0_20230208/xtensa-esp32s2-elf/bin:<HOMEPATH>/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin:<HOMEPATH>/.espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin:<HOMEPATH>/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin:<HOMEPATH>/.espressif/tools/openocd-esp32/v0.12.0-esp32-20230419/openocd-esp32/bin:<HOMEPATH>/.espressif/tools/esp-rom-elfs/20230320
Custom extra vars (idf.customExtraVars)
OPENOCD_SCRIPTS: <HOMEPATH>/.espressif/tools/openocd-esp32/v0.12.0-esp32-20230419/openocd-esp32/share/openocd/scripts
ESP_ROM_ELF_DIR: <HOMEPATH>/.espressif/tools/esp-rom-elfs/20230320/
Virtual env Python Path (idf.pythonBinPath) <HOMEPATH>/.espressif/python_env/idf5.1_py3.10_env/bin/python
Serial port (idf.port) /dev/ttyUSB0
OpenOCD Configs (idf.openOcdConfigs) interface/ftdi/esp32_devkitj_v1.cfg,target/esp32.cfg
ESP-IDF Tools Path (idf.toolsPath) <HOMEPATH>/.espressif
Git Path (idf.gitPath) git
-------------------------------------------------------- Configurations access -------------------------------------------------------------
Access to ESP-ADF Path (idf.espAdfPath) false
Access to ESP-IDF Path (idf.espIdfPath) true
Access to ESP-MDF Path (idf.espMdfPath) false
Access to ESP-Matter Path (idf.espMatterPath) false
Access to ESP-IDF Custom extra paths
Access to <HOMEPATH>/.espressif/tools/xtensa-esp-elf-gdb/12.1_20221002/xtensa-esp-elf-gdb/bin: true
Access to <HOMEPATH>/.espressif/tools/riscv32-esp-elf-gdb/12.1_20221002/riscv32-esp-elf-gdb/bin: true
Access to <HOMEPATH>/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin: true
Access to <HOMEPATH>/.espressif/tools/xtensa-esp32s2-elf/esp-12.2.0_20230208/xtensa-esp32s2-elf/bin: true
Access to <HOMEPATH>/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin: true
Access to <HOMEPATH>/.espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin: true
Access to <HOMEPATH>/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin: true
Access to <HOMEPATH>/.espressif/tools/openocd-esp32/v0.12.0-esp32-20230419/openocd-esp32/bin: true
Access to <HOMEPATH>/.espressif/tools/esp-rom-elfs/20230320: true
Access to Virtual env Python Path (idf.pythonBinPath) true
Access to CMake in environment PATH true
Access to Ninja in environment PATH true
Access to ESP-IDF Tools Path (idf.toolsPath) true
-------------------------------------------------------- Configurations has spaces -------------------------------------------------------------
Spaces in system environment Path false
Spaces in ESP-ADF Path (idf.espAdfPath) false
Spaces in ESP-IDF Path (idf.espIdfPath) false
Spaces in ESP-MDF Path (idf.espMdfPath) false
Spaces in ESP-Matter Path (idf.espMatterPath) false
Spaces in ESP-IDF Custom extra paths
Spaces in <HOMEPATH>/.espressif/tools/xtensa-esp-elf-gdb/12.1_20221002/xtensa-esp-elf-gdb/bin: false
Spaces in <HOMEPATH>/.espressif/tools/riscv32-esp-elf-gdb/12.1_20221002/riscv32-esp-elf-gdb/bin: false
Spaces in <HOMEPATH>/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin: false
Spaces in <HOMEPATH>/.espressif/tools/xtensa-esp32s2-elf/esp-12.2.0_20230208/xtensa-esp32s2-elf/bin: false
Spaces in <HOMEPATH>/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin: false
Spaces in <HOMEPATH>/.espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin: false
Spaces in <HOMEPATH>/.espressif/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin: false
Spaces in <HOMEPATH>/.espressif/tools/openocd-esp32/v0.12.0-esp32-20230419/openocd-esp32/bin: false
Spaces in <HOMEPATH>/.espressif/tools/esp-rom-elfs/20230320: false
Spaces in Virtual env Python Path (idf.pythonBinPath) false
Spaces in ESP-IDF Tools Path (idf.toolsPath) false
----------------------------------------------------------- Executables Versions -----------------------------------------------------------
Git version 2.34.1
ESP-IDF version 5.1.1
Python version 3.10.12
Python's pip version 23.3.1
-------------------------------------------------- Project configuration settings ----------------------------------------------------------
-------------------------------------------------- Python packages in idf.pythonBinPath ----------------------------------------------------
bitarray version: 2.8.2
bitstring version: 4.1.2
CacheControl version: 0.13.1
certifi version: 2023.7.22
cffi version: 1.16.0
charset-normalizer version: 3.3.2
click version: 8.0.4
colorama version: 0.4.6
construct version: 2.10.69
contextlib2 version: 21.6.0
cryptography version: 39.0.2
ecdsa version: 0.18.0
esp-coredump version: 1.7.0
esp-debug-backend version: 1.0.3
esp-idf-kconfig version: 1.4.0
esp-idf-monitor version: 1.3.3
esp-idf-panic-decoder version: 0.2.0
esp-idf-size version: 0.4.3
esptool version: 4.7.dev3
filelock version: 3.13.1
freertos-gdb version: 1.0.2
gcovr version: 6.0
idf-component-manager version: 1.4.1
idna version: 3.4
intelhex version: 2.3.0
Jinja2 version: 3.0.3
kconfiglib version: 14.1.0
lxml version: 4.9.3
MarkupSafe version: 2.1.3
msgpack version: 1.0.7
packaging version: 23.2
pip version: 23.3.1
pycparser version: 2.21
pyelftools version: 0.29
pygdbmi version: 0.9.0.2
Pygments version: 2.16.1
pyparsing version: 3.0.9
pyserial version: 3.5
PyYAML version: 6.0.1
reedsolo version: 1.7.0
requests version: 2.31.0
requests-file version: 1.5.1
requests-toolbelt version: 1.0.0
schema version: 0.7.5
setuptools version: 68.2.2
six version: 1.16.0
tqdm version: 4.66.1
urllib3 version: 1.26.18
websocket-client version: 1.6.4
---------------------------------------------------- Check ESP-IDF python requirements.txt -------------------------------------------------
Check ESP-IDF Python packages Python requirements are satisfied.
---------------------------------------------------- Check extension requirements.txt ------------------------------------------------------
Check Extension Python packages Python requirements are satisfied.
---------------------------------------------------- Check ESP-IDF debug adapter requirements.txt ------------------------------------------
Check Debug AdapterPython packages Python requirements are satisfied.
---------------------------------------------------- Visual Studio Code launch.json --------------------------------------------------------
{
"version": "0.2.0",
"configurations": [
{
"type": "espidf",
"name": "Launch",
"request": "launch"
}
]
}
---------------------------------------------------- Visual Studio Code c_cpp_properties.json ----------------------------------------------
{
"configurations": [
{
"name": "ESP-IDF",
"compilerPath": "${config:idf.toolsPath}/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc",
"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
}
}
],
"version": 4
}
--------------------------------------------------------------------------------------------------------------------------------------------
Problems with Blink Example
-
- Posts: 229
- Joined: Wed May 02, 2018 12:12 pm
Re: Problems with Blink Example
For ESP-IDF: Set Espressif device target " command use esp32.
For Language configuration modify your project's .vscode/c_cpp_properties.json with compile_commands.json like explained here:
https://github.com/espressif/vscode-esp ... mmandsjson
For Language configuration modify your project's .vscode/c_cpp_properties.json with compile_commands.json like explained here:
https://github.com/espressif/vscode-esp ... mmandsjson
Who is online
Users browsing this forum: NoTan2 and 12 guests