-
• #2
You can try
require("Storage").eraseAll()
from IDE's command line. That should erase whole SPI flash. Then restoring your files or starting from scratch. If that doesn't work and you still see FW addr fail I'd try to drain the battery so CPU and SPI flash is power cycled and try again with eraseAll. If nothing helps and if the address reported is still the same then it could be bad flash block indeed. If that is really the case (hopefully not) than temporary workaround could be to build custom firmware with smaller storage area that does not include such bad area. I think bad block skipping is currently not part of Storage or Flash modules (as nobody had this issue so far) but if it would be real issue it could perhaps be added. -
• #3
Hi - this sounds a lot like the external flash Storage has got corrupted - what can happen is the flash gets only partially erased and then Espruino writes to what it thinks is erased space, but when it reads back it doesn't get what it has written, which is why you get the
FW addr
error.It's also the source of your garbled filenames. It's possible that something happened while trying to rearrange flash to make space for the 2v19 firmware during your update.
require("Storage").eraseAll()
would work (it can also be done from the app loader via a button) but I'd maybe just doInstall Default Apps
from the app loader (which erases all anyway). Or you can just restore your backup (use the old one or delete the garbled filenames from the new one) and that does an erase too (if you answer yes to the question about it).Or if you can get 2v19 installed then when you hold the button at boot you should be able to get a 'recovery' menu which will have a 'factory reset' option
-
• #4
I tried the "Install Default Apps" and it WORKED! I got all of my apps reuploaded and my custom ones as well and it's as good as new. Thank you!
Does anyone know how to fix this error on the Bangle.js 2?
FW addr 0x00201c00 fail
About a week ago, I decided to update my watch's firmware to 2v19 from 2v18 (DFU version 2v14), and I installed it with the "Firmware Update" app on the app loader. It updated, then refused to connect to my computer, and kept rapidly connecting and disconnecting as the BLE pairings failed. I wondered if the settings had gotten messed up with the update and went into the Settings app on the watch. I toggled "Bluetooth->Programmable" off and back on, but I noticed that the screen wasn't updating properly. I then held the side button to return to the watch face. The usual "Reloading..." screen appeared, but in the "light" color scheme whereas it had been set to "dark". And it hung there for a couple of minutes. Thinking that it was stuck, I rebooted several times to no avail. Guessing that maybe the firmware had gotten corrupted in transmit, I tried reflashing 2v19 with the firmware updater, getting the same result. Wondering if the firmware had a bug, I tried rolling back to 2v18 with the firmware updater. The watch looked like it was installing it but it then booted into 2v19. I then proceeded to flash the firmware with the Web IDE's Flasher tool, and it successfully rolled back to 2v18, but still wouldn't load past the "Reloading..." screen. I checked the file list on the watch (from the Web IDE's storage viewer) against a backup I had made in June 2023 and found that setting.json and gane1024.json were both missing. Several files had been added, most of which were more recently installed apps, but there were also two empty files that had nonsense UTF-8 names ("pµ\rM\rLd\u001b¤\u0 and "Í\t" [quotes are part of the filenames, maybe they are the corrupted setting.json and game1024.json?]). I then downloaded the code that was in RAM, and tried reading setting.json (var s = require("Storage").readJSON("setting.json",1)||{};), and of course received an empty object. I then tried to upload the setting.json file from the backup and the watch seemingly refused the file, giving me only the message "FW addr 0x00201c00 fail" followed by a couple of uncaught "File already written with different data" errors. Viewing storage shows that it did not take the file, but on one occasion of attempting this, I was able to load setting.json (after saving it to storage) from the Web IDE REPL to get... the save data for game1024?! I have not been able to repeat this feat, but the watch still refuses the additional files. I can read other files from it just fine and even run most applications, but not the settings app. Everything is running on default settings.
My current best guess for the problem is a corrupt or malfunctioning flash chip or block on the flash chip, but I really don't know. Does anyone have any ideas about why I might be having this problem, or even better, how to fix it? In case it's helpful, I have an Arduino Uno and Mega (to use with the debug pins on the back of the watch).