Well, it is a bit tricky but still doable, you need to send direct spi flash commands like in https://www.microchip.com/forums/m910893.aspx but I don't have exact line here, needs some experimenting. Maybe @Gordon has the code ready.
What is easier for me is to enable the SPI flash for Flash API as mentioned in my post #9 and then the js code is easier, basically calling Flash.erasePage() described at https://www.espruino.com/Reference#Flash for addresses of external SPI flash which starts at 0x60000000 should do it so if you are adventurous you may try attached build or wait for @Gordon
with attached build require("Flash").erasePage(0x60000000) should clean first block which should be enough, if not then more blocks can be cleared
EDIT: attached build removed, newer one is in post below
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.
Well, it is a bit tricky but still doable, you need to send direct spi flash commands like in https://www.microchip.com/forums/m910893.aspx but I don't have exact line here, needs some experimenting. Maybe @Gordon has the code ready.
What is easier for me is to enable the SPI flash for Flash API as mentioned in my post #9 and then the js code is easier, basically calling Flash.erasePage() described at https://www.espruino.com/Reference#Flash for addresses of external SPI flash which starts at 0x60000000 should do it so if you are adventurous you may try attached build or wait for @Gordon
with attached build
require("Flash").erasePage(0x60000000)
should clean first block which should be enough, if not then more blocks can be clearedEDIT: attached build removed, newer one is in post below