• tried to flash Espruino on a ESP8266 (NodeMCU, doit.am version) and got:

    Chip is ESP8266EX
    Uploading stub...
    A fatal error occurred: Failed to write to target RAM (result was 0107)
    • esptool v2.2-dev
    • tested with 5V, 3.3V (from breadboard power supply mb102) and USB power (from laptop)
    • fails on any esptool command (erase_flash, write_flash, chip_id, ...)
    • correct data cable (some power only cables made me loose some time)
    • same problem on lower baudrates (eg 9600)

    bootloader terminal ( 74880,8,N,1 ):

     ets Jan  8 2013,rst cause:2, boot mode:(3,7)
  • I got the same problem:

    root@raspberry:/home/pi/espurna# stty</dev/serial0
    speed 38400 baud; line = 0;
    min = 1; time = 0;
    -brkint -icrnl -imaxbel
    -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke

    root@raspberry:/home/pi/espurna# time ./esptool.py -p /dev/serial0 write_flash 0x1000 espurna-1.13.2-itead-sonoff-th.bin
    Serial port /dev/serial0
    Detecting chip type... ESP8266
    Chip is ESP8266EX
    Features: WiFi
    MAC: dc:4f:22:41:9c:58
    Uploading stub...

    A fatal error occurred: Failed to write to target RAM (result was 0107)

    real 0m2,423s
    user 0m0,412s
    sys 0m0,057s

    I am using Raspberry Pi GPIO TXD0, RXD0 and GND. Sonoff is powered by its own power supply (240VAC, I am a professional electrician).

    Any quesses what can cause this ?

  • I changed my programming device to cheap clone FT232BL based USB to UART device and succeeded to erase and write a new image. These settings works for me:
    root@raspberry:/home/pi/espurna# stty</dev/ttyUSB0
    speed 38400 baud; line = 0;
    min = 0; time = 0;
    -brkint -icrnl -imaxbel
    -opost -onlcr
    -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke

    I am satisfied! :-)

  • @user94443 This command line you're using:

    esptool.py -p /dev/serial0 write_flash 0x1000 espurna-1.13.2-itead-sonoff-th.bin

    Is that Espruino? Or something else. It looks like "Espruna", which is not related to this project at all. The only thing I can recommend is you get another ESP8266 and see if you can replicate the problem. If you can't, then suspicion falls on the original board.

  • Oh I see you solved your problem! Congrats. :)

  • No wifi AP after first successfull (Hash of data verified.) flash installation and boot.

    I did erase again and flashed again with -fm dout -option No led light, no Wifi access point (tried double click and long time button press, no access point after them).

    It seems to me that espurna-1.13.2-itead-sonoff-th.bin is incompatible with my new TH16 device. PCB text is: "Ver 2.1 2017-6-8"

  • Yeah I haven't used the TH16 before. Which ESP8266 board are you using? Was it working before?

  • Anyways as I said, this is the Espruino forum, for the javascript interpreter for microcontrollers. You're using Espruna, so I suggest you go to the Espruna forum for more help. They may know whats actually going on. Good luck!

  • Thank You for Your good answer and advices, Hungryforcodes!

    Here in Finland we have (AFAIK) only one word which starts as "Esp" -string, it is "Espanja" which means Spain. So, my brains are not used to handle words which starts with "Esp" -string! That is the reason why I used my KahnemanĀ“s system one when I saw google search result page , where was all these strings: "ESP2866", "Esp*" -project and "Failed to write to target RAM (result was 0107)". So I thought very quickly that "This is the right search result to click!"

    Espruino seems to be very interesting project too, I should find time to study Espruino project too!

    Sorry for inconvenience! :-)

  • Yeah, I was more concerned about you getting a solution to your problem. That said, yes Espruino is great, and you should try it. In addition there are some great Espruino devices like the Pixljs and the Puckjs, which are fun. Check them out from the home page.

  • I have faced the similar issue quite a number of times. I am looking for a similar solution. One of my facebook friends has suggested me something familiar to it. But i am looking for accurate solution

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

bricked ESP8266 ? any command errors with "Failed to write to target RAM (result was 0107)"

Posted by Avatar for tbd @tbd