-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A fatal error occurred: Failed to write to target RAM (result was 0107) (ESPTOOL-95) #280
Comments
Hi @emeyedeejay, Thanks for reporting this. The device is suddenly failing while uploading the "stub loader" code into its IRAM. Usually this suggests a power supply problem or a signal integrity problem with the USB/serial connections. Check all power and signal/ground connections to the device. You could try setting a lower baud rate (for example Angus |
Many thanks for the feedback/input. I tried another actual FTDI USB->serial cable and was successful so it looks like it was my Chinese "ftdi" and USB-> serial components that are causing the issue here. It; odd though, they have never given me any issues with anything else I have ever used them for (Arduino based activity). I'll try again with these devices to confirm them as the problem but it looks like you can close this issue. If there is any additional info you want form me, please let me know... Best, |
Thanks for the update. Feel free to reopen if you think there's something esptool should be doing differently here. |
Hello, I've the same problem than emeyedeejay. I'm trying to program the ESP32 through a STM32. I convert the USB frames to USART (and USART to USB). The information sent by the ESP32 are OK until the Uploading stub. Do you know what is the problem ? Thank you Flashing binaries to serial port COM14 (app at offset 0x10000 )... A fatal error occurred: Failed to write to target RAM (result was 01050000) |
FWIW: If using esptool on a Raspberry Pi using the GPIO serial interface at This produced some different errors throughout 50 attempts, amongst them, the A fatal error occurred: Failed to write to target RAM (result was 0107), or a waiting for header timeout. |
done with turn another plug usb |
If you're flashing e.g. a sonoff make sure the "OTA" jumper is on/pin is bridged. Without it I think you get 0107 because the flash is write protected. |
Boa Tarde. |
I am using another LilyGo product but the same problem as azrin1972. |
This happens to me acactly too, tried a lot of things. Drivers are up to date. It's a ESP32-WROM with 30 Pins and USB/UART CH9102x. ``/Users/Felix/Library/Arduino15/packages/esp32/tools/esptool_py/3.0.0/esptool --chip esp32 --port /dev/cu.usbmodem52870049811 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0xe000 /Users/Felix/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/tools/partitions/boot_app0.bin 0x1000 /Users/Felix/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/tools/sdk/bin/bootloader_qio_40m.bin 0x10000 /var/folders/br/k52zl5l16bgg65qt6cqzmm9r0000gn/T/arduino_build_58002/sketch_jun06c.ino.bin 0x8000 /var/folders/br/k52zl5l16bgg65qt6cqzmm9r0000gn/T/arduino_build_58002/sketch_jun06c.ino.partitions.bin A fatal error occurred: Failed to write to target RAM (result was 01070000) |
I'm facing the same issue with a few ESP32 DEVKITV1 I got from aliexpress:
Any hint to resolve this? |
I've contacted LilyGo and it seems the FTDI chip they are using is not compatible with Mac OS Big Sur UART Driver. My solution right now is yo use windows under Virtual box and flat from Windows. Hope this helps |
@azrin1972 cannot even get it to work under a virtual machine with windows 10... Any update on how to make it work on MacOS Big Sur? (M1 Mac) |
At first I thought the chip is broken. But yes, I am running on a M1 too and get the same error. Did anyone contact LilyGo already? |
For me this error occurs on an older Intel machine running MacOS Big Sur. I didn't try flashing with virtual machine and windows 10 yet, will do in a few days though and report. |
@fhb I used Parallels Software on my M1 running Windows 10. I could upload the image without any issues. |
I might got same issue here, Intel CPU with MacOS 11.4 . esptool.py v3.0-dev A fatal error occurred: Failed to write to target RAM (result was 01070000) |
I had the same issue with a LilyGO device with CH9102 UART chip. The driver in this github resolved the issue for me completely on Mac OS X 11.5.2 Big Sur: Xinyuan-LilyGO/LilyGo-T-Call-SIM800#139 But be warned: you have to install a driver and trust it in the security settings. All driver installation instructions are in Chinese 😱 |
I think it must be something wrong with the big Sur that every thing running well at windows on same pc with another disk. |
Thanks! it worked on Big Sur 11.6 too |
I solved this problem changing the ESP01 USB adapter esptool.FatalError: Failed to write to target RAM (result was 0107) the problem was in the USB-SERIAL converter |
download this new driver is worked for me !!! http://www.wch.cn/downloads/CH34XSER_MAC_ZIP.html and you need select the new port |
English version: |
This issue keeps coming - I have it on the ESP32C3 board for the serial monitor USB-C, I am glad I have the second straight from chip USC-C that does the job. For me, it means I should plug both USB-C when writing firmware. Why do they use that CH9102 UART chip in the first place? I used to buy boards with CP210x and never had a single problem. |
If you're using platformio I would recommend the following setting in your platformio.ini file: |
'A fatal error occurred: Failed to write to target RAM (result was 01070000: Operation timed out)' This problem was solved for me on an old Macbook Air running macOS 10.13.6 connected to an 'M5Stack Tough' with ESP32-D0WDQ6-V3 by updating to the latest driver for the CH9102 USB/UART chip that the 'Tough' uses. Fully documented driver downloads for various commonly used WCH chips are available here https://wch-ic.com/products/categories/46.html?pid=1#data |
I had a similar problem on Mac with This board has two usb-c ports. And problem was solved by connecting to the second port |
Same issue for this ESP32-S3 N16R8 and after read and install this on my MacBook Pro M1 https://www.wch.cn/downloads/CH34XSER_MAC_ZIP.html start working. Thanks to @raulclaudino for shared the link and info |
I also had this issue. I'm on an Apple M1 Max, Sonoma 14.5 (23F79) and was getting this error when uploading to my ESP32-C6-DEV-KIT-N8. esptool.py v4.6
Serial port /dev/cu.usbmodem57350148971
Connecting....
Chip is ESP32-C6 (QFN40) (revision v0.0)
Features: WiFi 6, BT 5, IEEE802.15.4
Crystal is 40MHz
MAC: 40:4c:ca:4f:90:b0:ff:fe
Uploading stub...
A fatal error occurred: Failed to write to target RAM (result was 01070000: Operation timed out)
Failed uploading: uploading error: exit status 2 However, I hadn't noticed that there were 2 new
Choosing the second entry in Arduino IDE solved my issue. |
followed the same using second usb-c port solved the issue |
(Please delete any lines which don't apply.)
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
Full esptool.py command line as run: python esptool.py --port COM3 read_flash 0x00000 0x100000 image1M.bin
Full output from esptool.py (please copy and paste all lines of output) D:\Downloads\esptool-2.3.1>python esptool.py --port COM3 read_flash 0x00000 0x100000 image1M.bin
esptool.py v2.3.1
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
Uploading stub...
A fatal error occurred: Failed to write to target RAM (result was 0107)
What is the expected behaviour? Backup of current firmware
Do you have any other information from investigating this? Tried with 2 different USB -> Serial devices. FTDI232 and PROLIFIC USB-to-serail adapter
Is there any other information you can think of which will help us reproduce this problem?
The text was updated successfully, but these errors were encountered: