Clear a MDBT42Q module from all code? #3469
Replies: 11 comments
-
Posted at 2020-09-09 by @fanoush How 'bricked' they are? you cannot access Espruino console over serial or bluetooth - wherever the active console is? You cannot press ctrl+c on the console (left side in web ide or over serial teminal) to get debug prompt If you can break into debugger after startup to see the With serial console it may be easier - reset or poweron the module with serial already open and immediately try ctr+c |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-09-09 by @MaBecker If you have a
this procedure will startup the firmware without loading your code and give you the possibility to connect and remove the code. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-09-09 by @fanoush Oh, maybe that will work too when there is original espruino bootloader which clears it before jumping into Espruino? Otherwise when BTN1 is held at startup time the code is skipped except the code marked as "flash always", that one still runs even with button held. This was confimed by some unlucky guys and is also described here https://www.espruino.com/Saving - Boot Process - holding button is exactly like running reset() (sets |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-09-09 by JohanWinas First of it turns out the webIDE had gotten it self in some state, closing the browser and opening it again allowed me to connect and get a prompt, at least long enough to run reset() to clear out the bad code. I have now installed the chrome app, and that seam to be more stable and works better. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-09-09 by @fanoush so you can run |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-09-09 by JohanWinas Tried it, this is the output..
And it goes on and on like that. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-09-09 by @fanoush well yes, so just reboot/powercycle it, if you had code running from flash this was all erased at the point of calling eraseAll so code inside setWatch, setInterval is suddenly hitting empty flash where it expected javascript program to be |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-09-09 by @MaBecker what is the result of require("Storage").list() |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-09-09 by @MaBecker here is the information about startpoint and size of the save code maybe you can use the flash lib to clear the pages |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-09-09 by @fanoush you shouldn't need to, that's what Storage.eraseAll does |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-09-14 by @gfwilliams As @fanoush says, The easiest fix for that is actually just to do this to clear the device:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2020-09-09 by JohanWinas
So, after a lot of debugging I have now realised how the "Flash (always)" works and what a "reset()" actually means. It's not a reset or reboot, it's a system clear. And my broken code is now written with "Flash (always)" so my two dev modules are now bricked.
So how do I get them back? A DFU update does nothing.
Is there any other way to program the module and clear the flash???
Beta Was this translation helpful? Give feedback.
All reactions