This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Unable to find bootable image - MCUBoot

I try to integrate mcuboot and BT DFU into my application. I'm using SDK 1.8.0 and DK board nrf52832.

My problem is, that i got this message "Unable to find bootable image" by mcuboot (investigated via debugger, unfortunatelly  i'm not able to enable logs in that build).
So probably there is problem with partitions or maybe signature of the app.
This is my mcuboot.conf:

CONFIG_MULTITHREADING=y
CONFIG_CONSOLE=n
CONFIG_UART_CONSOLE=n
CONFIG_CONSOLE_HANDLER=n

CONFIG_BOOT_SIGNATURE_TYPE_RSA=y
CONFIG_BOOT_SIGNATURE_KEY_FILE="root-rsa-2048.pem"

And this is pm_static.yml:

app:
  address: 0xc200
  region: flash_primary
  size: 0x31E00
mcuboot:
  address: 0x0
  region: flash_primary
  size: 0xc000
mcuboot_pad:
  address: 0xc000
  region: flash_primary
  size: 0x200
mcuboot_primary:
  address: 0xc000
  orig_span: &id001
  - mcuboot_pad
  - app
  region: flash_primary
  size: 0x32000
  span: *id001
mcuboot_primary_app:
  address: 0xc200
  orig_span: &id002
  - app
  region: flash_primary
  size: 0x3E000
  span: *id002
mcuboot_secondary:
  address: 0x3E000
  region: flash_primary
  size: 0x32000
scratch_storage:
  address: 0x70000
  region: flash_primary
  size: 0xa000
settings_storage:
  address: 0x7a000
  region: flash_primary
  size: 0x6000

And also flash configuration from my .dts:

&flash0 {

	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		boot_partition: partition@0 {
			label = "mcuboot";
			reg = <0x00000000 0xc000>;
		};
		slot0_partition: partition@c000 {
			label = "image-0";
			reg = <0x0000C000 0x32000>;
		};
		slot1_partition: partition@3e000 {
			label = "image-1";
			reg = <0x0003E000 0x32000>;
		};
		scratch_partition: partition@70000 {
			label = "image-scratch";
			reg = <0x00070000 0xa000>;
		};
		storage_partition: partition@7a000 {
			label = "storage";
			reg = <0x0007a000 0x00006000>;
		};
	};
};

I'm building and flashing using the simplest way:

west build -b <board_name>
west flash (merged.hex is being flashed)

Before some changes (not important here) everything was working fine, and i was even able to upload images through bluetooth with positive answer. But after few rebuilds it stopped working (probably it was pure luck - this is why i suspect that something may be wrong with partition table).

Parents
  • I added the exact same pm_static.yml file and the same prj.conf to the hello_world sample. In addition I enabled CONFIG_BOOTLOADER_MCUBOOT=y in hello_world/prj.conf. It ran without any errors.

    Test it yourself here. I used nrf52dk_nrf52832 and NCS v1.9.0-rc1:

    hello_world_with_mcuboot.zip

    Can you test it yourself and see if you get it to work?

    So based on the information/files you've given me, I'm not sure what may cause it to fail. Could you look at the sample hello_world_with_mcuboot I uploaded and see how that differs from your sample?

      i'm not able to enable logs in that build

    The reason you don't see any logs from mcuboot, is because you disable the (uart)console:

    CONFIG_CONSOLE=n
    CONFIG_UART_CONSOLE=n
    CONFIG_CONSOLE_HANDLER=n

    When I commented these out I was able to get mcuboot serial log to work.

    One question, do you get "Unable to find bootable image" after performing a DFU, or do you get it just when trying to boot the main application?

    Best regards,

    Simon

  • When I commented these out I was able to get mcuboot serial log to work.

    Hi Simon,

    Apologies if I am intruding in this conversation. 

    I built hello_world_with_mcuboot project in Segger Embedded Studio (SES) and flashed the merged.hex file in the dev board nRF52833DK. Unfortunately, it is not behaving as expected.

    1- I am not seeing the "Hello World!" message.

    2- Each time I stop the debugger and restart by clicking 'Go' or F5 I get prompted with the message

    "The project zephyr/merged.hex is out of date and needs to be built. Build the project before debugging?"

    But I am sure nothing has changed in the project since the last build.

    Note, I have not changed anything in the project you provided in the zip file. Should I?

    Kind regards

    Mohamed

  • Hello Mohamed, could you please open a new case and ask your question there?

    Thomas: Even though your issue is kind of related as the initial topic, could you could open a new ticket as well (just link to this ticket and explain the current state), since the initial guy started this post got his issue resolved.

    I can see that this ticket has the status "verified answer", so it is locked, so none of you will be able to post any more replies here.

Reply
  • Hello Mohamed, could you please open a new case and ask your question there?

    Thomas: Even though your issue is kind of related as the initial topic, could you could open a new ticket as well (just link to this ticket and explain the current state), since the initial guy started this post got his issue resolved.

    I can see that this ticket has the status "verified answer", so it is locked, so none of you will be able to post any more replies here.

Children
No Data
Related