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: The project looks like this when created: 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
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>
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>
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>
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
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
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):
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