• ...usage is though still a bit unclear... as you can see from the logs... was unable to upload to a Pico. Copied then the FlashString.js as well to the FlashViewTest/modules folder. Upload to memory worked, but not to flash... but I'm not sure about the sequence and what would have to go when and where.

    Please provide a few lines of mode d'emploi...

    Flash:[]
    >MODULES:[]
    MEMORY:{"free":5043,"usage":57,"total":5­100,"history":104,"gc":6,"gctime":4.3268­2037353,"stackEndAddress":536958144,"fla­sh_start":134217728,"flash_binary_end":3­79832,"flash_code_start":134234112,"flas­h_length":393216}
    =undefined
    >Uncaught Error: Module "FlashString" not found
     at line 1 col 23
    ;require('FlashString').save('SWBtn.js',­"function SWBtn(a,b,...
                          ^
    >Flash:[]
    >MODULES:[]
    MEMORY:{"free":5043,"usage":57,"total":5­100,"history":104,"gc":5,"gctime":4.3458­9385986,"stackEndAddress":536958144,"fla­sh_start":134217728,"flash_binary_end":3­79832,"flash_code_start":134234112,"flas­h_length":393216}
    =undefined
    >Uncaught SyntaxError: Got ?[27] expected EOF
     at line 1 col 1
    dfunction s2a(a){while(a.length&3)a+=' ';return E.toUint8...
    ^
    ={ "free": 5046, "usage": 54, "total": 5100, "history": 261,
      "gc": 13, "gctime": 4.48131561279, "stackEndAddress": 536958144, "flash_start": 134217728, "flash_binary_end": 379832,
      "flash_code_start": 134234112, "flash_length": 393216 }
    =[
      {
        "name": "FlashString",
        "size": 3 }
     ]
    >Uncaught Error: Function "list" not found!
     at line 1 col 90
    ...h:'+require('FlashString').list()); else print('Flash:'+'[]'...
                                  ^
    >MODULES:[{"name":"FlashString","size":3­}]
    MEMORY:{"free":5032,"usage":68,"total":5­100,"history":269,"gc":5,"gctime":4.4097­9003906,"stackEndAddress":536958144,"fla­sh_start":134217728,"flash_binary_end":3­79832,"flash_code_start":134234112,"flas­h_length":393216}
    =undefined
    >Uncaught Error: Function "save" not found!
     at line 1 col 25
    ;require('FlashString').save('SWBtn.js',­"function SWBtn(a,b,...
                            ^
    >Uncaught Error: Function "list" not found!
     at line 1 col 90
    ...h:'+require('FlashString').list()); else print('Flash:'+'[]'...
                                  ^
    >MODULES:[{"name":"FlashString","size":3­}]
    MEMORY:{"free":5032,"usage":68,"total":5­100,"history":269,"gc":5,"gctime":4.4097­9003906,"stackEndAddress":536958144,"fla­sh_start":134217728,"flash_binary_end":3­79832,"flash_code_start":134234112,"flas­h_length":393216}
    =undefined
    >Uncaught SyntaxError: Got ?[27] expected EOF
     at line 1 col 1
    dfunction s2a(a){while(a.length&3)a+=' ';return E.toUint8...
    ^
    ={ "free": 5046, "usage": 54, "total": 5100, "history": 269,
      "gc": 12, "gctime": 4.43553924560, "stackEndAddress": 536958144, "flash_start": 134217728, "flash_binary_end": 379832,
      "flash_code_start": 134234112, "flash_length": 393216 }
    =[
      {
        "name": "FlashString",
        "size": 3 }
     ]
    >Uncaught Error: Function "list" not found!
     at line 1 col 90
    ...h:'+require('FlashString').list()); else print('Flash:'+'[]'...
                                  ^
    >MODULES:[{"name":"FlashString","size":3­}]
    MEMORY:{"free":5032,"usage":68,"total":5­100,"history":269,"gc":5,"gctime":4.3964­3859863,"stackEndAddress":536958144,"fla­sh_start":134217728,"flash_binary_end":3­79832,"flash_code_start":134234112,"flas­h_length":393216}
    =undefined
    >Uncaught SyntaxError: Got ?[27] expected EOF
     at line 1 col 1
    dfunction SWBtn(a,b,c){this.f=a?a:function(){},thi­s.b=b?b...
    ^
    ={ "free": 5043, "usage": 57, "total": 5100, "history": 346,
      "gc": 10, "gctime": 4.54521179199, "stackEndAddress": 536958144, "flash_start": 134217728, "flash_binary_end": 379832,
      "flash_code_start": 134234112, "flash_length": 393216 }
    >E.getSizeOf(global["ÿ"].modules,1);
    =[
      {
        "name": "FlashString",
        "size": 3 },
      {
        "name": "SWBtn",
        "size": 3 }
     ]
    >Uncaught Error: Function "list" not found!
     at line 1 col 90
    ...h:'+require('FlashString').list()); else print('Flash:'+'[]'...
                                  ^
    >MODULES:[{"name":"FlashString","size":3­},{"name":"SWBtn","size":3}]
    MEMORY:{"free":5029,"usage":71,"total":5­100,"history":346,"gc":5,"gctime":4.4736­8621826,"stackEndAddress":536958144,"fla­sh_start":134217728,"flash_binary_end":3­79832,"flash_code_start":134234112,"flas­h_length":393216}
    =undefined
    >Uncaught Error: Function "save" not found!
     at line 1 col 25
    ;require('FlashString').save('SWBtn.js',­"function SWBtn(a,b,...
                            ^
    > 
    
About

Avatar for allObjects @allObjects started