Reboot to bootloader
This implements rebooting to bootloader via os.reset(True)
. To do that we modify the bootloader so that it checks for a special file named .mscmode
and if it's there it removes it and runs msc()
. On Python side we declare .mscmode
as a restricted file and create it before rebooting if needed.
This also improves update-bootloader.bin
building because I didn't get a debugger :D It now automatically uses the latest bootloader, so you can grab update-bootloader.bin
.
Merge request reports
Activity
assigned to @schneider
FTR: There was an alternative implementation proposed by someone at card10 tent (sorry for forgetting your name!) - to try using SIMD registers for that purpose as they might be unaffected by reset. However I decided against it as we have no guarantee something won't accidentally set the magic bit and reset.
Actually, the whole of RAM is declared to be unphased by a reset according to the reference manual IIUC. So for this sort of reset, you could also put a special marker with validity check at a pre-defined address. I did a similiar implementation already a few weeks ago and it worked fine ;)
@schneider I'll try to think of something! The main problem is the firmware size I guess, and I'm also a bit afraid to automatically update to bootloader from master. I guess we could manually put "blessed" bootloader into the main firmware and then update it if needed.
added 46 commits
-
dd823731...051036fe - 44 commits from branch
card10:master
- 925d430a - Improve bootloader-update build process
- 65aa3589 - Implement reboot-to-bootloader call
-
dd823731...051036fe - 44 commits from branch
added 2 commits
Finally we have bootloader updates implemented!
This needs to be thoroughly tested, we don't want to break people's devices. Current process to update the bootloader is:
cp build/hw-tests/bootloader-update/bootloader.h epicardium/
- Bump
BOOTLOADER_VERSION
in lib/card10-platform/card10-platform.h
added 44 commits
Toggle commit listadded 1-Additional-Feature label
added 6 - Needs Review label