• I've written a small tool which creates a helper script, and can be executed on the board as suggested to create the environment. I'm sending the file in small 32 byte chunks as a byte array.

    It goes like:

    var s = require("Storage");
    s.eraseAll();
    s.write("index", "", 0, 15014);
    s.write("index", [60, 33, 68, 79, 67, 84, 89, 80, 69, 32, 104, 116, 109, 108, 62, 10, 60, 104, 116, 109, 108, 62, 10, 10, 32, 32, 60, 104, 101, 97, 100, 62], 0);
    s.write("index", [10, 32, 32, 32, 32, 60, 116, 105, 116, 108, 101, 62, 81, 55, 82, 70, 32, 77, 81, 84, 84, 32, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116], 32);
    // ... goes on
    

    The problem is, that only the first write succeeds, and only the first 32 bytes can be read from the entry. If I manually execute the lines in the interpreter, only the first write returns true, others are not even returning false. Any idea what causing this? I think something fails silently in the native code.
    It doesn't seem to be offset related, if I change the second write from 32 to 33 or 31 it does the same.

    This works:

    >s.write("test", "", 0, 20);
    =true
    >s.write("test", [0, 1, 2, 3, 4], 5);
    =true
    >s.write("test", [0, 1, 2, 3, 4], 15); 
    =true
    >s.read("test");
    ="\xFF\xFF\xFF\xFF\xFF\0\1\2\3\4\xFF\xFF­\xFF\xFF\xFF\0\1\2\3\4"
    

    Also it seems I have more than enough memory left in storage:

    >s.getFree();
    =181528
    
About

Avatar for nistvan.86 @nistvan.86 started