In case helpful to others, below are the commands and command responses related to my using esptool to download firmware from a device, erase the device flash and reload the firmware. I did all of this using an FTDI USB/Serial interface connected to the RX and TX pins on the board. A four wire connection was used (3.3V, GND, Rx, Tx). I had to place the device in firmware upload mode before each command. I did this by holding down the BOOT button, pressing the RESET button and then releasing the BOOT button. Below are my notes.
Example use of esptool to read/write flash from Sparkfun Thing Plus board (esp32c6-based)
***READ FLASH ID***
framewk 123= esptool -p /dev/ttyUSB0 -b 115200 --chip esp32c6 flash_id
esptool.py v4.9.1
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32-C6 (QFN40) (revision v0.0)
Features: WiFi 6, BT 5, IEEE802.15.4
Crystal is 40MHz
MAC: 40:4c:ca:ff:fe:4c:36:b0
BASE MAC: 40:4c:ca:4c:36:b0
MAC_EXT: ff:fe
Uploading stub...
Running stub...
Stub running...
Manufacturer: c8
Device: 4018
Detected flash size: 16MB
Hard resetting via RTS pin...
***READ FLASH CONTENTS***
framewk 124= esptool -p /dev/ttyUSB0 -b 460800 --chip esp32c6 read_flash 0 ALL sparkfunThingPlus9Dof.bin
esptool.py v4.9.1
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32-C6 (QFN40) (revision v0.0)
Features: WiFi 6, BT 5, IEEE802.15.4
Crystal is 40MHz
MAC: 40:4c:ca:ff:fe:4c:36:b0
BASE MAC: 40:4c:ca:4c:36:b0
MAC_EXT: ff:fe
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Detected flash size: 16MB
16777216 (100 %)
16777216 (100 %)
Read 16777216 bytes at 0x00000000 in 488.5 seconds (274.7 kbit/s)...
Hard resetting via RTS pin...
***EXAMINE UPLOADED FLASH IMAGE
framewk 125= esptool image_info sparkfunThingPlus9Dof.bin
esptool.py v4.9.1
File size: 16777216 (bytes)
Detected image type: ESP32-C6
Image version: 1
Entry point: 4086b910
3 segments
Segment 1: len 0x012e0 load 0x40875730 file_offs 0x00000018 [DRAM,BYTE_ACCESSIBLE,IRAM]
Segment 2: len 0x00dc8 load 0x4086b910 file_offs 0x00001300 [DRAM,BYTE_ACCESSIBLE,IRAM]
Segment 3: len 0x03180 load 0x4086e610 file_offs 0x000020d0 [DRAM,BYTE_ACCESSIBLE,IRAM]
Checksum: 80 (valid)
Validation Hash: 7ec453954346f7118218841656fb098c655e5f7a37949853d57c91edde496e31 (valid)
***ERASE FLASH***
framewk 126= esptool -p /dev/ttyUSB0 -b 460800 --chip esp32c6 erase_flash
esptool.py v4.9.1
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32-C6 (QFN40) (revision v0.0)
Features: WiFi 6, BT 5, IEEE802.15.4
Crystal is 40MHz
MAC: 40:4c:ca:ff:fe:4c:36:b0
BASE MAC: 40:4c:ca:4c:36:b0
MAC_EXT: ff:fe
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Erasing flash (this may take a while)...
Chip erase completed successfully in 3.1 seconds.
Hard resetting via RTS pin...
***WRITE IMAGE BACK TO FLASH***
framewk 127= esptool -p /dev/ttyUSB0 -b 460800 --chip esp32c6 write_flash 0x0 sparkfunThingPlus9Dof.bin
esptool.py v4.9.1
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32-C6 (QFN40) (revision v0.0)
Features: WiFi 6, BT 5, IEEE802.15.4
Crystal is 40MHz
MAC: 40:4c:ca:ff:fe:4c:36:b0
BASE MAC: 40:4c:ca:4c:36:b0
MAC_EXT: ff:fe
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00ffffff...
Compressed 16777216 bytes to 637811...
Wrote 16777216 bytes (637811 compressed) at 0x00000000 in 59.7 seconds (effective 2249.9 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...