[Bug 282814] comms/py-esptool: 4.8.1: A fatal error occurred: Failed to write to target Flash after seq 0 (result was 01050000: Requested resource not found)
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 282814] comms/py-esptool: 4.8.1: A fatal error occurred: Failed to write to target Flash after seq 0 (result was 01050000: Requested resource not found)"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 282814] comms/py-esptool: 4.8.1: A fatal error occurred: Failed to write to target Flash after seq 0 (result was 01050000: Requested resource not found)"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 17 Nov 2024 16:04:36 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282814
Bug ID: 282814
Summary: comms/py-esptool: 4.8.1: A fatal error occurred:
Failed to write to target Flash after seq 0 (result
was 01050000: Requested resource not found)
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Many People
Priority: ---
Component: Individual Port(s)
Assignee: loader@FreeBSD.org
Reporter: ohartmann@walstatt.org
Assignee: loader@FreeBSD.org
Flags: maintainer-feedback?(loader@FreeBSD.org)
Host is recent CURRENT (FreeBSD 15.0-CURRENT #26 main-n273671-f334c0b8b3cb: Sat
Nov 16 20:19:46 CET 2024 amd64) and also tried latest 14.1-RELEASE-p6 and
14-STABLE.
Problem: trying to flash a ESP32-S3 WROOM-1 N16R8 with a binary image of any
kind fails with with the error
> A fatal error occurred: Failed to write to target Flash after seq 0 (result was 01050000: Requested resource not found)
The ESP32-S3 development kit device is plugged in with USB-C cable via its
right-hand USB designated USB-C port (left hand is designated UART and not
working that way). FreeBSD recognizes the device then as (the device is
supposed to have a CP2102 UART-USB-bridge):
[... dmesg ...]
ugen0.4: <vendor 0x1a86 USB Single Serial> at usbus0
umodem0 on uhub3
umodem0: <vendor 0x1a86 USB Single Serial, class 2/0, rev 1.10/4.45, addr 15>
on usbus0
umodem0: data interface 1, has no CM over data, has no break
[...]
#: sudo usbconfig -d ugen0.4 dump_device_desc
ugen0.4: <vendor 0x1a86 USB Single Serial> at usbus0, cfg=0 md=HOST spd=FULL
(12Mbps) pwr=ON (138mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0110
bDeviceClass = 0x0002 <Communication device>
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0008
idVendor = 0x1a86
idProduct = 0x55d3
bcdDevice = 0x0445
iManufacturer = 0x0000 <no string>
iProduct = 0x0002 <USB Single Serial>
iSerialNumber = 0x0003 <5896038723>
bNumConfigurations = 0x0001
[...]
When the device is plugged to the connector designated as USB, comms/py-esptool
fails to query the device when the option "--no-stub" is ommited:
esptool.py --port /dev/cuaU1 --chip esp32-s3 --baud 460800 get_security_info
esptool.py v4.8.1
Serial port /dev/cuaU1
Connecting.........
Chip is ESP32-S3 (QFN56) (revision v0.2)
Features: WiFi, BLE, Embedded PSRAM 8MB (AP_3v3)
Crystal is 40MHz
MAC: XX:XX:XX:XX:XX:XX
Uploading stub...
A fatal error occurred: Failed to write to target RAM (result was 01070000:
Operation timed out)
[...]
but if this option is provided, the result seems good:
#: esptool.py --port /dev/cuaU1 --chip esp32-s3 --baud 460800 --no-stub
get_security_info
esptool.py v4.8.1
Serial port /dev/cuaU1
Connecting.........
Chip is ESP32-S3 (QFN56) (revision v0.2)
Features: WiFi, BLE, Embedded PSRAM 8MB (AP_3v3)
Crystal is 40MHz
MAC: XX:XX:XX:XX:XX:XX
Changing baud rate to 460800
Changed.
Enabling default SPI flash mode...
Security Information:
=====================
Flags: 0x00000000 (0b0)
Key Purposes: (0, 0, 0, 0, 0, 0, 12)
BLOCK_KEY0 - USER/EMPTY
BLOCK_KEY1 - USER/EMPTY
BLOCK_KEY2 - USER/EMPTY
BLOCK_KEY3 - USER/EMPTY
BLOCK_KEY4 - USER/EMPTY
BLOCK_KEY5 - USER/EMPTY
Chip ID: 9
API Version: 0
Secure Boot: Disabled
Flash Encryption: Disabled
SPI Boot Crypt Count (SPI_BOOT_CRYPT_CNT): 0x0
Hard resetting via RTS pin...
[...]
I tried different FreeBSD versions on different hardware, I tried three
different ESP32-S3, two of them came from the same distributor, another on from
an unknown Chinese source. I also tried different USB Hubs, different USB
cables and also direct connecting the cable to the computer (avoiding a HUB).
On FreeBSD it is always the same result, errors see above.
I tried also with Fedora Linux 41 on the very same hardware I tried with
14-STABLE. On Linux I can ommit "--no-stub" in all scenarios to get successfuly
results and I'm also able to flash the very same binary images FreeBSD's
comms/py-esptool rejects to flash.
Info on comms/py-esptool:
#: pkg info comms/py-esptool
py311-esptool-4.8.1
Name : py311-esptool
Version : 4.8.1
Installed on : Wed Oct 16 07:10:19 2024 CEST
Origin : comms/py-esptool
Architecture : FreeBSD:15:*
Prefix : /usr/local
Categories : python comms
Licenses : GPLv2
Maintainer : loader@FreeBSD.org
WWW : https://github.com/espressif/esptool
Comment : Utility to communicate with Espressif ESP8266 & ESP32 chips
Annotations :
flavor : py311
Flat size : 8.70MiB
Description :
A Python-based, open source, platform independent, utility to communicate
with the ROM bootloader in Espressif ESP8266 & ESP32 chips.
--
You are receiving this mail because:
You are the assignee for the bug.