Unable to flash firmware via esptool.py

stealthrt
Posts: 6
Joined: Sat Aug 28, 2021 1:22 am

Unable to flash firmware via esptool.py

Postby stealthrt » Fri May 13, 2022 2:55 am

Hey all. I am new at setting up my ESP32 Lilol board using CMAKE. The code I built came from https://github.com/tonyflores1006/intex-swg-iot.

I seem to have built the project code just fine:

Code: Select all

C:\pool\thecode>idf.py build
Executing action: all (aliases: build)
Running cmake in directory c:\pool\thecode\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DIDF_TARGET=esp32 -DCCACHE_ENABLE=1 c:\pool\thecode"...
-- Found Git: C:/Espressif/tools/idf-git/2.34.2/cmd/git.exe (found version "2.34.1.windows.1")
-- ccache will be used for faster recompilation
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/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-2021r2-patch3-8.4.0/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-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file C:/pool/thecode/sdkconfig
C:/pool/thecode/sdkconfig:271 CONFIG_ESP32_REDUCE_PHY_TX_POWER was replaced with CONFIG_ESP_PHY_REDUCE_TX_POWER
C:/pool/thecode/sdkconfig:456 CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE was replaced with CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE
C:/pool/thecode/sdkconfig:458 CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER was replaced with CONFIG_ESP_PHY_MAX_WIFI_TX_POWER
C:/pool/thecode/sdkconfig:459 CONFIG_ESP32_PHY_MAX_TX_POWER was replaced with CONFIG_ESP_PHY_MAX_TX_POWER
C:/pool/thecode/sdkconfig:467 CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE was replaced with CONFIG_ESP_COREDUMP_ENABLE_TO_NONE
C:/pool/thecode/sdkconfig:955 CONFIG_USB_DESC_CUSTOM_VID was replaced with CONFIG_TINYUSB_DESC_CUSTOM_VID
C:/pool/thecode/sdkconfig:956 CONFIG_USB_DESC_CUSTOM_PID was replaced with CONFIG_TINYUSB_DESC_CUSTOM_PID
-- Found Python3: C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python37_64/python.exe (found version "3.7.8") found components: Interpreter
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
-- App "IntexSWG" version: 1
-- Adding linker script C:/pool/thecode/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_system/ld/esp32/sections.ld.in
-- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_rom/esp32/ld/esp32.rom.newlib-time.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/soc/esp32/ld/esp32.peripherals.ld
-- Components: app_trace app_update asio bootloader bootloader_support bt cbor cmock coap console cxx driver efuse esp-tls esp32 esp32-wifi-manager esp_adc_cal 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_ipc esp_lcd esp_local_ctrl esp_netif esp_phy esp_pm esp_ringbuf esp_rom esp_serial_slave_link esp_system esp_timer esp_websocket_client esp_wifi espcoredump esptool_py expat fatfs freemodbus freertos hal heap idf_test ieee802154 jsmn json libsodium log lwip main mbedtls mdns mqtt newlib nghttp nvs_flash openssl openthread partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport tcpip_adapter tinyusb ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: C:/Espressif/frameworks/esp-idf-v4.4.1/components/app_trace C:/Espressif/frameworks/esp-idf-v4.4.1/components/app_update C:/Espressif/frameworks/esp-idf-v4.4.1/components/asio C:/Espressif/frameworks/esp-idf-v4.4.1/components/bootloader C:/Espressif/frameworks/esp-idf-v4.4.1/components/bootloader_support C:/Espressif/frameworks/esp-idf-v4.4.1/components/bt C:/Espressif/frameworks/esp-idf-v4.4.1/components/cbor C:/Espressif/frameworks/esp-idf-v4.4.1/components/cmock C:/Espressif/frameworks/esp-idf-v4.4.1/components/coap C:/Espressif/frameworks/esp-idf-v4.4.1/components/console C:/Espressif/frameworks/esp-idf-v4.4.1/components/cxx C:/Espressif/frameworks/esp-idf-v4.4.1/components/driver C:/Espressif/frameworks/esp-idf-v4.4.1/components/efuse C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp-tls C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp32 C:/pool/thecode/components/esp32-wifi-manager C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_adc_cal C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_common C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_eth C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_event C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_gdbstub C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_hid C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_http_client C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_http_server C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_https_ota C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_https_server C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_hw_support C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_ipc C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_lcd C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_local_ctrl C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_netif C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_phy C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_pm C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_ringbuf C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_rom C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_serial_slave_link C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_system C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_timer C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_websocket_client C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_wifi C:/Espressif/frameworks/esp-idf-v4.4.1/components/espcoredump C:/Espressif/frameworks/esp-idf-v4.4.1/components/esptool_py C:/Espressif/frameworks/esp-idf-v4.4.1/components/expat C:/Espressif/frameworks/esp-idf-v4.4.1/components/fatfs C:/Espressif/frameworks/esp-idf-v4.4.1/components/freemodbus C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos C:/Espressif/frameworks/esp-idf-v4.4.1/components/hal C:/Espressif/frameworks/esp-idf-v4.4.1/components/heap C:/Espressif/frameworks/esp-idf-v4.4.1/components/idf_test C:/Espressif/frameworks/esp-idf-v4.4.1/components/ieee802154 C:/Espressif/frameworks/esp-idf-v4.4.1/components/jsmn C:/Espressif/frameworks/esp-idf-v4.4.1/components/json C:/Espressif/frameworks/esp-idf-v4.4.1/components/libsodium C:/Espressif/frameworks/esp-idf-v4.4.1/components/log C:/Espressif/frameworks/esp-idf-v4.4.1/components/lwip C:/pool/thecode/main C:/Espressif/frameworks/esp-idf-v4.4.1/components/mbedtls C:/Espressif/frameworks/esp-idf-v4.4.1/components/mdns C:/Espressif/frameworks/esp-idf-v4.4.1/components/mqtt C:/Espressif/frameworks/esp-idf-v4.4.1/components/newlib C:/Espressif/frameworks/esp-idf-v4.4.1/components/nghttp C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash C:/Espressif/frameworks/esp-idf-v4.4.1/components/openssl C:/Espressif/frameworks/esp-idf-v4.4.1/components/openthread C:/Espressif/frameworks/esp-idf-v4.4.1/components/partition_table C:/Espressif/frameworks/esp-idf-v4.4.1/components/perfmon C:/Espressif/frameworks/esp-idf-v4.4.1/components/protobuf-c C:/Espressif/frameworks/esp-idf-v4.4.1/components/protocomm C:/Espressif/frameworks/esp-idf-v4.4.1/components/pthread C:/Espressif/frameworks/esp-idf-v4.4.1/components/sdmmc C:/Espressif/frameworks/esp-idf-v4.4.1/components/soc C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash C:/Espressif/frameworks/esp-idf-v4.4.1/components/spiffs C:/Espressif/frameworks/esp-idf-v4.4.1/components/tcp_transport C:/Espressif/frameworks/esp-idf-v4.4.1/components/tcpip_adapter C:/Espressif/frameworks/esp-idf-v4.4.1/components/tinyusb C:/Espressif/frameworks/esp-idf-v4.4.1/components/ulp C:/Espressif/frameworks/esp-idf-v4.4.1/components/unity C:/Espressif/frameworks/esp-idf-v4.4.1/components/usb C:/Espressif/frameworks/esp-idf-v4.4.1/components/vfs C:/Espressif/frameworks/esp-idf-v4.4.1/components/wear_levelling C:/Espressif/frameworks/esp-idf-v4.4.1/components/wifi_provisioning C:/Espressif/frameworks/esp-idf-v4.4.1/components/wpa_supplicant C:/Espressif/frameworks/esp-idf-v4.4.1/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: C:/pool/thecode/build
Running ninja in directory c:\pool\thecode\build
Executing "ninja all"...
[4/1058] Generating ../../partition_table/partition-table.bin
Partition table binary generated. Contents:
*******************************************************************************
# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,16K,
otadata,data,ota,0xd000,8K,
phy_init,data,phy,0xf000,4K,
ota_0,app,ota_0,0x20000,1536K,
ota_1,app,ota_1,0x1a0000,1536K,
fctry,data,nvs,0x320000,16K,
*******************************************************************************
[634/1058] Performing configure step for 'bootloader'
-- Found Git: C:/Espressif/tools/idf-git/2.34.2/cmd/git.exe (found version "2.34.1.windows.1")
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/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-2021r2-patch3-8.4.0/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-2021r2-patch3-8.4.0/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:/pool/thecode/sdkconfig
-- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/soc/esp32/ld/esp32.peripherals.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/bootloader/subproject/main/ld/esp32/bootloader.ld
-- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/bootloader/subproject/main/ld/esp32/bootloader.rom.ld
-- Components: bootloader bootloader_support efuse esp32 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-v4.4.1/components/bootloader C:/Espressif/frameworks/esp-idf-v4.4.1/components/bootloader_support C:/Espressif/frameworks/esp-idf-v4.4.1/components/efuse C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp32 C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_common C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_hw_support C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_rom C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_system C:/Espressif/frameworks/esp-idf-v4.4.1/components/esptool_py C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos C:/Espressif/frameworks/esp-idf-v4.4.1/components/hal C:/Espressif/frameworks/esp-idf-v4.4.1/components/log C:/Espressif/frameworks/esp-idf-v4.4.1/components/bootloader/subproject/main C:/Espressif/frameworks/esp-idf-v4.4.1/components/bootloader/subproject/components/micro-ecc C:/Espressif/frameworks/esp-idf-v4.4.1/components/newlib C:/Espressif/frameworks/esp-idf-v4.4.1/components/partition_table C:/Espressif/frameworks/esp-idf-v4.4.1/components/soc C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash C:/Espressif/frameworks/esp-idf-v4.4.1/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: C:/pool/thecode/build/bootloader
[661/1058] Performing build step for 'bootloader'
[1/97] Generating project_elf_src_esp32.c
[2/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/soc_include_legacy_warn.c.obj
[3/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/lcd_periph.c.obj
[4/97] Building C object CMakeFiles/bootloader.elf.dir/project_elf_src_esp32.c.obj
[5/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/i2s_periph.c.obj
[6/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/interrupts.c.obj
[7/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/rmt_periph.c.obj
[8/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/dac_periph.c.obj
[9/97] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/mpu_hal.c.obj
[10/97] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/cpu_hal.c.obj
[11/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/mcpwm_periph.c.obj
[12/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/spi_periph.c.obj
[13/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/adc_periph.c.obj
[14/97] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_pm.c.obj
[15/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/sdmmc_periph.c.obj
[16/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/gpio_periph.c.obj
[17/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/timer_periph.c.obj
[18/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/lldesc.c.obj
[19/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/sigmadelta_periph.c.obj
[20/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/ledc_periph.c.obj
[21/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/i2c_periph.c.obj
[22/97] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/chip_info.c.obj
[23/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/pcnt_periph.c.obj
[24/97] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/wdt_hal_iram.c.obj
[25/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/uart_periph.c.obj
[26/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/rtc_io_periph.c.obj
[27/97] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_init.c.obj
[28/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/touch_sensor_periph.c.obj
[29/97] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32/sdio_slave_periph.c.obj
[30/97] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_time.c.obj
[31/97] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_clk_init.c.obj
[32/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_random.c.obj
[33/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_console_loader.c.obj
[34/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/bootloader_soc.c.obj
[35/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_clock_loader.c.obj
[36/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_clock_init.c.obj
[37/97] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_wdt.c.obj
[38/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/secure_boot.c.obj
[39/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_efuse_esp32.c.obj
[40/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_console.c.obj
[41/97] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32/esp_efuse_table.c.obj
[42/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_mem.c.obj
[43/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_qio_mode.c.obj
[44/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_random_esp32.c.obj
[45/97] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32/esp_efuse_fields.c.obj
[46/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_partitions.c.obj
[47/97] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_sleep.c.obj
[48/97] Building C object esp-idf/spi_flash/CMakeFiles/__idf_spi_flash.dir/esp32/spi_flash_rom_patch.c.obj
[49/97] Building ASM object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_longjmp.S.obj
[50/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_common_loader.c.obj
[51/97] Building C object esp-idf/xtensa/CMakeFiles/__idf_xtensa.dir/eri.c.obj
[52/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_encrypt.c.obj
[53/97] Building C object esp-idf/esp_system/CMakeFiles/__idf_esp_system.dir/esp_err.c.obj
[54/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_panic.c.obj
[55/97] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_tjpgd.c.obj
[56/97] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_fields.c.obj
[57/97] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_sys.c.obj
[58/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/bootloader_sha.c.obj
[59/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_flash_config_esp32.c.obj
[60/97] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_crc.c.obj
[61/97] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/compare_set.c.obj
[62/97] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log_noos.c.obj
[63/97] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/cpu_util.c.obj
[64/97] Building C object esp-idf/xtensa/CMakeFiles/__idf_xtensa.dir/xt_trax.c.obj
[65/97] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_api.c.obj
[66/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_common.c.obj
[67/97] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log_buffers.c.obj
[68/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_init.c.obj
[69/97] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32/esp_efuse_utility.c.obj
[70/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_flash.c.obj
[71/97] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32/rtc_clk.c.obj
[72/97] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_utility.c.obj
[73/97] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_uart.c.obj
[74/97] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_api_key_esp32.c.obj
[75/97] Building C object esp-idf/esp_common/CMakeFiles/__idf_esp_common.dir/src/esp_err_to_name.c.obj
[76/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp_image_format.c.obj
[77/97] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/bootloader_start.c.obj
[78/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/bootloader_esp32.c.obj
[79/97] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log.c.obj
[80/97] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_utility.c.obj
[81/97] Linking C static library esp-idf\log\liblog.a
[82/97] Linking C static library esp-idf\esp_rom\libesp_rom.a
[83/97] Building C object esp-idf/micro-ecc/CMakeFiles/__idf_micro-ecc.dir/uECC_verify_antifault.c.obj
[84/97] Linking C static library esp-idf\esp_common\libesp_common.a
[85/97] Linking C static library esp-idf\xtensa\libxtensa.a
[86/97] Linking C static library esp-idf\esp_hw_support\libesp_hw_support.a
[87/97] Linking C static library esp-idf\esp_system\libesp_system.a
[88/97] Linking C static library esp-idf\efuse\libefuse.a
[89/97] Linking C static library esp-idf\bootloader_support\libbootloader_support.a
[90/97] Linking C static library esp-idf\spi_flash\libspi_flash.a
[91/97] Linking C static library esp-idf\micro-ecc\libmicro-ecc.a
[92/97] Linking C static library esp-idf\soc\libsoc.a
[93/97] Linking C static library esp-idf\hal\libhal.a
[94/97] Linking C static library esp-idf\main\libmain.a
[95/97] Linking C executable bootloader.elf
[96/97] Generating binary image from built executable
esptool.py v3.3-dev
Creating esp32 image...
Merged 1 ELF section
Successfully created esp32 image.
Generated C:/pool/thecode/build/bootloader/bootloader.bin
[97/97] cmd.exe /C "cd /D C:\pool\thecode\build\bootloader\esp-idf\esptool_py && C:\Espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v4.4.1/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 C:/pool/thecode/build/bootloader/bootloader.bin"
Bootloader binary size 0x56a0 bytes. 0x1960 bytes (23%) free.
[1057/1058] Generating binary image from built executable
esptool.py v3.3-dev
Creating esp32 image...
Merged 25 ELF sections
Successfully created esp32 image.
Generated C:/pool/thecode/build/IntexSWG.bin
[1058/1058] cmd.exe /C "cd /D C:\pool\thecode\build\esp-id...le/partition-table.bin C:/pool/thecode/build/IntexSWG.bin"
IntexSWG.bin binary size 0x101010 bytes. Smallest app partition is 0x180000 bytes. 0x7eff0 bytes (33%) free.

Project build complete. To flash, run this command:
C:\Espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe ..\..\Espressif\frameworks\esp-idf-v4.4.1\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 detect --flash_freq 40m 0x1000 build\bootloader\bootloader.bin 0x8000 build\partition_table\partition-table.bin 0xd000 build\ota_data_initial.bin 0x20000 build\IntexSWG.bin
or run 'idf.py -p (PORT) flash'
However, upon doing thew suggested command:
C:\Espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe ..\..\Espressif\frameworks\esp-idf-v4.4.1\components\esptool_py\esptool\esptool.py -p 3 -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size detect --flash_freq 40m 0x1000 build\bootloader\bootloader.bin 0x8000 build\partition_table\partition-table.bin 0xd000 build\ota_data_initial.bin 0x20000 build\IntexSWG.bin
I am greeted with the following:

Code: Select all

C:\pool\thecode>C:\Espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe ..\..\Espressif\frameworks\esp-idf-v4.4.1\components\esptool_py\esptool\esptool.py -p 3 -b 460800 --before default_reset --after hard_reset --chip esp32  write_flash --flash_mode dio --flash_size detect --flash_freq 40m 0x1000 build\bootloader\bootloader.bin 0x8000 build\partition_table\partition-table.bin 0xd000 build\ota_data_initial.bin 0x20000 build\IntexSWG.bin
esptool.py v3.3-dev
Serial port 3
Traceback (most recent call last):
  File "..\..\Espressif\frameworks\esp-idf-v4.4.1\components\esptool_py\esptool\esptool.py", line 5347, in <module>
    _main()
  File "..\..\Espressif\frameworks\esp-idf-v4.4.1\components\esptool_py\esptool\esptool.py", line 5340, in _main
    main()
  File "..\..\Espressif\frameworks\esp-idf-v4.4.1\components\esptool_py\esptool\esptool.py", line 4647, in main
    esp = esp or get_default_connected_device(ser_list, port=args.port, connect_attempts=args.connect_attempts,
  File "..\..\Espressif\frameworks\esp-idf-v4.4.1\components\esptool_py\esptool\esptool.py", line 114, in get_default_connected_device
    _esp = chip_class(each_port, initial_baud, trace)
  File "..\..\Espressif\frameworks\esp-idf-v4.4.1\components\esptool_py\esptool\esptool.py", line 320, in __init__
    self._port = serial.serial_for_url(port)
  File "C:\Espressif\python_env\idf4.4_py3.8_env\lib\site-packages\serial\__init__.py", line 90, in serial_for_url
    instance.open()
  File "C:\Espressif\python_env\idf4.4_py3.8_env\lib\site-packages\serial\serialwin32.py", line 64, in open
    raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port '3': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2)
So I go ahead and run the second command it says to run:

Code: Select all

C:\pool\thecode>idf.py -p 3 flash
Executing action: flash
Running ninja in directory c:\pool\thecode\build
Executing "ninja flash"...
[1/5] cmd.exe /C "cd /D C:\pool\thecode\build\esp-idf\espt...le/partition-table.bin C:/pool/thecode/build/IntexSWG.bin"
IntexSWG.bin binary size 0x101010 bytes. Smallest app partition is 0x180000 bytes. 0x7eff0 bytes (33%) free.
[2/5] Performing build step for 'bootloader'
[1/1] cmd.exe /C "cd /D C:\pool\thecode\build\bootloader\esp-idf\esptool_py && C:\Espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v4.4.1/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 C:/pool/thecode/build/bootloader/bootloader.bin"
Bootloader binary size 0x56a0 bytes. 0x1960 bytes (23%) free.
[2/3] cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v4...sp-idf-v4.4.1/components/esptool_py/run_serial_tool.cmake"
esptool.py esp32 -p 3 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 4MB 0x1000 bootloader/bootloader.bin 0x20000 IntexSWG.bin 0x8000 partition_table/partition-table.bin 0xd000 ota_data_initial.bin
esptool.py v3.3-dev
Serial port 3
Traceback (most recent call last):
  File "C:/Espressif/frameworks/esp-idf-v4.4.1/components/esptool_py/esptool/esptool.py", line 5347, in <module>
    _main()
  File "C:/Espressif/frameworks/esp-idf-v4.4.1/components/esptool_py/esptool/esptool.py", line 5340, in _main
    main()
  File "C:/Espressif/frameworks/esp-idf-v4.4.1/components/esptool_py/esptool/esptool.py", line 4647, in main
    esp = esp or get_default_connected_device(ser_list, port=args.port, connect_attempts=args.connect_attempts,
  File "C:/Espressif/frameworks/esp-idf-v4.4.1/components/esptool_py/esptool/esptool.py", line 114, in get_default_connected_device
    _esp = chip_class(each_port, initial_baud, trace)
  File "C:/Espressif/frameworks/esp-idf-v4.4.1/components/esptool_py/esptool/esptool.py", line 320, in __init__
    self._port = serial.serial_for_url(port)
  File "C:\Espressif\python_env\idf4.4_py3.8_env\lib\site-packages\serial\__init__.py", line 90, in serial_for_url
    instance.open()
  File "C:\Espressif\python_env\idf4.4_py3.8_env\lib\site-packages\serial\serialwin32.py", line 64, in open
    raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port '3': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2)
CMake Error at run_serial_tool.cmake:56 (message):
  C:/Espressif/python_env/idf4.4_py3.8_env/Scripts/python.exe
  C:/Espressif/frameworks/esp-idf-v4.4.1/components/esptool_py/esptool/esptool.py
  --chip esp32 failed


FAILED: CMakeFiles/flash
cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v4.4.1\components\esptool_py && C:\Espressif\tools\cmake\3.20.3\bin\cmake.exe -D IDF_PATH="C:/Espressif/frameworks/esp-idf-v4.4.1" -D SERIAL_TOOL="C:/Espressif/python_env/idf4.4_py3.8_env/Scripts/python.exe C:/Espressif/frameworks/esp-idf-v4.4.1/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:/pool/thecode/build" -P C:/Espressif/frameworks/esp-idf-v4.4.1/components/esptool_py/run_serial_tool.cmake"
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
And I made sure I had the correct COM port and I do:
Image

So, what am I missing (or doing wrong more like it)

User avatar
ESP_Roland
Posts: 265
Joined: Tue Oct 09, 2018 10:28 am

Re: Unable to flash firmware via esptool.py

Postby ESP_Roland » Fri May 13, 2022 6:44 am

Hi,

you have to use "-p COM3" instead of "-p 3".

stealthrt
Posts: 6
Joined: Sat Aug 28, 2021 1:22 am

Re: Unable to flash firmware via esptool.py

Postby stealthrt » Fri May 13, 2022 12:06 pm

ESP_Roland wrote:
Fri May 13, 2022 6:44 am
Hi,

you have to use "-p COM3" instead of "-p 3".
Wow. That was the issue. Thanks for the help @ESP_Roland

Who is online

Users browsing this forum: Bing [Bot] and 116 guests