Upload failed on esp-wrover-kit (framework = arduino, espidf)

The build was successful by setting as follows, but the upload did not work. The pinmaps for esp-wrover-e(esp-wrover-kit) and esp32-wroom-32(esp32dev) all appear to be identical except for a few pins added to esp32-wroom-32. Which files should I check?

[env]
platform = espressif32
framework = arduino, espidf
build_flags =
    -D CONFIG_BLINK_GPIO=2
monitor_speed = 115200

[env:esp-wrover-kit]
board = esp-wrover-kit
Processing esp-wrover-kit (board: esp-wrover-kit; platform: espressif32; framework: arduino, espidf)
--------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp-wrover-kit.html
PLATFORM: Espressif 32 (5.2.0) > Espressif ESP-WROVER-KIT
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (ftdi) On-board (ftdi) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, 
olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-arduinoespressif32 @ 3.20005.220925 (2.0.5)
 - framework-espidf @ 3.40402.0 (4.4.2)
 - tool-cmake @ 3.16.4
 - tool-esptoolpy @ 1.40201.0 (4.2.1)
 - tool-idf @ 1.0.1
 - tool-mconf @ 1.4060000.20190628 (406.0.0)
 - tool-mkfatfs @ 2.0.1
 - tool-mklittlefs @ 1.203.210628 (2.3)
 - tool-mkspiffs @ 2.230.0 (2.30)
 - tool-ninja @ 1.9.0
 - toolchain-esp32ulp @ 1.22851.191205 (2.28.51)
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
Warning! Arduino framework as an ESP-IDF component doesn't handle the `variant` field! The default `esp32` variant will be used.
Reading CMake configuration...
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Retrieving maximum program size .pio\build\esp-wrover-kit\firmware.elf
Checking size .pio\build\esp-wrover-kit\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   3.6% (used 11956 bytes from 327680 bytes)
Flash: [==        ]  21.6% (used 226913 bytes from 1048576 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, esp-bridge, esp-prog, espota, esptool, ftdi, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Auto-detected: COM7
Uploading .pio\build\esp-wrover-kit\firmware.bin
esptool.py v4.2.1
Serial port COM7
Connecting....
Chip is ESP32-D0WD-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 94:e6:86:0f:9c:9c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
WARNING: Failed to communicate with the flash chip, read/write operations will fail. Try checking the chip connections or removing any other hardware connected to IOs.
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00007fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x00010000 to 0x00047fff...
Compressed 25392 bytes to 15875...

A fatal error occurred: Packet content transfer stopped (received 8 bytes)
*** [upload] Error 2

Well, let’s do a sanity check then. Open a CLI and execute

pio system info

to the the python executable path for your system

Python Executable           C:\Users\Max Gerhardt\.platformio\penv\Scripts\python.exe

then use that path and call into esptool.py

"C:\Users\Max Gerhardt\.platformio\penv\Scripts\python.exe" "C:\Users\<user>\.platformio\packages\tool-esptoolpy\esptool.py" flash_id

it’s displayed as below.

PS C:\Users\JJS> C:\Users\JJS\.platformio\penv\Scripts\python.exe C:\Users\JJS\.platformio\packages\tool-esptoolpy\esptool.py flash_id    
esptool.py v4.2.1
Found 1 serial ports
Serial port COM7
Connecting.....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting......
Detecting chip type... ESP32
Chip is ESP32-D0WD-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 94:e6:86:0f:9c:9c
Uploading stub...
Running stub...
Stub running...
Manufacturer: 5e
Device: 4016
Detected flash size: 4MB
Hard resetting via RTS pin...

If the above message is displayed, the upload proceeds successfully.

Processing esp-wrover-kit (board: esp-wrover-kit; platform: espressif32; framework: arduino, espidf)
--------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp-wrover-kit.html
PLATFORM: Espressif 32 (5.2.0) > Espressif ESP-WROVER-KIT
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (ftdi) On-board (ftdi) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, 
olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-arduinoespressif32 @ 3.20005.220925 (2.0.5)
 - framework-espidf @ 3.40402.0 (4.4.2)
 - tool-cmake @ 3.16.4
 - tool-esptoolpy @ 1.40201.0 (4.2.1)
 - tool-idf @ 1.0.1
 - tool-mconf @ 1.4060000.20190628 (406.0.0)
 - tool-mkfatfs @ 2.0.1
 - tool-mklittlefs @ 1.203.210628 (2.3)
 - tool-mkspiffs @ 2.230.0 (2.30)
 - tool-ninja @ 1.9.0
 - toolchain-esp32ulp @ 1.22851.191205 (2.28.51)
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
Warning! Arduino framework as an ESP-IDF component doesn't handle the `variant` field! The default `esp32` variant will be used.
Reading CMake configuration...
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Retrieving maximum program size .pio\build\esp-wrover-kit\firmware.elf
Checking size .pio\build\esp-wrover-kit\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   3.6% (used 11956 bytes from 327680 bytes)
Flash: [==        ]  21.6% (used 226913 bytes from 1048576 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, esp-bridge, esp-prog, espota, esptool, ftdi, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Auto-detected: COM7
Uploading .pio\build\esp-wrover-kit\firmware.bin
esptool.py v4.2.1
Serial port COM7
Connecting.....
Chip is ESP32-D0WD-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 94:e6:86:0f:9c:9c
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 0x00008000 to 0x00008fff...
Flash will be erased from 0x00010000 to 0x00047fff...
Compressed 25392 bytes to 15875...
Writing at 0x00001000... (100 %)
Wrote 25392 bytes (15875 compressed) at 0x00001000 in 0.8 seconds (effective 253.8 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 103...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.0 seconds (effective 513.4 kbit/s)...
Hash of data verified.
Compressed 227296 bytes to 122998...
Writing at 0x00010000... (12 %)
Writing at 0x0001cf61... (25 %)
Writing at 0x00022de7... (37 %)
Writing at 0x00028a62... (50 %)
Writing at 0x0002e28a... (62 %)
Writing at 0x0003691e... (75 %)
Writing at 0x0003ea45... (87 %)
Writing at 0x000446c5... (100 %)
Wrote 227296 bytes (122998 compressed) at 0x00010000 in 2.9 seconds (effective 624.1 kbit/s)...
Hash of data verified.

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

After building and uploading, if it does not work, when I run flash_id, the communication failure is displayed as shown below. It seems to be a communication problem.

PS C:\Users\JJS\Documents\PlatformIO\Projects\221004-174849-espidf-arduino-blink> C:\Users\JJS\.platformio\penv\Scripts\python.exe C:\Users\JJS\.platformio\packages\tool-esptoolpy\esptool.py flash_id
esptool.py v4.2.1
Found 1 serial ports
Serial port COM7
Connecting......
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting......
Detecting chip type... ESP32
Chip is ESP32-D0WD-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 94:e6:86:0f:9c:9c
Uploading stub...
Running stub...
Stub running...
WARNING: Failed to communicate with the flash chip, read/write operations will fail. Try checking the chip connections or removing any other hardware connected to IOs.
Manufacturer: ff
Device: ffff
Detected flash size: Unknown
Hard resetting via RTS pin...

Failed to communicate with the flash chip, read/write operations will fail (ESPTOOL-373) · Issue #705 · espressif/esptool · GitHub suspects hardware failure.

Does this failure occur also after a simple Arduino-only blink sketch is successfully uploaded? platform-espressif32/examples/arduino-blink at develop · platformio/platform-espressif32 · GitHub