You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Just tried:

    function test(mask) {
      var i;
      for (i=48*1024;i<64*1024;i+=4) {
        poke32(0x20000000+i, mask^i);
      }
      for (i=48*1024;i<64*1024;i+=4) {
        var v = peek32(0x20000000+i);
        var exp = mask^i;
        if (v != exp) console.log("Got "+v+" not "+exp);
      }
    }
    
    test(0xAAAAAAAA);
    test(0x55555555);
    

    And that seems to work too - so it really looks like the memory is there.

    I checked the compile with the extra RAM: the jsVars structure is the correct size and everything appears to get set up correctly... The stack is put at the end of memory (in the 'new' 16kB) so the fact that Espruino can actually spring into life enough to print stuff down USB implies that it works.

    In my build, jsVars starts at byte 816, so the first variable that has a problem (2379) is near byte 48396 - well into the 'new' memory - and it's the same on different boards, so it's probably not that the memory is dodgy.

    It's a bit of a mystery why it's not working really!

About

Avatar for Gordon @Gordon started