Can't generate file with MCUBoot header.

Hello,

I'm trying to make a application bootable through MCUBoot but I'm having a hard time generating the .bin file with MCUBoot header.
According to this page I should be able to turn my application bootable by adding both CONFIG_BOOTLOADER_MCUBOOT and CONFIG_SECURE_BOOT configs to my prj.conf file, right?

Doing so I still don't get a .bin (or .signed.bin) file with MCUBoot header to upload through AuTerm as advised in the Academy guide.
I do generate a zephyr.bin in my ./build/APP_NAME/zephyr folder, but I can't upload it:

Am I missing some step?

  • I'm attaching my custom-board files here:
    3487.boards.zip

    My board uses a BC840 Fanstel module, which uses a nRF52840 CKAA SoC.

    Let me clarify my journey in this whole application:
    I have a code for this board which is working fine. I flash this code through the JTAG/SWD Interface, using a nRF52840DK board.

    Now I want to be able to do DFU via USB on my board. To do so, I first followed the Academy Lessons and I was able to achieve a successful USB DFU on this board, with sample codes from the academy examples.

    The next step is to be able to flash this application that I've previously developed through USB. And that's where this ticked started. By adding SB_CONFIG_BOOTLOADER_MCUBOOT=y in sysbuild, the build crashes like I reported here.

    So my board has now the sample bootloader (from the academy lesson) running, but I can't generate the correct files in my previously developed application to flash through USB, via AuTerm.

    Let me know if there's any additional info needed.

    Thank you,
    Kevyn Harder 

  • I don’t see anything in the board file that would explain why bluetooth is being enabled in the bootloader, so I assume it must be something in your project or build setup. I've put together a demo sample based on "Hello World" that should enable DFU over USB and BLE and at least builds without errors for your board. Please try building this on your end and see if you notice any relevant differences in how we configure the bootlaoder. 

     hello_world_usb_dfu.zip

  • I was able to generate the signed.bin file!
    Probably because of these configs that I noticed in your given example:

    CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y
    CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU_SPEEDUP=y

    also this:
    CONFIG_MULTITHREADING=y
    CONFIG_BOOT_MAX_IMG_SECTORS=256
    CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x60000 // I Added this since my application was too big
     
    I'm still having a hard time after flashing through USB DFU, because the unit simply doesn't work after doing that, then I have to flash the bootloader all again and overwrite the flash. But I think this is associated with something else out of the scope of this ticket.
    Anyway, I really appreciate your effort in helping me with this matter.
    I'll verify the answer, since it seems to be solved. Slight smile
    Have a great day.
Related