-
-
Notifications
You must be signed in to change notification settings - Fork 106
Bootloader precautions for "numeric" Deluge developers
First point to note - if you have an OLED Deluge and the Deluge logo appears when turned on then you’re fine and can ignore this document.
Early Deluge bootloaders had bugs which could (fixably) corrupt or ”brick” your Deluge if you attempted to install a firmware version from a file which was 0 bytes, or from a file too large to fit on the flash memory IC (about 3.5MB). Of course no such firmware files were distributed by Synthstrom, so accidents could only occur if you put the wrong .bin file on your SD card.
This could be a risk anytime that a user with one of these old bootloaders updates their firmware from an SD card using the normal method. But developers working on the Deluge’s open source codebase might be more likely to be installing firmware versions more often, so could be at higher risk.
It’s sort of like a “mini” firmware version which sits on a device like the Deluge to handle some critical functions at boot-up - for instance updating the firmware even if no firmware is currently installed. Normally, bootloaders don’t themselves get updated, but in this case, we might advise you to do just that…
The “corruption” which can occur is just that the contents of the Deluge’s flash memory IC gets corrupted. A new one can be soldered on reasonably easily, or it would probably be possible to correct the IC’s contents with a DelugeProbe. It’s definitely possible with a $500+ J-Link.
If you have an OLED Deluge, you’re fine as long as the Deluge logo animates on screen when the device is turned on. That means it has had its bootloader updated to the newest, safest one (currently version 0008). If you don’t see the Deluge logo on the OLED display when you boot up, something is wrong and you should contact Synthstrom to receive an updated OLED bootloader file.
If you’re going to be programming / debugging with a DelugeProbe or J-Link, this bypasses the bootloader, so the bootloader, new or old, won’t have any effect on safety. And standardly these tools run the firmware from the Deluge’s RAM without writing anything to the flash memory, which makes them extra safe.
The next thing to investigate, to see if your bootloader on a “numeric” Deluge is ok… is to check the bootloader version. Hold down the bottom-leftmost pad on your Deluge - that’s the one labelled “SAMPLE 1” and “MODE”. And while holding that pad down, switch your Deluge on. It will probably display a number on its numeric display, which is the bootloader version. Or if it doesn’t display a number and instead boots up as normal, you have bootloader version 0001 or 0002 (and these are the most risky ones!)
Bootloader version | Safe from too-large files? | Safe from 0-byte files? | Should you update? |
---|---|---|---|
0001 / 0002 | Risk | Risk | Yes, update. |
0003 | Safe | Risk | Yes, update. |
0004 | Safe | Risk | Yes, update. |
0005 | Safe | Risk | Yes, update. |
0006 | Safe | Safe | No benefit. |
0007 | Safe | Safe | No, currently newest for numeric Deluge. |
0008 (currently OLED only) | Safe | Safe | No, currently newest. |
Firstly, updating the bootloader is itself dangerous - much more so than updating firmware, because if the bootloader update process fails part-way through, your Deluge will be corrupted, or “bricked” in the same way described above, which is the very thing we’re trying to avoid. Unlike with firmware updates, you don’t get a second chance if this goes wrong, because if the bootloader is corrupted or not installed, then there’s nothing there to actually perform the update process again, or even boot up.
So, unless your bootloader is version 0005 or earlier, we recommend that you not update your bootloader.
Ok, if you’ve decided to update your bootloader, the first thing to do is make sure your Deluge is connected to a DC power source - USB or 9-12V. If it’s on battery power and the battery runs flat while it’s updating the bootloader, your Deluge will be corrupted!
What we’re about to do is use a feature in the firmware to update the bootloader. To reiterate the definition above, the bootloader is a “mini” bit of firmware-esque code which is just for crucial functions on boot-up, whereas the firmware is the actual software that makes the Deluge’s UI, synth engine, and all those pieces function.
Normally, users use the bootloader to update the firmware - you’ve probably done this before. But here, we’re going to do the complete opposite - using a feature in the firmware to update the bootloader!
Now, make sure you’re on firmware version 4.1.3 or later (OLED) or firmware version 4.1.4 or later (7SEG), the pertaining file can be found here: https://synthstrom.com/product/deluge/#downloads. Older firmware versions do not have the feature to update the bootloader. So, update to the correct firmware version before carrying on. Alternatively, any firmware you've built from the Deluge open source code will have this feature - though using that could be a little more risky if you're not sure just what code has been modified by third parties. Edit: As of 2023-07-05 the Open Source community build is not stable enough on older bootloader versions for us to recommend doing this from a community build, updating bootloader from Community Firmware is blocked. Check issue #134 for updates.
Ok, now place the bootloader file supplied by Synthstrom, (7SEG-display/numeric version linked below), on your SD card, in the root folder. And make sure there are no other .bin files on there, e.g. for the firmware you may have installed, above. The Deluge will identify bootloader files, as opposed to regular firmware files, by their name beginning with the word “boot”. But, we don’t want to take any chances. Note: If you have an OLED Deluge that was erroneously received without the latest bootloader, you'll need to contact Synthstrom to receive the OLED bootloader file.
Deluge bootloader version 0007 for numeric (7-segment display)
Now go into the settings menu on your Deluge (shift + press the select knob). Go into “FIRM” to see the firmware version. Yes, that’s the firmware version and not the bootloader version, but the point is that on this “screen”, we can use a secret shortcut to update the bootloader.
Simultaneously press the top-left three pads in a diagonal line, like this:
(Please don’t share this shortcut too widely - we don’t want users using this regularly without proper warning and running the risk of corrupting their Deluges.)
The Deluge will ask “SURE”, meaning are you sure you want to perform this irreversible operation which will corrupt your Deluge if it goes wrong; if you install the wrong file or if power is lost during the process. If you’re ready to go ahead, then hold your breath and press the select knob down.
The whole process should only take about a second and you’re done! (The Deluge will say “DONE”.)
If you happen to see a “RETR” message (means “retrying”, and is very unlikely), this means your Deluge is having trouble writing to the internal flash memory, but the process is beyond the point of no return and it’s repeatedly retrying. All you can do is wait and hope you eventually get a DONE message. Don’t switch your Deluge off, no matter what. But again, this scenario / message is very unlikely.
Other error messages are “safe”, in that although the bootloader wasn’t updated, the previously installed one is still intact and no harm has been done, so you can correct the problem and try again. These messages are:
- FILE - means no “boot*.bin” file found on the SD card.
- BIG, or SMAL - means your bootloader file is outside of the expected size range, so you’ve probably narrowly avoided a disaster! Bootloader files are meant to be around 40 to 80kB. Are you sure you have the exact file distributed by Synthstrom?
- RAM - insufficient RAM for the operation. Did you have a big song loaded? Reboot your Deluge and try again.
Anyway, hopefully you got the “DONE” message, and are now safe and sound on the latest bootloader. You can check the version as described above, to double-confirm it installed correctly if you wish.