Skip to content

Releases: InfiniTimeOrg/pinetime-mcuboot-bootloader

1.0.1 : Add support for the new flash memory chip

04 Sep 19:17
Compare
Choose a tag to compare

PineStore notified us that a new SPI flash memory chip will be installed in the next batch of PineTime, because the origial one is EoL (End of Life).

This patch version of the bootloader add support for this new BY25Q32 memory chip. It also sets the backlight to the lowest level. This will prevent some devices with very low battery level from bootlooping.

Please note that it's not needed nor recommanded to upgrade the bootloader if your watch is working fine with 1.0.0. New PineTimes will be flashed with 1.0.1 by the factory.

Here is the procedure to update the bootloader (please note that upgrading the bootloader is a risky operation, do it only if you know what you are doing) :

  • flash reloader-mcuboot-1.0.1.zip using your favorite companion app, following the same procedure than for upgrading InfiniTime.
  • the watch will reboot and load the 'reloader' application. You'll see a small blue pine logo that is progressively being paint in white The bootloader is being updated
  • the watch will reboot again, reload InfiniTime, reboot again and run InfiniTime.

image

Stable release

07 Mar 20:28
2e1a66e
Compare
Choose a tag to compare

This is the first "stable" release of this new version of the bootloader.
Please read the README file and the installation procedure carefully before installing/upgrading the bootloader of your PineTime!

RC4 : last (?) release candidate

26 Jan 19:23
2e1a66e
Compare
Choose a tag to compare
Pre-release

WARNING * WARNING * WARNING * WARNING * WARNING
This is a test release of the bootloader. It is not recommended to install it on a sealed device. Install it only if you're ready to brick your device and reinstall it using the SWD interface.

This is the 3rd test release for this new version of the bootloader. Since the last release, the bootloader now exposes its version to the application firmware.

Please read the README for more info about the project.

Included files:

  • bootloader.bin, bootloader.hex and bootloader.elf : binary file generated by the compiler. Flash at offset 0x00.
  • reloader-mcuboot.zip : DFU file to upgrade the current bootloader over-the-air (OTA)
  • pinetime-mcuboot-recovery-loader.zip : DFU file to install the recovery firmware in the external SPI flash memory. This firmware is a light version of InfiniTime that only supports BLE connectivity and OTA to install a new firmware. It was generated from this branch : https://github.com/JF002/Pinetime/tree/recovery-firmware of InfiniTime.

How to use it:

  1. You need a PineTime devkit (open, with SWD access in case of error) running the factory bootloader and InfiniTime (0.7.1 or 0.9.0)
  2. Upgrade the bootloader : 2 possibilities:
  • flash bootloader.bin at offset 0x00 using your SWD adapter
  • OR upgrade the bootloader using the OTA functionality : OTA the file reloader-mcuboot.zip using NRFConnect or Gadgetbridge. When the transfer is finished, the PineTime will reboot on the old bootloader and load the reloader. This is a tool that will update the current bootloader. When it's finished, your PineTime will reboot on the new bootloader.
  1. Install the recovery firmware : OTA pinetime-mcuboot-recovery-loader.zip. Your PineTime will reboot, load the recovery loader, install the firmware in the external flash memory and reboot on your previously running firmware.
  2. Test the bootloader, the revert and recovery mode and report any issue (and success)!

See it on video : https://video.codingfield.com/videos/watch/5b70cc41-2e14-49cc-a631-0aa466957169

There are also 3 test firmwares to test degraded cases that can happen during the upgrade of the running firmware. They allow to test which degraded cases can be handled and which cannot.
Once again : do not apply these firmwares if you cannot recover your device using SWD (this include sealed devices) !

  • testfw-big.zip : a fully functional firmware that needs ~450KB of flash memory. This is nearly the maximum size allowed by the internal memory of the Pinetime.
  • testfw-random-dfu.zip : this firmware contains only random data instead of executable code. This could happen if the user applied a DFU file that is not intended to be run on a Pinetime. In this case, the bootloader will apply the upgrade, notice that it's not runnable and will automatically revert to the previously running firmware.
  • testfw-no-validate-no-watchdog.zip : this firmware displays a yellow InfiniTime logo. It does not validate the firmware and does not refresh the watchdog. It simulates a firmware that crashes and that is not able to refresh the firmware. The watchdog will reset the device and MCUBoot will revert to the previously running firmware.
  • testfw-validate-wdt-no-ota.zip : This firmware does refresh the watchdog AND automatically validate the version. It means that to the point of view of MCUBoot, the firmware is working fine! BUT... this bad firmware does not provide the OTA and the reset functionality. This is one of the worst degraded case : the bootloader cannot do anything! The only workaround is to wait for the battery to drain completely and then charge the PineTime again. This is reset the CPU and offer the possibility to force a firmware revert during the next boot.
  • The worst of the worst degraded cases is one where the new firmware erase or overwrite the bootloader and/or the recovery firmware with invalid data. In this case, the device is totally bricked and can only be recovered using SWD (meaning the device must be opened).

RC3 : second test release

03 Jan 19:14
53918c7
Compare
Choose a tag to compare
Pre-release

WARNING * WARNING * WARNING * WARNING * WARNING
This is a test release of the bootloader. It is not recommended to install it on a sealed device. Install it only if you're ready to brick your device and reinstall it using the SWD interface.

This is the 2nd test release (yeah, I created RC 2 on a wrong commit...) for this new version of the bootloader. Since the 1st release, the code has been cleaned and spurious reset from the watchdog have been removed.

Please read the README for more info about the project.

Included files:

  • bootloader.bin, bootloader.hex and bootloader.elf : binary file generated by the compiler. Flash at offset 0x00.
  • reloader-mcuboot.zip : DFU file to upgrade the current bootloader over-the-air (OTA)
  • pinetime-mcuboot-recovery-loader.zip : DFU file to install the recovery firmware in the external SPI flash memory. This firmware is a light version of InfiniTime that only supports BLE connectivity and OTA to install a new firmware.

How to use it:

  1. You need a PineTime devkit (open, with SWD access in case of error) running the factory bootloader and InfiniTime (0.7.1 or 0.9.0)
  2. Upgrade the bootloader : 2 possibilities:
  • flash bootloader.bin at offset 0x00 using your SWD adapter
  • OR upgrade the bootloader using the OTA functionality : OTA the file reloader-mcuboot.zip using NRFConnect or Gadgetbridge. When the transfer is finished, the PineTime will reboot on the old bootloader and load the reloader. This is a tool that will update the current bootloader. When it's finished, your PineTime will reboot on the new bootloader.
  1. Install the recovery firmware : OTA pinetime-mcuboot-recovery-loader.zip. Your PineTime will reboot, load the recovery loader, install the firmware in the external flash memory and reboot on your previously running firmware.
  2. Test the bootloader, the revert and recovery mode and report any issue (and success)!

See it on video : https://video.codingfield.com/videos/watch/5b70cc41-2e14-49cc-a631-0aa466957169

There are also 3 test firmwares to test degraded cases that can happen during the upgrade of the running firmware. They allow to test which degraded cases can be handled and which cannot.
Once again : do not apply these firmwares if you cannot recover your device using SWD (this include sealed devices) !

  • testfw-big.zip : a fully functional firmware that needs ~450KB of flash memory. This is nearly the maximum size allowed by the internal memory of the Pinetime.
  • testfw-random-dfu.zip : this firmware contains only random data instead of executable code. This could happen if the user applied a DFU file that is not intended to be run on a Pinetime. In this case, the bootloader will apply the upgrade, notice that it's not runnable and will automatically revert to the previously running firmware.
  • testfw-no-validate-no-watchdog.zip : this firmware displays a yellow InfiniTime logo. It does not validate the firmware and does not refresh the watchdog. It simulates a firmware that crashes and that is not able to refresh the firmware. The watchdog will reset the device and MCUBoot will revert to the previously running firmware.
  • testfw-validate-wdt-no-ota.zip : This firmware does refresh the watchdog AND automatically validate the version. It means that to the point of view of MCUBoot, the firmware is working fine! BUT... this bad firmware does not provide the OTA and the reset functionality. This is one of the worst degraded case : the bootloader cannot do anything! The only workaround is to wait for the battery to drain completely and then charge the PineTime again. This is reset the CPU and offer the possibility to force a firmware revert during the next boot.
  • The worst of the worst degraded cases is one where the new firmware erase or overwrite the bootloader and/or the recovery firmware with invalid data. In this case, the device is totally bricked and can only be recovered using SWD (meaning the device must be opened).

RC1 : First test release

23 Dec 16:02
Compare
Choose a tag to compare
Pre-release

WARNING * WARNING * WARNING * WARNING * WARNING
This is a test release of the bootloader. It is not recommended to install it on a sealed device. Install it only if you're ready to brick your device and reinstall it using the SWD interface.

This is a first test release of the new version of the firmware. Please read the README for more info about the project.

Included files:

  • bootloader.bin, bootloader.hex and bootloader.elf : binary file generated by the compiler. Flash at offset 0x00.
  • reloader-mcuboot.zip : DFU file to upgrade the current bootloader over-the-air (OTA)
  • pinetime-mcuboot-recovery-loader.zip : DFU file to install the recovery firmware in the external SPI flash memory. This firmware is a light version of InfiniTime that only supports BLE connectivity and OTA to install a new firmware.

How to use it:

  1. You need a PineTime devkit (open, with SWD access in case of error) running the factory bootloader and InfiniTime (0.7.1 or 0.9.0)
  2. Upgrade the bootloader : 2 possibilities:
  • flash bootloader.bin at offset 0x00 using your SWD adapter
  • OR upgrade the bootloader using the OTA functionality : OTA the file reloader-mcuboot.zip using NRFConnect or Gadgetbridge. When the transfer is finished, the PineTime will reboot on the old bootloader and load the reloader. This is a tool that will update the current bootloader. When it's finished, your PineTime will reboot on the new bootloader.
  1. Install the recovery firmware : OTA pinetime-mcuboot-recovery-loader.zip. Your PineTime will reboot, load the recovery loader, install the firmware in the external flash memory and reboot on your previously running firmware.
  2. Test the bootloader, the revert and recovery mode and report any issue (and success)!

See it on video : https://video.codingfield.com/videos/watch/5b70cc41-2e14-49cc-a631-0aa466957169

EDIT 01/01/2021
I added 3 test firmwares to test degraded cases that can happen during the upgrade of the running firmware. They allow to test which degraded cases can be handled and which cannot.
Once again : do not apply these firmwares if you cannot recover your device using SWD (this include sealed devices) !

  • testfw-random-dfu.zip : this firmware contains only random data instead of executable code. This could happen if the user applied a DFU file that is not intended to be run on a Pinetime. In this case, the bootloader will apply the upgrade, notice that it's not runnable and will automatically revert to the previously running firmware.
  • testfw-no-validate-no-watchdog.zip : this firmware displays a yellow InfiniTime logo. It does not validate the firmware and does not refresh the watchdog. It simulates a firmware that crashes and that is not able to refresh the firmware. The watchdog will reset the device and MCUBoot will revert to the previously running firmware.
  • testfw-validate-wdt-no-ota.zip : This firmware does refresh the watchdog AND automatically validate the version. It means that to the point of view of MCUBoot, the firmware is working fine! BUT... this bad firmware does not provide the OTA and the reset functionality. This is one of the worst degraded case : the bootloader cannot do anything! The only workaround is to wait for the battery to drain completely and then charge the PineTime again. This is reset the CPU and offer the possibility to force a firmware revert during the next boot.
  • The worst of the worst degraded cases is one where the new firmware erase or overwrite the bootloader and/or the recovery firmware with invalid data. In this case, the device is totally bricked and can only be recovered using SWD (meaning the device must be opened).