Retrieve the MCUboot version from the application

Hello,

I have a project with b0 + MCUboot + App.

My partitions are like this:

b0_container: 0x0 -> 0x9000 (0x9000)
	b0: 0x0 -> 0x8000 (0x8000)
	provision: 0x8000 -> 0x9000 (0x1000)

s0: 0x9000 -> 0x19200 (0x10200)
	s0_pad: 0x9000 -> 0x9200 (0x200)
	s0_image: 0x9200 -> 0x19200 (0x10000)
		mcuboot: 0x9200 -> 0x19200 (0x10000)

EMPTY_0: 0x19200 -> 0x1a000 (0xe00)

s1: 0x1a000 -> 0x2a200 (0x10200)
	s1_pad: 0x1a000 -> 0x1a200 (0x200)
	s1_image: 0x1a200 - 0x2a200 (0x10000)

EMPTY_1: 0x2a200 -> 0x2b000 (0xe00)

mcuboot_primary: 0x2b000 -> 0xe0000 (0xB5000)
	mcuboot_pad: 0x2b000 -> 0x2b200 (0x200)
	mcuboot_primary_app: 0x2b200 -> 0xe0000 (0xb4e00)
		app_image: 0x2b200 -> 0xe0000 (0xb4e00)
			app: 0x2b200 -> 0xe0000 (0xb4e00)

mcuboot_secondary: 0xe0000 -> 0xf0000 (0x10000)

settings_storage: 0xf0000 -> 0x100000 (0x10000)

sram_primary: 0x20000000 -> 0x20040000 (0x40000)

In my application, how can I retrieve the version number of the bootloader (MCUboot) that is currently active?

Thank you

Parents
  • Hello,

    I was discussing this with a coworker, and I think this will be very hard to implement. Is this feature a high priority for you? Perhaps you can check this and see if you find some helpful information.

  • Hello,

    Yes I need it in my application to know if the bootloader needs to be updated (my device connects via BLE to a smartphone and it checks the versions of the bootloader and the application to check if the device is up to date).

    I find it surprising that it is so complicated to recover the version of the bootloader that is currently in use. The only way to retrieve the boot version is to save it in RAM/falsh ?
    How does the immutable bootloader (b0) know if it is the bootloader present in s0 or s1 that it should boot (thus with the latest version)? Could this version number be in the s0_pad or s1_pad partition?

Reply
  • Hello,

    Yes I need it in my application to know if the bootloader needs to be updated (my device connects via BLE to a smartphone and it checks the versions of the bootloader and the application to check if the device is up to date).

    I find it surprising that it is so complicated to recover the version of the bootloader that is currently in use. The only way to retrieve the boot version is to save it in RAM/falsh ?
    How does the immutable bootloader (b0) know if it is the bootloader present in s0 or s1 that it should boot (thus with the latest version)? Could this version number be in the s0_pad or s1_pad partition?

Children
Related