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!
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Just tried:
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!