common bootloader?
#7
Quote:
  • Delay on boot, check if the button is pressed.

  • If the button is pressed, enter "rescue" mode that will offer a serial console over bluetooth with xmodem (or similar) support to download a (compressed?) firmware image.
    ...
  • Check on boot if a new firmware image is available in external flash, if so write it to internal (memory mapped) flash.
    ...
  • Set the watchdog timer.

I'm not sure if I'm following here. To save on battery you will want to enter sleep as much as you can, where RAM contents is lost. Off course you'll want a watchdog too. Note that a watchdog keeps going when you've entered sleep. So you must wakeup your device through some kind of RTC alarm just for "kicking" the WD.
If you check for button press within your bootloader I'd guess you're doing that each time to user wakes up the device from sleep. To avoid checking for firmware update candidates immediately you may want to check that the btn is pressed for x seconds, for example keeping it pressed for 5s triggers bootloader, else launch application firmware. So the bootloader will delay any action until user has released the button, or 5s have passed. That's a pitty because you could do quite a bit during that time... Furthermore, if one would were hand gloves that would accidentally push the button for 5s, you're into the bootloader menu waiting for some BL action to happen.
I'd only trigger the fwupdate within the bootloader after powerup/(soft-)reset.


Messages In This Thread
common bootloader? - by Jeeves - 12-05-2019, 04:36 AM
RE: common bootloader? - by lupyuen - 12-05-2019, 04:43 AM
RE: common bootloader? - by Jeeves - 12-05-2019, 05:24 AM
RE: common bootloader? - by lupyuen - 12-05-2019, 06:07 AM
RE: common bootloader? - by Jeeves - 12-05-2019, 06:17 AM
RE: common bootloader? - by Independent_Contact - 01-10-2020, 10:39 AM
RE: common bootloader? - by geoffrey.vl - 05-01-2020, 07:29 AM
RE: common bootloader? - by JF002 - 05-02-2020, 03:45 AM
RE: common bootloader? - by danielt - 05-04-2020, 03:36 AM
common bootloader? - by lupyuen - 05-02-2020, 04:17 AM
RE: common bootloader? - by geoffrey.vl - 05-02-2020, 12:51 PM
common bootloader? - by lupyuen - 05-07-2020, 09:35 AM
RE: common bootloader? - by danielt - 05-07-2020, 10:06 AM
common bootloader? - by lupyuen - 05-08-2020, 10:29 AM
common bootloader? - by lupyuen - 05-09-2020, 12:39 PM
RE: common bootloader? - by danielt - 05-11-2020, 05:34 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Lightbulb New version of MCUBoot bootloader : I need your help! JF002 15 6,076 02-01-2021, 01:50 PM
Last Post: VMMainFrame
Information PineTime Updater for Flashing New Bootloader and FreeRTOS Firmware lupyuen 2 2,180 07-31-2020, 05:10 PM
Last Post: lupyuen
  MCUBoot Bootloader for PineTime lupyuen 2 2,252 05-18-2020, 04:23 PM
Last Post: lupyuen
  wasp-bootloader: a robust SoftDevice bootloader for PineTime danielt 3 2,585 04-14-2020, 05:31 AM
Last Post: danielt

Forum Jump:


Users browsing this thread: 1 Guest(s)