Espressif-IDE confusion and installation issues

sstandfast
Posts: 6
Joined: Thu Feb 08, 2024 6:03 am

Espressif-IDE confusion and installation issues

Postby sstandfast » Thu Feb 08, 2024 9:06 am

Hello,

First off, I'd like to say that my background is primarily hardware, although I do have a bit of experience using PICMicros from Microchip. That said, I received an ESP32 board from 'Santa' this past Christmas and I thought I'd finally give it a go and see if I can get it running. I thought I'd come here and provide a few thoughts and feedback on the setup and installation process from the perspective of someone who doesn't eat, sleep, and breath compilers, toolchains, and environment variables. I am also seeking advice on some issues I'm having with using the Espressif-IDE that I will cover as well. I apologize in advance, this will likely be a longer post; thank you to those who put up with my ramblings and stick it out to the end.

Installation Process
The installation process was very straightforward and dare I say painless. I googled ESP32 IDE and one of the first hits was the Get Started page located here https://docs.espressif.com/projects/esp ... t-started/ I followed the link for installing the Eclipse plugin because MPLAB X is based on Eclipse so I'm vaguely familiar with the IDE. That took me to a GitHub page https://github.com/espressif/idf-eclips ... /README.md that immediately recommended to install the "Espressif-IDE instead of the Eclipse CDT + IEP Plugin update approach to avoid the hassles of updating". A link was provided to the download page for the installer as well as this instruction page. https://github.com/espressif/idf-eclips ... staller.md. So far, so good. The installer downloaded and then walked through the installation process without issue. So 5-stars for the simple install process.

Next, according to the installer page, it was time to launch the IDE and verify my build environment. This is where I had my first issue. On my Build Environment page, I only had two variables listed compared to the eight shown in the instructions page. Attempting to create a new Espressif IDF Project resulted in an error window popping up complaining of missing tools. The offline Windows Installer page claims that "Espressif-IDE Installer (All-in-One) is an offline installer and it comes with all the required components to work with the ESP-IDF Application development." I learned that this isn't exactly true; in order to get the program to move forward I first had to install Git and add the path to git-cmd.exe to the "install tools" utility. This utility then ran in the background and installed whatever tools were missing. After that my Build Environment page had ten entries on it so I must be doing better than the tutorial at this point. I was also able to continue with creating a new Espressif IDF Project after that.

I was able to discover the missing Git tool by going back to the Eclipse Plugin install page and continuing to read beyond the link I followed down to the Prerequisites section. I would recommend either updating the All-In-One instructions page to either indicate that Git needs to be installed first or include Git in the All-In-One so others can avoid this issue.

Creating and Building My First Project
Continuing to follow the instructions, I am presented with a link https://github.com/espressif/idf-eclips ... ew-projectto the next section to create a project. I create the following project:
Project Creation.png
Project Creation.png (66.19 KiB) Viewed 2604 times
The project looks like this when created:
Simple Project.png
Simple Project.png (87.22 KiB) Viewed 2604 times
I verified that the "Launch Mode", "Launch Config", and "Launch Target" all match (even selected the correct COM port for my ESP32 board in the Launch Target settings) and then clicked the hammer icon to build the project. This is where I ran into my second issue. The build failed with the following printed to the console:

Code: Select all

Building in: C:\Users\Shawn\ESP32\Workspace\Hiya\build
Configuring in: C:\Users\Shawn\ESP32\Workspace\Hiya\build
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=C:\Espressif\frameworks\esp-idf-v5.1.2\tools\cmake\toolchain-esp32.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCCACHE_ENABLE=1 -DIDF_TARGET=esp32 C:\Users\Shawn\ESP32\Workspace\Hiya
-- Found Git: C:/Espressif/tools/idf-git/2.43.0/cmd/git.exe (found version "2.43.0.windows.1") 
-- ccache will be used for faster recompilation
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git'
-- Could not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
-- Checking Python dependencies...
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
CMake Error at C:/Espressif/frameworks/esp-idf-v5.1.2/tools/cmake/build.cmake:366 (message):
-- Configuring incomplete, errors occurred!
See also "C:/Users/Shawn/ESP32/Workspace/Hiya/build/CMakeFiles/CMakeOutput.log".
  Failed to run Python dependency check.  Python: python, Error: 9009
Call Stack (most recent call first):
  C:/Espressif/frameworks/esp-idf-v5.1.2/tools/cmake/build.cmake:498 (__build_check_python)
  C:/Espressif/frameworks/esp-idf-v5.1.2/tools/cmake/project.cmake:547 (idf_build_process)
  CMakeLists.txt:6 (project)


cmake --build . -- -v
ninja: error: loading 'build.ninja': The system cannot find the file specified.


Build complete (0 errors, 0 warnings): C:\Users\Shawn\ESP32\Workspace\Hiya\build
Total time taken to build the project: 2,983 ms
This seems to indicate that it can't find my instance of Python for some reason. I ran both ESP-IDF 5.1 CMD and ESP-IDF 5.1 PowerShell and both utilities indicated that everything was installed and good to go. Wanting to check the installation, I followed the instructions found here https://docs.espressif.com/projects/esp ... ur-project to build the Hiya project from the command line (using ESP-IDF 5.1 CMD utility). I am able to follow that process all the way to programming my board and watching the program run. So it appears that my toolchain is installed correctly and functioning properly.

Code: Select all

C:\Users\Shawn\ESP32\Workspace\Hiya>idf.py set-target esp32
Adding "set-target"'s dependency "fullclean" to list of commands with default set of options.
Executing action: fullclean
Executing action: set-target
Set Target to: esp32, new sdkconfig will be created.
Running cmake in directory C:\Users\Shawn\ESP32\Workspace\Hiya\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=C:\Espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe -DESP_PLATFORM=1 -DIDF_TARGET=esp32 -DCCACHE_ENABLE=1 C:\Users\Shawn\ESP32\Workspace\Hiya"...
-- Found Git: C:/Espressif/tools/idf-git/2.43.0/cmd/git.exe (found version "2.43.0.windows.1")
-- ccache will be used for faster recompilation
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git'
-- Could not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file C:/Users/Shawn/ESP32/Workspace/Hiya/sdkconfig
Compiler supported targets: xtensa-esp32-elf

-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of time_t
-- Check size of time_t - done
-- Found Python3: C:/Espressif/python_env/idf5.1_py3.11_env/Scripts/python.exe (found version "3.11.2") found components: Interpreter
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
-- App "app-template" version: 1
-- Adding linker script C:/Users/Shawn/ESP32/Workspace/Hiya/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_system/ld/esp32/sections.ld.in
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/soc/esp32/ld/esp32.peripherals.ld
-- Components: app_trace app_update bootloader bootloader_support bt cmock console cxx driver efuse esp-tls esp_adc esp_app_format esp_coex esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp_wifi espcoredump esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 json log lwip main mbedtls mqtt newlib nvs_flash openthread partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: C:/Espressif/frameworks/esp-idf-v5.1.2/components/app_trace C:/Espressif/frameworks/esp-idf-v5.1.2/components/app_update C:/Espressif/frameworks/esp-idf-v5.1.2/components/bootloader C:/Espressif/frameworks/esp-idf-v5.1.2/components/bootloader_support C:/Espressif/frameworks/esp-idf-v5.1.2/components/bt C:/Espressif/frameworks/esp-idf-v5.1.2/components/cmock C:/Espressif/frameworks/esp-idf-v5.1.2/components/console C:/Espressif/frameworks/esp-idf-v5.1.2/components/cxx C:/Espressif/frameworks/esp-idf-v5.1.2/components/driver C:/Espressif/frameworks/esp-idf-v5.1.2/components/efuse C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp-tls C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_adc C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_app_format C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_coex C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_common C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_eth C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_event C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_gdbstub C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_hid C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_http_client C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_http_server C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_https_ota C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_https_server C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_hw_support C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_lcd C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_local_ctrl C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_mm C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_netif C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_netif_stack C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_partition C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_phy C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_pm C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_psram C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_ringbuf C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_system C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_timer C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_wifi C:/Espressif/frameworks/esp-idf-v5.1.2/components/espcoredump C:/Espressif/frameworks/esp-idf-v5.1.2/components/esptool_py C:/Espressif/frameworks/esp-idf-v5.1.2/components/fatfs C:/Espressif/frameworks/esp-idf-v5.1.2/components/freertos C:/Espressif/frameworks/esp-idf-v5.1.2/components/hal C:/Espressif/frameworks/esp-idf-v5.1.2/components/heap C:/Espressif/frameworks/esp-idf-v5.1.2/components/http_parser C:/Espressif/frameworks/esp-idf-v5.1.2/components/idf_test C:/Espressif/frameworks/esp-idf-v5.1.2/components/ieee802154 C:/Espressif/frameworks/esp-idf-v5.1.2/components/json C:/Espressif/frameworks/esp-idf-v5.1.2/components/log C:/Espressif/frameworks/esp-idf-v5.1.2/components/lwip C:/Users/Shawn/ESP32/Workspace/Hiya/main C:/Espressif/frameworks/esp-idf-v5.1.2/components/mbedtls C:/Espressif/frameworks/esp-idf-v5.1.2/components/mqtt C:/Espressif/frameworks/esp-idf-v5.1.2/components/newlib C:/Espressif/frameworks/esp-idf-v5.1.2/components/nvs_flash C:/Espressif/frameworks/esp-idf-v5.1.2/components/openthread C:/Espressif/frameworks/esp-idf-v5.1.2/components/partition_table C:/Espressif/frameworks/esp-idf-v5.1.2/components/perfmon C:/Espressif/frameworks/esp-idf-v5.1.2/components/protobuf-c C:/Espressif/frameworks/esp-idf-v5.1.2/components/protocomm C:/Espressif/frameworks/esp-idf-v5.1.2/components/pthread C:/Espressif/frameworks/esp-idf-v5.1.2/components/sdmmc C:/Espressif/frameworks/esp-idf-v5.1.2/components/soc C:/Espressif/frameworks/esp-idf-v5.1.2/components/spi_flash C:/Espressif/frameworks/esp-idf-v5.1.2/components/spiffs C:/Espressif/frameworks/esp-idf-v5.1.2/components/tcp_transport C:/Espressif/frameworks/esp-idf-v5.1.2/components/ulp C:/Espressif/frameworks/esp-idf-v5.1.2/components/unity C:/Espressif/frameworks/esp-idf-v5.1.2/components/usb C:/Espressif/frameworks/esp-idf-v5.1.2/components/vfs C:/Espressif/frameworks/esp-idf-v5.1.2/components/wear_levelling C:/Espressif/frameworks/esp-idf-v5.1.2/components/wifi_provisioning C:/Espressif/frameworks/esp-idf-v5.1.2/components/wpa_supplicant C:/Espressif/frameworks/esp-idf-v5.1.2/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Shawn/ESP32/Workspace/Hiya/build

Code: Select all

C:\Users\Shawn\ESP32\Workspace\Hiya>idf.py menuconfig
Executing action: menuconfig
Running ninja in directory C:\Users\Shawn\ESP32\Workspace\Hiya\build
Executing "ninja menuconfig"...
[0/1] cmd.exe /C "cd /D C:\Users\Shawn\ESP32\Workspace\Hiy...tput config C:/Users/Shawn/ESP32/Workspace/Hiya/sdkconfig"
C:/Espressif/frameworks/esp-idf-v5.1.2/Kconfig:16: warning: IDF_ENV_FPGA has 'option env="IDF_ENV_FPGA"', but the environment variable IDF_ENV_FPGA is not set
Loaded configuration 'C:/Users/Shawn/ESP32/Workspace/Hiya/sdkconfig'
No changes to save (for 'C:/Users/Shawn/ESP32/Workspace/Hiya/sdkconfig')

C:\Users\Shawn\ESP32\Workspace\Hiya>

Code: Select all

C:\Users\Shawn\ESP32\Workspace\Hiya>idf.py build
Executing action: all (aliases: build)
Running ninja in directory C:\Users\Shawn\ESP32\Workspace\Hiya\build
Executing "ninja all"...
[0/1] Re-running CMake...-- ccache will be used for faster recompilation
-- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git'
-- Could not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file C:/Users/Shawn/ESP32/Workspace/Hiya/sdkconfig
Compiler supported targets: xtensa-esp32-elf

-- App "app-template" version: 1
-- Adding linker script C:/Users/Shawn/ESP32/Workspace/Hiya/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_system/ld/esp32/sections.ld.in
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/soc/esp32/ld/esp32.peripherals.ld
-- Components: app_trace app_update bootloader bootloader_support bt cmock console cxx driver efuse esp-tls esp_adc esp_app_format esp_coex esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp_wifi espcoredump esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 json log lwip main mbedtls mqtt newlib nvs_flash openthread partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: C:/Espressif/frameworks/esp-idf-v5.1.2/components/app_trace C:/Espressif/frameworks/esp-idf-v5.1.2/components/app_update C:/Espressif/frameworks/esp-idf-v5.1.2/components/bootloader C:/Espressif/frameworks/esp-idf-v5.1.2/components/bootloader_support C:/Espressif/frameworks/esp-idf-v5.1.2/components/bt C:/Espressif/frameworks/esp-idf-v5.1.2/components/cmock C:/Espressif/frameworks/esp-idf-v5.1.2/components/console C:/Espressif/frameworks/esp-idf-v5.1.2/components/cxx C:/Espressif/frameworks/esp-idf-v5.1.2/components/driver C:/Espressif/frameworks/esp-idf-v5.1.2/components/efuse C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp-tls C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_adc C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_app_format C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_coex C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_common C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_eth C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_event C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_gdbstub C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_hid C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_http_client C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_http_server C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_https_ota C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_https_server C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_hw_support C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_lcd C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_local_ctrl C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_mm C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_netif C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_netif_stack C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_partition C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_phy C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_pm C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_psram C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_ringbuf C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_system C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_timer C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_wifi C:/Espressif/frameworks/esp-idf-v5.1.2/components/espcoredump C:/Espressif/frameworks/esp-idf-v5.1.2/components/esptool_py C:/Espressif/frameworks/esp-idf-v5.1.2/components/fatfs C:/Espressif/frameworks/esp-idf-v5.1.2/components/freertos C:/Espressif/frameworks/esp-idf-v5.1.2/components/hal C:/Espressif/frameworks/esp-idf-v5.1.2/components/heap C:/Espressif/frameworks/esp-idf-v5.1.2/components/http_parser C:/Espressif/frameworks/esp-idf-v5.1.2/components/idf_test C:/Espressif/frameworks/esp-idf-v5.1.2/components/ieee802154 C:/Espressif/frameworks/esp-idf-v5.1.2/components/json C:/Espressif/frameworks/esp-idf-v5.1.2/components/log C:/Espressif/frameworks/esp-idf-v5.1.2/components/lwip C:/Users/Shawn/ESP32/Workspace/Hiya/main C:/Espressif/frameworks/esp-idf-v5.1.2/components/mbedtls C:/Espressif/frameworks/esp-idf-v5.1.2/components/mqtt C:/Espressif/frameworks/esp-idf-v5.1.2/components/newlib C:/Espressif/frameworks/esp-idf-v5.1.2/components/nvs_flash C:/Espressif/frameworks/esp-idf-v5.1.2/components/openthread C:/Espressif/frameworks/esp-idf-v5.1.2/components/partition_table C:/Espressif/frameworks/esp-idf-v5.1.2/components/perfmon C:/Espressif/frameworks/esp-idf-v5.1.2/components/protobuf-c C:/Espressif/frameworks/esp-idf-v5.1.2/components/protocomm C:/Espressif/frameworks/esp-idf-v5.1.2/components/pthread C:/Espressif/frameworks/esp-idf-v5.1.2/components/sdmmc C:/Espressif/frameworks/esp-idf-v5.1.2/components/soc C:/Espressif/frameworks/esp-idf-v5.1.2/components/spi_flash C:/Espressif/frameworks/esp-idf-v5.1.2/components/spiffs C:/Espressif/frameworks/esp-idf-v5.1.2/components/tcp_transport C:/Espressif/frameworks/esp-idf-v5.1.2/components/ulp C:/Espressif/frameworks/esp-idf-v5.1.2/components/unity C:/Espressif/frameworks/esp-idf-v5.1.2/components/usb C:/Espressif/frameworks/esp-idf-v5.1.2/components/vfs C:/Espressif/frameworks/esp-idf-v5.1.2/components/wear_levelling C:/Espressif/frameworks/esp-idf-v5.1.2/components/wifi_provisioning C:/Espressif/frameworks/esp-idf-v5.1.2/components/wpa_supplicant C:/Espressif/frameworks/esp-idf-v5.1.2/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Shawn/ESP32/Workspace/Hiya/build
[113/900] Generating ../../partition_table/partition-table.binPartition table binary generated. Contents:
*******************************************************************************
# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,24K,
phy_init,data,phy,0xf000,4K,
factory,app,factory,0x10000,1M,
*******************************************************************************
[892/900] Performing configure step for 'bootloader'-- Found Git: C:/Espressif/tools/idf-git/2.43.0/cmd/git.exe (found version "2.43.0.windows.1")
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file C:/Users/Shawn/ESP32/Workspace/Hiya/sdkconfig
Compiler supported targets: xtensa-esp32-elf

-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of time_t
-- Check size of time_t - done
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/soc/esp32/ld/esp32.peripherals.ld
-- App "bootloader" version: v5.1.2-dirty
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/bootloader/subproject/main/ld/esp32/bootloader.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v5.1.2/components/bootloader/subproject/main/ld/esp32/bootloader.rom.ld
-- Components: bootloader bootloader_support efuse esp_app_format esp_common esp_hw_support esp_rom esp_system esptool_py freertos hal log main micro-ecc newlib partition_table soc spi_flash xtensa
-- Component paths: C:/Espressif/frameworks/esp-idf-v5.1.2/components/bootloader C:/Espressif/frameworks/esp-idf-v5.1.2/components/bootloader_support C:/Espressif/frameworks/esp-idf-v5.1.2/components/efuse C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_app_format C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_common C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_hw_support C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_rom C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_system C:/Espressif/frameworks/esp-idf-v5.1.2/components/esptool_py C:/Espressif/frameworks/esp-idf-v5.1.2/components/freertos C:/Espressif/frameworks/esp-idf-v5.1.2/components/hal C:/Espressif/frameworks/esp-idf-v5.1.2/components/log C:/Espressif/frameworks/esp-idf-v5.1.2/components/bootloader/subproject/main C:/Espressif/frameworks/esp-idf-v5.1.2/components/bootloader/subproject/components/micro-ecc C:/Espressif/frameworks/esp-idf-v5.1.2/components/newlib C:/Espressif/frameworks/esp-idf-v5.1.2/components/partition_table C:/Espressif/frameworks/esp-idf-v5.1.2/components/soc C:/Espressif/frameworks/esp-idf-v5.1.2/components/spi_flash C:/Espressif/frameworks/esp-idf-v5.1.2/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Shawn/ESP32/Workspace/Hiya/build/bootloader
[103/104] Generating binary image from built executableesptool.py v4.7.0
Creating esp32 image...
Merged 1 ELF section
Successfully created esp32 image.
Generated C:/Users/Shawn/ESP32/Workspace/Hiya/build/bootloader/bootloader.bin
[104/104] cmd.exe /C "cd /D C:\Users\Shawn\ESP32\Workspace...hawn/ESP32/Workspace/Hiya/build/bootloader/bootloader.bin"Bootloader binary size 0x6810 bytes. 0x7f0 bytes (7%) free.
[899/900] Generating binary image from built executableesptool.py v4.7.0
Creating esp32 image...
Merged 2 ELF sections
Successfully created esp32 image.
Generated C:/Users/Shawn/ESP32/Workspace/Hiya/build/app-template.bin
[900/900] cmd.exe /C "cd /D C:\Users\Shawn\ESP32\Workspace...:/Users/Shawn/ESP32/Workspace/Hiya/build/app-template.bin"app-template.bin binary size 0x2abd0 bytes. Smallest app partition is 0x100000 bytes. 0xd5430 bytes (83%) free.

Project build complete. To flash, run this command:
C:\Espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe ..\..\..\..\..\Espressif\frameworks\esp-idf-v5.1.2\components\esptool_py\esptool\esptool.py -p (PORT) -b 460800 --before default_reset --after hard_reset --chip esp32  write_flash --flash_mode dio --flash_size 2MB --flash_freq 40m 0x1000 build\bootloader\bootloader.bin 0x8000 build\partition_table\partition-table.bin 0x10000 build\app-template.bin
or run 'idf.py -p (PORT) flash'

C:\Users\Shawn\ESP32\Workspace\Hiya>
And successful programming:

Code: Select all

C:\Users\Shawn\ESP32\Workspace\Hiya>idf.py flash -p COM3
Executing action: flash
Running ninja in directory C:\Users\Shawn\ESP32\Workspace\Hiya\build
Executing "ninja flash"...
[1/5] cmd.exe /C "cd /D C:\Users\Shawn\ESP32\Workspace\Hiya\build\esp-idf\esptool_py && C:\Espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v5.1.2/components/partition_table/check_sizes.py --offset 0x8000 partition --type app C:/Users/Shawn/ESP32/Workspace/Hiya/build/partition_table/partition-table.bin C:/Users/Shawn/ESP32/Workspace/Hiya/build/app-template.bin"
app-template.bin binary size 0x2abd0 bytes. Smallest app partition is 0x100000 bytes. 0xd5430 bytes (83%) free.
[2/5] Performing build step for 'bootloader'
[1/1] cmd.exe /C "cd /D C:\Users\Shawn\ESP32\Workspace\Hiya\build\bootloader\esp-idf\esptool_py && C:\Espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v5.1.2/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 C:/Users/Shawn/ESP32/Workspace/Hiya/build/bootloader/bootloader.bin"
Bootloader binary size 0x6810 bytes. 0x7f0 bytes (7%) free.
[2/3] cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v5.1.2\components\esptool_py && C:\Espressif\tools\cmake\3.24.0\bin\cmake.exe -D IDF_PATH=C:/Espressif/frameworks/esp-idf-v5.1.2 -D SERIAL_TOOL=C:/Espressif/python_env/idf5.1_py3.11_env/Scripts/python.exe;;C:/Espressif/frameworks/esp-idf-v5.1.2/components/esptool_py/esptool/esptool.py;--chip;esp32 -D SERIAL_TOOL_ARGS=--before=default_reset;--after=hard_reset;write_flash;@flash_args -D WORKING_DIRECTORY=C:/Users/Shawn/ESP32/Workspace/Hiya/build -P C:/Espressif/frameworks/esp-idf-v5.1.2/components/esptool_py/run_serial_tool.cmake"
esptool.py --chip esp32 -p COM3 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x1000 bootloader/bootloader.bin 0x10000 app-template.bin 0x8000 partition_table/partition-table.bin
esptool.py v4.7.0
Serial port COM3
Connecting.....
Chip is ESP32-D0WDQ6 (revision v0.0)
Features: WiFi, BT, Dual Core, Coding Scheme None
Crystal is 40MHz
MAC: 30:ae:a4:05:0d:e8
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00007fff...
Flash will be erased from 0x00010000 to 0x0003afff...
Flash will be erased from 0x00008000 to 0x00008fff...
Compressed 26640 bytes to 16693...
Writing at 0x00001000... (50 %)
Writing at 0x0000768d... (100 %)
Wrote 26640 bytes (16693 compressed) at 0x00001000 in 0.8 seconds (effective 278.6 kbit/s)...
Hash of data verified.
Compressed 175056 bytes to 97357...
Writing at 0x00010000... (16 %)
Writing at 0x0001c0d9... (33 %)
Writing at 0x00021a82... (50 %)
Writing at 0x0002734b... (66 %)
Writing at 0x0002d606... (83 %)
Writing at 0x000351f9... (100 %)
Wrote 175056 bytes (97357 compressed) at 0x00010000 in 2.6 seconds (effective 532.5 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 103...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.1 seconds (effective 416.2 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
Done

C:\Users\Shawn\ESP32\Workspace\Hiya>
The code running:

Code: Select all

C:\Users\Shawn\ESP32\Workspace\Hiya>idf.py monitor -p COM3
Executing action: monitor
Running idf_monitor in directory C:\Users\Shawn\ESP32\Workspace\Hiya
Executing "C:\Espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe C:\Espressif\frameworks\esp-idf-v5.1.2\tools/idf_monitor.py -p COM3 -b 115200 --toolchain-prefix xtensa-esp32-elf- --target esp32 --revision 0 C:\Users\Shawn\ESP32\Workspace\Hiya\build\app-template.elf --force-color -m 'C:\Espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe' 'C:\Espressif\frameworks\esp-idf-v5.1.2\tools\idf.py'"...
--- WARNING: GDB cannot open serial ports accessed as COMx
--- Using \\.\COM3 instead...
--- esp-idf-monitor 1.3.4 on \\.\COM3 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
eets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:7084
ho 0 tail 12 room 4
load:0x40078000,len:15584
load:0x40080400,len:4
0x40080400: _init at ??:?

load:0x40080404,len:3876
entry 0x4008064c
I (31) boot: ESP-IDF v5.1.2-dirty 2nd stage bootloader
I (31) boot: compile time Feb  8 2024 02:41:17
I (31) boot: Multicore bootloader
I (36) boot: chip revision: v0.0
I (39) boot.esp32: SPI Speed      : 40MHz
I (44) boot.esp32: SPI Mode       : DIO
I (49) boot.esp32: SPI Flash Size : 2MB
I (53) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (62) boot: ## Label            Usage          Type ST Offset   Length
I (69) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (77) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (84) boot:  2 factory          factory app      00 00 00010000 00100000
I (92) boot: End of partition table
I (96) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=091d8h ( 37336) map
I (118) esp_image: segment 1: paddr=00019200 vaddr=3ffb0000 size=020f0h (  8432) load
I (122) esp_image: segment 2: paddr=0001b2f8 vaddr=40080000 size=04d20h ( 19744) load
I (132) esp_image: segment 3: paddr=00020020 vaddr=400d0020 size=1389ch ( 80028) map
I (161) esp_image: segment 4: paddr=000338c4 vaddr=40084d20 size=072dch ( 29404) load
I (180) boot: Loaded app from partition at offset 0x10000
I (180) boot: Disabling RNG early entropy source...
I (191) cpu_start: Multicore app
I (192) cpu_start: Pro cpu up.
I (192) cpu_start: Starting app cpu, entry point is 0x400810f0
0x400810f0: call_start_cpu1 at C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_system/port/cpu_start.c:157

I (0) cpu_start: App cpu up.
I (210) cpu_start: Pro cpu start user code
I (210) cpu_start: cpu freq: 160000000 Hz
I (210) cpu_start: Application information:
I (214) cpu_start: Project name:     app-template
I (220) cpu_start: App version:      1
I (224) cpu_start: Compile time:     Feb  8 2024 02:41:12
I (230) cpu_start: ELF file SHA256:  51e8071511a3ea39...
I (236) cpu_start: ESP-IDF:          v5.1.2-dirty
I (242) cpu_start: Min chip rev:     v0.0
I (246) cpu_start: Max chip rev:     v3.99
I (251) cpu_start: Chip rev:         v0.0
I (256) heap_init: Initializing. RAM available for dynamic allocation:
I (263) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (269) heap_init: At 3FFB2968 len 0002D698 (181 KiB): DRAM
I (275) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (282) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (288) heap_init: At 4008C000 len 00014000 (80 KiB): IRAM
I (296) spi_flash: detected chip: gd
I (299) spi_flash: flash io: dio
W (303) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (316) app_start: Starting scheduler on CPU0
I (321) app_start: Starting scheduler on CPU1
I (321) main_task: Started on CPU0
I (331) main_task: Calling app_main()
Hello from app_main!
Hello from app_main!
Hello from app_main!
Hello from app_main!
Hello from app_main!
Hello from app_main!


C:\Users\Shawn\ESP32\Workspace\Hiya>
So, using the command line works a treat. What is also interesting is that after using the command line utilities on the Espressif-IDE project, the build results are now successful when I rebuild the project in the IDE. This is true even after running a Clean on the project.

Code: Select all

Building in: C:\Users\Shawn\ESP32\Workspace\Hiya\build
cmake --build . -- -v
[1/4] cmd.exe /C "cd /D C:\Users\Shawn\ESP32\Workspace\Hiya\build\esp-idf\esptool_py && C:\Espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v5.1.2/components/partition_table/check_sizes.py --offset 0x8000 partition --type app C:/Users/Shawn/ESP32/Workspace/Hiya/build/partition_table/partition-table.bin C:/Users/Shawn/ESP32/Workspace/Hiya/build/app-template.bin"
app-template.bin binary size 0x2abd0 bytes. Smallest app partition is 0x100000 bytes. 0xd5430 bytes (83%) free.
[2/4] cmd.exe /C "cd /D C:\Users\Shawn\ESP32\Workspace\Hiya\build\bootloader && C:\Espressif\tools\cmake\3.24.0\bin\cmake.exe --build ."
[1/1] cmd.exe /C "cd /D C:\Users\Shawn\ESP32\Workspace\Hiya\build\bootloader\esp-idf\esptool_py && C:\Espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v5.1.2/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 C:/Users/Shawn/ESP32/Workspace/Hiya/build/bootloader/bootloader.bin"
Bootloader binary size 0x6810 bytes. 0x7f0 bytes (7%) free.
Build complete (0 errors, 0 warnings): C:\Users\Shawn\ESP32\Workspace\Hiya\build
C:\Users\Shawn\.espressif\python_env\idf5.1_py3.9_env\Scripts\python.exe C:\Espressif\frameworks\esp-idf-v5.1.2\tools\idf_size.py C:/Users/Shawn/ESP32/Workspace/Hiya/build/app-template.map
Total sizes:

Used static DRAM:   10600 bytes ( 170136 remain, 5.9% used)

      .data size:    8432 bytes

      .bss  size:    2168 bytes

Used static IRAM:   49146 bytes (  81926 remain, 37.5% used)

      .text size:   48119 bytes

   .vectors size:    1027 bytes

Used Flash size :  117363 bytes

           .text:   80027 bytes

         .rodata:   37080 bytes

Total image size:  174941 bytes (.bin may be padded larger)

C:\Users\Shawn\.espressif\python_env\idf5.1_py3.9_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v5.1.2/\components\partition_table\gen_esp32part.py C:\Users\Shawn\ESP32\Workspace\Hiya\build\partition_table\partition-table.bin
Total time taken to build the project: 1,824 ms
The project now has additional files after the successful build as can be seen here:
Post Command Line Build.png
Post Command Line Build.png (97.55 KiB) Viewed 2604 times
So is this the proper sequence when using the IDE, after creating a project, it must be first built from the command line before the IDE can be used to build the project?

Programming from the IDE
So I'm thinking "Great! The project builds now; lets try and program the board from the IDE now." And there is where I ran into my third error. Clicking the green 'Play' button to program the board results in a pop-up window saying there are "Errors in Workspace" "Errors exist in required project(s): Hiya Proceed with Launch?" Clicking Proceed results in the following dump to the console:

Code: Select all

The following Python requirements are not satisfied:

Requirement 'click<8.1,>=7.0' was not met. Installed version: 8.1.7

To install the missing packages, please run "install.bat"

Diagnostic information:

    IDF_PYTHON_ENV_PATH: C:\Users\Shawn\.espressif\python_env\idf5.1_py3.9_env

    Python interpreter used: C:\Users\Shawn\.espressif\python_env\idf5.1_py3.9_env\Scripts\python.exe

Constraint file: C:\Espressif\espidf.constraints.v5.1.txt

Requirement files:

 - C:/Espressif/frameworks/esp-idf-v5.1.2/tools\requirements\requirements.core.txt

Python being checked: C:\Users\Shawn\.espressif\python_env\idf5.1_py3.9_env\Scripts\python.exe


ESP-IDF v5.1.2-dirty
On the "Problems" tab in the IDE I also see a single CMake error flagged:

Code: Select all

Severity:  Error
On element:  Hiya
Location:  line 366
Description:
CMake Error at C:/Espressif/frameworks/esp-idf-v5.1.2/tools/cmake/build.cmake:366 (message):
Yes, the error is really blank after (message). No other information is given.

So this is where I'm at. I can compile and program via command line ok, but the Espressif-IDE is giving strange results. Does anyone have a recommendation for next steps or additional diagnostics to try and perform. Thanks again in advance for any help you can provide.

Thank you,

Shawn

sstandfast
Posts: 6
Joined: Thu Feb 08, 2024 6:03 am

Re: Espressif-IDE confusion and installation issues

Postby sstandfast » Thu Feb 08, 2024 3:45 pm

UPDATE

After finally getting some sleep, I did a search for 'install.bat' in the Espressif folder on my hard drive and found two instances of it. I ran the version located in C:\Espressif\frameworks\esp-idf-v5.1.2. Then, as per the recommendation from the 'install.bat' utility, I ran 'export.bat' from the same location and it said everything was good to go. Running these two utilities had an impact, but unfortunately they did not solve my issues. Keeping in the same Hiya project, hitting the green 'Run' button still results in the same successful compilation followed by an "Errors in Workspace" popup.

Code: Select all

Building in: C:\Users\Shawn\ESP32\Workspace\Hiya\build
cmake --build . -- -v
[1/4] cmd.exe /C "cd /D C:\Users\Shawn\ESP32\Workspace\Hiya\build\esp-idf\esptool_py && C:\Espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v5.1.2/components/partition_table/check_sizes.py --offset 0x8000 partition --type app C:/Users/Shawn/ESP32/Workspace/Hiya/build/partition_table/partition-table.bin C:/Users/Shawn/ESP32/Workspace/Hiya/build/app-template.bin"
app-template.bin binary size 0x2abd0 bytes. Smallest app partition is 0x100000 bytes. 0xd5430 bytes (83%) free.
[2/4] cmd.exe /C "cd /D C:\Users\Shawn\ESP32\Workspace\Hiya\build\bootloader && C:\Espressif\tools\cmake\3.24.0\bin\cmake.exe --build ."
[1/1] cmd.exe /C "cd /D C:\Users\Shawn\ESP32\Workspace\Hiya\build\bootloader\esp-idf\esptool_py && C:\Espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v5.1.2/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 C:/Users/Shawn/ESP32/Workspace/Hiya/build/bootloader/bootloader.bin"
Bootloader binary size 0x6810 bytes. 0x7f0 bytes (7%) free.
Build complete (0 errors, 0 warnings): C:\Users\Shawn\ESP32\Workspace\Hiya\build
C:\Users\Shawn\.espressif\python_env\idf5.1_py3.9_env\Scripts\python.exe C:\Espressif\frameworks\esp-idf-v5.1.2\tools\idf_size.py C:/Users/Shawn/ESP32/Workspace/Hiya/build/app-template.map
Total sizes:

Used static DRAM:   10600 bytes ( 170136 remain, 5.9% used)

      .data size:    8432 bytes

      .bss  size:    2168 bytes

Used static IRAM:   49146 bytes (  81926 remain, 37.5% used)

      .text size:   48119 bytes

   .vectors size:    1027 bytes

Used Flash size :  117363 bytes

           .text:   80027 bytes

         .rodata:   37080 bytes

Total image size:  174941 bytes (.bin may be padded larger)

C:\Users\Shawn\.espressif\python_env\idf5.1_py3.9_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v5.1.2/\components\partition_table\gen_esp32part.py C:\Users\Shawn\ESP32\Workspace\Hiya\build\partition_table\partition-table.bin
Total time taken to build the project: 405 ms
Launching Error.png
Launching Error.png (6.4 KiB) Viewed 2562 times
Clicking 'Proceed' however, now results in a different console dump. Instead of the 'Python requirements not met...' error I get the following:

Code: Select all

'C:\Users\Shawn\.espressif\python_env\idf5.1_py3.9_env\Scripts\python.exe' is currently active in the environment while the project was configured with 'C:\Espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe'. Run 'idf.py fullclean' to start again.
Executing action: flash
Navigating to the project via the command line and running 'idf.py fullclean' appears to run correctly:

Code: Select all

c:\Users\Shawn\ESP32\Workspace\Hiya>idf.py fullclean
Executing action: fullclean
Executing action: remove_managed_components
Done

c:\Users\Shawn\ESP32\Workspace\Hiya>
but results in the "Python was not found..." issue I first described in the first entry upon subsequent recompilation in the IDE.

Code: Select all

Building in: C:\Users\Shawn\ESP32\Workspace\Hiya\build
Configuring in: C:\Users\Shawn\ESP32\Workspace\Hiya\build
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=C:\Espressif\frameworks\esp-idf-v5.1.2\tools\cmake\toolchain-esp32.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCCACHE_ENABLE=1 -DIDF_TARGET=esp32 C:\Users\Shawn\ESP32\Workspace\Hiya
-- Found Git: C:/Espressif/tools/idf-git/2.43.0/cmd/git.exe (found version "2.43.0.windows.1") 
-- ccache will be used for faster recompilation
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git'
-- Could not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
-- Checking Python dependencies...
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
CMake Error at C:/Espressif/frameworks/esp-idf-v5.1.2/tools/cmake/build.cmake:366 (message):
-- Configuring incomplete, errors occurred!
See also "C:/Users/Shawn/ESP32/Workspace/Hiya/build/CMakeFiles/CMakeOutput.log".
  Failed to run Python dependency check.  Python: python, Error: 9009
Call Stack (most recent call first):
  C:/Espressif/frameworks/esp-idf-v5.1.2/tools/cmake/build.cmake:498 (__build_check_python)
  C:/Espressif/frameworks/esp-idf-v5.1.2/tools/cmake/project.cmake:547 (idf_build_process)
  CMakeLists.txt:6 (project)


cmake --build . -- -v
ninja: error: loading 'build.ninja': The system cannot find the file specified.


Build complete (0 errors, 0 warnings): C:\Users\Shawn\ESP32\Workspace\Hiya\build
Total time taken to build the project: 3,089 ms
I still have the same CMake error listed in the IDE after all of this as well.
Properties for CMake Problem.png
Properties for CMake Problem.png (17.8 KiB) Viewed 2562 times
although, now there is a new warning generated as well:
Properties for JSON compilation database.png
Properties for JSON compilation database.png (20.59 KiB) Viewed 2562 times
I can go through the command line build process again and get the IDE back to giving the same dump about mismatched python versions, but this is not getting me anywhere. It also clears the JSON warning in the IDE but not the CMake error.

Thanks again for any assistance you can provide.

Shawn

ESP_Minatel
Posts: 361
Joined: Mon Jan 04, 2021 2:06 pm

Re: Espressif-IDE confusion and installation issues

Postby ESP_Minatel » Thu Feb 08, 2024 4:22 pm

Hi Shawn,

Thank you so much for your valuable feedback. This is the way we like to improve our tools and the developer experience.
We are working on the IDE documentation improvements to make it easier for the developers, and your feedback will help us.

For issues solving, it might be helpful for us if you export the error log. Please follow this instruction.

Can you confirm if you are using the same Python version on the Eclipse/Espressif IDE as the one you are using on the CLI? I see you have v3.9 and v3.11.

Tks,
Pedro

sstandfast
Posts: 6
Joined: Thu Feb 08, 2024 6:03 am

Re: Espressif-IDE confusion and installation issues

Postby sstandfast » Thu Feb 08, 2024 4:56 pm

Hi Pedro,

Thank you for the response! I have attached the requested error log:
Error Log Export.log
(937.89 KiB) Downloaded 58 times
WRT which version of Python I'm running on command line vs IDE, I'm not sure how to tell. I did not install Python myself nor have I ever explicitly used Python, it came with the All-In-One as far as I know. I didn't start getting the version mismatch errors until after running the 'install.bat' batch file. Could that have installed a newer version of Python? How do I tell which version of Python is being used by the two utilities?

Here are my Environment Variables if that helps:
Build Environment.png
Build Environment.png (61.06 KiB) Viewed 2534 times
Thanks again,

Shawn

sstandfast
Posts: 6
Joined: Thu Feb 08, 2024 6:03 am

Re: Espressif-IDE confusion and installation issues

Postby sstandfast » Thu Feb 08, 2024 5:16 pm

Hi Pedro,

Updating the IDF_PYTHON_ENV_PATH environment variable to point to the C:\Espressif\python_env\idf5.1_py3.11_env folder as opposed to the C:\Users\Shawn\.espressif\python_env\idf5.1_py3.9_env moved the needle. I was able to run and flash my board from the IDE using the green 'Play' button.

However, I still get the "Errors in Workspace" popup when attempting to run the code. Also, if I run the 'idf.py fullclean' command on the CML, I am no longer able to build the project in the IDE. I get the same "Python was not found..." error when it tries to check Python dependencies. I've attached a second Error Log export generated from a build following a fullclean.
Error Log Export 2.log
(948.97 KiB) Downloaded 58 times
Shawn

ESP_Minatel
Posts: 361
Joined: Mon Jan 04, 2021 2:06 pm

Re: Espressif-IDE confusion and installation issues

Postby ESP_Minatel » Thu Feb 08, 2024 6:03 pm

Shawn, can you try to install the tools again via the IDE?

Please use this Python path:

Code: Select all

C:\Users\Shawn\.espressif\python_env\idf5.1_py3.9_env\Scripts\python.exe
on the "ESP-IDF Tools Manager -> Install Tools"
Screenshot 2024-02-08 at 16.23.14.png
Screenshot 2024-02-08 at 16.23.14.png (70.89 KiB) Viewed 2502 times

sstandfast
Posts: 6
Joined: Thu Feb 08, 2024 6:03 am

Re: Espressif-IDE confusion and installation issues

Postby sstandfast » Thu Feb 08, 2024 6:35 pm

Hi Pedro,

I ran the install tools utility again as requested.
install tools dialog.png
install tools dialog.png (17.5 KiB) Viewed 2480 times
It looks like it generates an error when it gets to the install-python-env section. Something about the script being called from a virtual environment and not being able to create another one.

Code: Select all

Installing tools...
This can take a while. Please be patient.
Executing C:\Users\Shawn\.espressif\python_env\idf5.1_py3.9_env\Scripts\python.exe C:\Espressif\frameworks\esp-idf-v5.1.2\tools\idf_tools.py install all
Current system platform: win64
Selected targets are: esp32h2, esp32c3, esp32s2, esp32c6, esp32s3, esp32c2, esp32
Installing tools: xtensa-esp-elf-gdb, riscv32-esp-elf-gdb, xtensa-esp32-elf, xtensa-esp32s2-elf, xtensa-esp32s3-elf, esp-clang, riscv32-esp-elf, esp32ulp-elf, cmake, openocd-esp32, ninja, idf-exe, ccache, dfu-util, esp-rom-elfs
Skipping xtensa-esp-elf-gdb@12.1_20221002 (already installed)
Skipping riscv32-esp-elf-gdb@12.1_20221002 (already installed)
Skipping xtensa-esp32-elf@esp-12.2.0_20230208 (already installed)
Skipping xtensa-esp32s2-elf@esp-12.2.0_20230208 (already installed)
Skipping xtensa-esp32s3-elf@esp-12.2.0_20230208 (already installed)
Skipping esp-clang@15.0.0-23786128ae (already installed)
Skipping riscv32-esp-elf@esp-12.2.0_20230208 (already installed)
Skipping esp32ulp-elf@2.35_20220830 (already installed)
Skipping cmake@3.24.0 (already installed)
Skipping openocd-esp32@v0.12.0-esp32-20230921 (already installed)
Skipping ninja@1.10.2 (already installed)
Skipping idf-exe@1.0.3 (already installed)
Skipping ccache@4.8 (already installed)
Skipping dfu-util@0.11 (already installed)
Skipping esp-rom-elfs@20230320 (already installed)
OK

Executing C:\Users\Shawn\.espressif\python_env\idf5.1_py3.9_env\Scripts\python.exe C:\Espressif\frameworks\esp-idf-v5.1.2\tools\idf_tools.py install-python-env
ERROR: This script was called from a virtual environment, can not create a virtual environment again
ErrorError

Executing C:\Users\Shawn\.espressif\python_env\idf5.1_py3.9_env\Scripts\python.exe C:\Espressif\frameworks\esp-idf-v5.1.2\tools\idf_tools.py export --format=key-value
OPENOCD_SCRIPTS=C:\Espressif\tools\openocd-esp32\v0.12.0-esp32-20230921\openocd-esp32\share\openocd\scripts
IDF_CCACHE_ENABLE=1
ESP_ROM_ELF_DIR=C:\Espressif\tools\esp-rom-elfs\20230320\
ESP_IDF_VERSION=5.1
PATH=C:\Espressif\tools\xtensa-esp-elf-gdb\12.1_20221002\xtensa-esp-elf-gdb\bin;C:\Espressif\tools\riscv32-esp-elf-gdb\12.1_20221002\riscv32-esp-elf-gdb\bin;C:\Espressif\tools\xtensa-esp32-elf\esp-12.2.0_20230208\xtensa-esp32-elf\bin;C:\Espressif\tools\xtensa-esp32s2-elf\esp-12.2.0_20230208\xtensa-esp32s2-elf\bin;C:\Espressif\tools\xtensa-esp32s3-elf\esp-12.2.0_20230208\xtensa-esp32s3-elf\bin;C:\Espressif\tools\esp-clang\15.0.0-23786128ae\esp-clang\bin;C:\Espressif\tools\riscv32-esp-elf\esp-12.2.0_20230208\riscv32-esp-elf\bin;C:\Espressif\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin;C:\Espressif\tools\cmake\3.24.0\bin;C:\Espressif\tools\openocd-esp32\v0.12.0-esp32-20230921\openocd-esp32\bin;C:\Espressif\tools\ninja\1.10.2\;C:\Espressif\tools\idf-exe\1.0.3\;C:\Espressif\tools\ccache\4.8\ccache-4.8-windows-x86_64;C:\Espressif\tools\dfu-util\0.11\dfu-util-0.11-win64;C:\Espressif\frameworks\esp-idf-v5.1.2\tools;%PATH%
IDF_DEACTIVATE_FILE_PATH=C:\Users\Shawn\AppData\Local\Temp\tmpip9klxmgidf_170396
Configured CDT Build Environment variables. You can check Preferences > C/C++ > Build > Environment
Executing C:\Espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe -m pip list
Configured CMake toolchain. You can check Preferences > C/C++ > CMake
Install tools completed.
Building a fullclean project after this results in Python not being found. It's as if the IDE is skipping the 'idf.py set-target esp32' step because running that one command from the CML enables the IDE to build the project successfully. Now, when attempting to program the board is throwing the Python version 3.9 vs 3.11 mismatch error again.

Shawn

sstandfast
Posts: 6
Joined: Thu Feb 08, 2024 6:03 am

Re: Espressif-IDE confusion and installation issues

Postby sstandfast » Thu Feb 08, 2024 6:41 pm

Hi Pedro,

Modifying the Python Executable Location path to point to the same folder structure as the ESP-IDF directory (which also holds Python 3.11 apparently) when running the Install Tools utility seems to have completely fixed my issue.
modified install tools dialog.png
modified install tools dialog.png (16.94 KiB) Viewed 2471 times
I can now build the project in the IDE even after a fullclean has been executed.

Now, on to seeing if I can single-step through code in a debug session.

Thank you for all of your assistance! I truly appreciated your help.

Regards,

Shawn

ESP_Minatel
Posts: 361
Joined: Mon Jan 04, 2021 2:06 pm

Re: Espressif-IDE confusion and installation issues

Postby ESP_Minatel » Fri Feb 09, 2024 9:05 am

Shawn, thanks for reporting it, we'll work to improve the installation procedures on our getting started.
Don't hesitate to contact us if you have any other issues.

Pedro

usysinc
Posts: 2
Joined: Tue Feb 27, 2024 5:15 am

Re: Espressif-IDE confusion and installation issues

Postby usysinc » Tue Feb 27, 2024 5:31 am

I recently read your extensive report regarding failure of the Espressif-IDE installation. I also recently, just yesterday, installed V2.9.1 with no issues at all, from this page https://github.com/espressif/idf-eclips ... stallation. In particular, I used the following text:

Espressif-IDE for Windows

Download the https://dl.espressif.com/dl/esp-idf/ and follow the instructions provided here. This guide will walk you through the installation process for Java, Git, CMake, ESP-IDF, IDF Tools, Device Drivers, and Espressif-IDE to help you get started.

I succeeded in running a hello world program by creating a new project from scratch however when I attempt to import a preexisting project from examples at C:\Espressif\frameworks\esp-idf-v5.2\examples\wifi\wifi_eap_fast forinstance, I am unable to create a "New Launch Target", specifically an, "ESP32" target. When I select "New Launch Target" and configure the target, then pressing the "Finish" button, no target is created and the window defaults to "Local". Then when I build, the result is "No Toolchain found for Target Local".

Have you been able to surmount this difficulty as yet?

Who is online

Users browsing this forum: No registered users and 79 guests