Duet Bootloader
-
Most of the modern microcontrollers I have used (PIC, Arduino for example) are programmed by uploading the firmware to non volatile memory and on booting up the CPU loads the program from there.
By contrast what I would call conventional computers (e.g. ICL 1903A, PDP11 or even an IBM PC with its BIOS) have a hardwired bootloader which on reset uploads the main program from some backing store.
My suspicion is that the latter is the model used on the DUET and that the firmware is read from the SD card at bootup. In which case it should be possible to create an SD card backup then for example upgrade the firmware and have a backout option if the upgrade goes wrong by just changing to the copy of the original SD card. One could even have 3 SD cards and do a grandfather, father and son almost like old fashioned backup policies.
Am I correct in these thoughts and if so are there any specifications for microSD cards, I see the one in my Maestro is a 4GB.
Thanks
Dennis -
The firmware is stored in non-volatile memory in the microcontroller, not read from the SD card at boot time.
Nevertheless, you should keep a backup of your SD card so that you don't lose config.g or other system macro files, your own macro files, menu files (if you have a 12864 display) etc.
-
@dc42 Thanks for the prompt reply which has saved me discovering another distraction in lockdown of looking at the source code.
A lifetime of experiencing major software upgrades in the NHS taught me the importance of a rollback option for when things don't go to plan. Looks like I will have to devise another strategy.
Thanks for your help
Dennis -
@sinnedwrong Roll-back is quite simple; backup your SD card with each firmware update, either by replacing the SD card, or backing up the files to a folder on your PC. If you need to rollback, flash the firmware you want to rollback to (either through DWC, or erase and flash with Bossac) and select the appropriate SD card, or replace SD card contents with appropriate backup. The only thing stored on the board itself is the firmware (which is generic, ie not customised for a particular machine), and the saved WiFi SSIDs on the WiFi chip, if you have a Duet WiFi model.
Ian