Always the same problem of file upload flash !!!!



  • There is a solution to all this !!!
    I have made various posts, tried usb2.0 / 3.0 ...
    When I upload the serial firmware, this always happens to me.

    Reading file status
    Failed to read project status, uploading all files
    Creating dir lib
    Creating dir www
    Creating dir www/bootstrap
    Creating dir www/bootstrap/css
    Creating dir www/bootstrap/fonts
    Creating dir www/bootstrap/js
    Creating dir www/js
    [1/19] Writing file SI7006A20.py
    [2/19] Writing file boot.py
    [3/19] Writing file hal.py
    [4/19] Writing file lib/mqttserver.pub.pem
    [5/19] Writing file main.py
    [6/19] Writing file mqtt.py
    [7/19] Writing file simple.py
    [8/19] Writing file umqtt.py
    [9/19] Writing file www/bootstrap/css/bootstrap.min.css
    Failed to write file, trying again...
    Failed to write file, trying again...
    Filecheck failed
    [10/19] Writing file www/bootstrap/js/bootstrap.min.js
    Failed to write file, trying again...
    Failed to write file, trying again...
    Failed to write file: inco
    [11/19] Writing file www/index.html
    Failed to write file, trying again...
    Failed to write file, trying again...
    Failed to write file: incorrec
    [12/19] Writing file www/js/angular.min.js
    Failed to write file, trying again...
    Failed to write file, trying again...
    Failed to write file: incor
    [13/19] Writing file www/js/app.js
    Failed to write file, trying again...
    Failed to write file, trying again...
    Failed to write file: no module named 'xConfigureFile
    [14/19] Writing file www/js/jquery-1.11.1.js
    Failed to write file, trying again...
    Failed to write file, trying again...
    Upload failed.: Failed to write file: no module named 'xConfigureFile Please reboot your device manually.
    Traceback (most recent call last):
      File "main.py", line 4, in <module>
    ImportError: no module named 'xConfigureFile'
    Pycom MicroPython 1.18.1.r1 [v1.8.6-849-b0520f1] on 2018-08-29; LoPy with ESP32
    Type "help()" for more information. 
    

    I thought it was a power problem, but nothing ..
    L01/8mb flash, various firmware version

    Help me!!!!
    regards
    James



  • Hi, I tried via ftp and it works perfectly.
    Regards



  • @dan Hi, the files are not big, besides the errors the upload gives them in some pycom libraries. I have tried ubuntu 18 and 16, Atom and pymakr 1.4.2 and the last 1.4.4.

    Anyway the program works correctly even with errors in the upload, but it is annoying.

    I will try via ftp.

    Regards,


  • administrators

    @nespressif for me, I had the same issue with the bootstrap css as the original post, but when I decreased its size, I was able to upload it. If you upload larger files, FTP seems to work better.



  • @dan Hi, I'm uploading my project: boot.py, main.py and the lib directory with my own libraries and the pysense libraries. I always get an error when uploading the pycoproc.py library, but after the program works.

    I have uninstalled and reinstalled Pymakr in Atom and now I show the size of each file during uploading.

    I'll try via FTP and also from another computer with ubuntu 16.04 and I'll tell you.


  • administrators

    @nespressif Hi, what files are you trying to upload? Also, could you try using FTP?



  • Hello, everybody,
    I have the same problem, with pysense + sipy, updated to the last stable firmware, I have uninstalled and reinstalled pymakr in Atom and I always fail the flash of the same file of the project (pycoproc).

    In my case it seems that these problems have come after upgrading to Ubuntu 18.04 lts.

    I will try to flash with another computer that I have with ubuntu 16.04 and the latest version of pymakr.

    Would I also like to know why this happens?

    Regards



  • @robert-hh fine...



  • @cmisztur Put aside pymakr and give a clean ftp client a try, to sort out the problem. If possible, use linux or mac command line ftp. Check beforehand, that teher is sufficient free space in the file system of your device. You can do so with import uos;uos.getfree("/flash")



  • So what is the solution?
    Seems like changes to my files are actually uploaded, but still end up with the error message.

    Uploading project (main folder)...
    Safe booting device... (see settings for more info)
    Reading file status
    [1/1] Writing file lib/sx1509.py
    Failed to write file, trying again...
    Failed to write file, trying again...
    Filecheck failed
    Upload done, resetting board...
    


  • @robert-hh,

    It is not always possible to transmit files via FTP, so if there were real transfer problems in the serial mode it would be a serious problem, and more serious than any other answer after the umpteenth post, at least in understanding what could be.

    regards
    James



  • @james said in Always the same problem of file upload flash !!!!:

    Another thought is that they are css and js files and that some character in the file in serial transfer can give some problems, even if it should be a binary trafficking.

    That's what i would suspect. Serial transfer might not be transparent. That's one of the reasons why I use ftp. It is reliable and well tested over decades.



  • @robert-hh ,
    Let's talk about the "L01", I do not know why this thing but until some time ago even those of the pycom updater saw the whole flash.
    However, the problem of uploading files is driving me crazy, someone hypothesized some problems with the FTDI chip, but I think only with regard to the flash of micropython, also because the other files are uploaded safely.

    Another thought is that they are css and js files and that some character in the file in serial transfer can give some problems, even if it should be a binary trafficking.

    regards
    James



  • @james OK. I just tested a image loaded with the Pycom updater, and that indeed uses the full flash. Only the images generated from the github repository seem to be generated with a smaller file system. I'm curious why.



  • @robert-hh , @dan
    in ftp is ok.
    file is correctly

    regards



  • @robert-hh , @dan

    with the version

    Type "help()" for more information.
    >>> import os
    >>> os.uname()
    (sysname='LoPy', nodename='LoPy', release='1.17.3.b1', version='v1.8.6-849-83e2f7f on 2018-03-19', machine='LoPy with ESP32', lorawan='1.0.2')
    >>> os.listdir()
    ['main.py', 'sys', 'lib', 'cert', 'boot.py', 'www', 'SI7006A20.py', 'project.pymakr', 'hal.py', 'mqtt.py', 'simple.py', 'umqtt.py', 'xApp.py', 'xConfigureFile.py', 'xHTTPConfigure.py', 'xWebServer.py', 'xWebSocket.py']
    >>> os.chdir('www')
    >>> os.listdir()
    ['bootstrap', 'js', 'index.html']
    >>> os.chdir('bootstrap')
    >>> os.listdir()
    ['css', 'fonts', 'js']
    >>> os.chdir('css')
    >>> os.listdir()
    ['bootstrap.min.css']
    >>> 
    

    the file is actually there but it's failing, it always reloads with an error,
    could it be a problem related to the ram ????

    with the last error error error



  • @robert-hh
    It seems strange,
    when I started with this project I took the OEM L01 and I was assured that the flash was handled throughout

    >>> os.getfree('/flash')
    3680
    

    also because there was a moment in which I managed to do it.
    the total firmware including the small web and 804kb

    @dan I have not tried in ftp, I could try even if I need to transfer files via serial; I use the wifi both as an ap client and as ap for the configuration.

    I need to understand the problem, I made a post even a while ago but nothing.

    excuse for my easy english
    regards
    James



  • @james It could problem of the accumulated file sizes. The flash file system has a size of 508k. The total flash size used is 3680k for all devices. The extra flash space on 8 MByte devices is not used, which is sad.


  • administrators

    Hi @james

    Have you tried using FTP? Could you try transferring the files there?



  • www/bootstrap/js/bootstrap.min.js 119K file size



Hello World?

Pylife on Kickstarter - November 2018








Back Us On Kickstarter >

Pycom on Twitter