• Thanks again allObjects for all your tries, I appreciate.

    I think it is not working because you didn't upload the FlashString.js module to the board yet. I can see it is not there in your log. The buttons to upload to flash are not supposed to show yet until he finds this module on the board, but for some reason they show up on yours, just a glitch. So when you use them, he complain about the absence of this module. (Uncaught Error: Module "FlashString" not found)

    If it is not an ESP8266, you may also need to change the default address/size in FlashString.js to match your flash setup (line 28-31 and remove the 2 extra pages use line 48).

    The sequence of action is :
    1- have your module and FlashString.js in modules directory (what you did) - picture 1
    2- upload FlashString.js to the board memory (it must show off as module in global[0xFF].modules and not with 3blocks of memory only). It seems you did not do this step. - picture 2, it takes 146block of memory
    3- now you can see your flash pages (pict 3) and upload your module to flash (pict4)

    Here is the log :
    step1 :

     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v93.162 Copyright 2016 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    Flash map 4MB:512/512, manuf 0xef chip 0x4016
    >Flash:[]
    >MODULES:[]
    MEMORY:{"free":1651,"usage":49,"total":1­700,"history":13}
    =undefined
    

    step2 :

    >process.memory();
    ={ "free": 1517, "usage": 183, "total": 1700, "history": 176 }
    >E.getSizeOf(global["ÿ"].modules,1);
    =[
      {
        "name": "Flash",
        "size": 3 },
      {
        "name": "FlashString",
        "size": 146 }
     ]
    

    step3 :

    >Flash:[{"name":"DHT22non.js","size":858­,"address":"f8010"},{"name":"IOData.js",­"size":3433,"address":"f9010"},{"name":"­FlashStore.js","size":4028,"address":"fa­014"},{"name":"WifiSync.js","size":1044,­"address":"fc010"},{"name":"IOPlug.js","­size":3936,"address":"fd010"},{"name":"I­OServer.js","size":2475,"address":"fe010­"},{"name":"IOLog.js","size":3777,"addre­ss":"ff00c"},{"free":4}]
    >MODULES:[{"name":"Flash","size":3},{"na­me":"FlashString","size":146}]
    MEMORY:{"free":1497,"usage":203,"total":­1700,"history":184}
    =undefined
    >File uploaded to flash : Add.js
    >Flash:[{"name":"DHT22non.js","size":858­,"address":"f8010"},{"name":"IOData.js",­"size":3433,"address":"f9010"},{"name":"­FlashStore.js","size":4028,"address":"fa­014"},{"name":"Add.js","size":639,"addre­ss":"fb00c"},{"name":"WifiSync.js","size­":1044,"address":"fc010"},{"name":"IOPlu­g.js","size":3936,"address":"fd010"},{"n­ame":"IOServer.js","size":2475,"address"­:"fe010"},{"name":"IOLog.js","size":3777­,"address":"ff00c"},{"free":3}]
    >MODULES:[{"name":"Flash","size":3},{"na­me":"FlashString","size":146}]
    MEMORY:{"free":1497,"usage":203,"total":­1700,"history":246}
    =undefined
    

    In case it was not clear, to communicate with the flash, the plugin uses the FlashString.js module he find ON the board memory, not the one on the hard drive. Therefore, you need to upload it there first by placing it in the module folder of the hard drive and use the button. The plugin just minify and transfer the file to FlashString.js on board, that take care of the rest.

    Yes, the plugin was made using tve module that is esp8266 oriented as you mention. That's why I posted in this section of the forum. But the plugin can work with any flash module that works the same way with save/load/(json)list, I was planning to extend it with another tab using FlashStore.js (I mentioned in first post), but this is still Esp8266. Anyone made a similar module yet for other platforms flash ? For me, it is worth have a unified plugin for flash, SD and so on, but, I have no SD, and truth is, I never got to understand completely the Project plugin code I made my plugin from, hence the little bugs here and there.

    Honestly, I am quite surprised by the difficulty you meet to make it run. I realize it is one thing to use it on my setup, and another to make it run in other people's setup. I would sure appreciate to see it run somewhere else, but if that doesn't help you forget it. If it is not an ESP8266, the benefit is quite limited, I understand if you give up :) I can fix the bugs that you already found, if that really helps. Some days, I don't understand how people can program on esp8266 without using this plugin, memory is so small and javascript is so gluttonous. Other days, I realize I am the crazy one for wanting to use 44kb of modules, plus the rest 3mb for storing files and logs, and have free memory.


    4 Attachments

    • flashviews1.png
    • flashviews2.jpg
    • flashviews3.jpg
    • flashviews4.jpg
About

Avatar for Polypod @Polypod started