nodemcu / nodemcu-devkit-v1.0

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

File writes fail all the time

rjpcomputing opened this issue · comments


I can not save files to the file system on my board. I have tried the last 4 firmware releases and it doesn't change the problem. It seems to be related to the amica boards. I have the revision before this and it works 100% of the time."script1.lua","w+")
file.writeline([[print( "Hello World" )]])


stdin:1: open a file first

I am opening the file on the first line.

Please help

Hello, you possible use an old flashtool, please update.

  1. Please use latest and with DIO option to flash firmware.
  2. Please use latest NodeMCU flasher with default option (must click 'restore to default' in advanced tab)
  3. Please use latest Espressif's flash tool(without auto download support)
    If always have problem, please use latest flash download tool from espressif. Please use DIO mode and 32M flash size option, and flash latest firmware to 0x00000. Before flashing firmware, please hold FLASH button, and press RST button once. When our firmware download tool released, it will flash firmware automatically and needn't press any button.


I have been using downloaded from the master branch (e96336f6561109e67afe03c0695d1e5b0de15da6) and it did not work.

Here is the commandline I am using:

./ --port /dev/ttyUSB0 write_flash 0x00000 <firmware> -fs 32m -fm dio -ff 40m

I am using the Amica black board on Linux.


I have the same problem with @rjpcomputing , also using the Amica black board.
I tried all the methods. Only the tool on work fine.
But I need on Linux

@Air000 how to use esptool from ?
I run:

cd flash_download_tool_python2.6-2.7_wxpython3.0_release_v2.0_SOURCE
sudo python --port /dev/ttyUSB0 --baud 9600 write_flash 0x00000 ~/Downloads/nodemcu_latest.bin --flash_size 32m --flash_mode dio --flash_freq 40m

But there is no command output, does nothing


my is download from
and I test the esptool from, also output nothing.

But now I use the wine+flash_download_tool.exe, which works fine, figure out my "File writes fail all the time" problem.

@vowstar Why is this closed? The bug is not fixed. Should this be reported on a different tracker?

I don't think that Wine + flash_download_tool.exe is a good enough solution when a feature of NodeMCU is cross-platform.


I think esptool might have got a fix. I have yet to test it, but the commit looks like it should work.

Has anyone tried esptool after July 8th?

Just to let other know I was able to use the latest esptool (>July 8th) to flash the board.

ezoic increase your site revenue