Hi Gordon,
Running this code:
// Flashtest function gen_256() { var i; var str=''; for(i=0;i<256;i++) { str+='X'; } return(str); } var bytes256=gen_256(); var f = require("Flash"); var freeFlash = process.memory().flash_start + 511*1024; console.log(f.getPage(freeFlash)); console.log('LEN:'+bytes256.length); f.erasePage(freeFlash); console.log('Nr.1, at '+freeFlash); f.write(bytes256, freeFlash); freeFlash+=256; console.log('Nr.2, at '+freeFlash); f.write(bytes256, freeFlash); freeFlash+=256; console.log('Nr.3, at '+freeFlash); f.write(bytes256, freeFlash); freeFlash+=256; console.log('Nr.4, at '+freeFlash); f.write(bytes256, freeFlash); freeFlash+=256; console.log('Nr.5, at '+freeFlash); f.write(bytes256, freeFlash); freeFlash+=256; console.log('Nr.6, at '+freeFlash); f.write(bytes256, freeFlash); freeFlash+=256; console.log('Nr.7, at '+freeFlash); f.write(bytes256, freeFlash);
@Sacha started
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.
Hi Gordon,
Running this code: