bootloader project in nCS

Hi,

1. Is bootloader file and firmware file, different for projects build on nCS..?
    Or a single executable build file consists both bootloader & firmware..?

2. Can you suggest a sample program to build a bootloader project..?

Thanks,

Parents Reply
  • Hello ,

    CONFIG_BOOT_SIGNATURE_KEY_FILE

    Thank you for the suggestion, it helps.

    Further, I understand the usual way mcuboot works with SLOT-0, SLOT-1 & SCRATCH memory locations towards swapping of images for firmware update.

    I want to customize a few things here,

    1. I want to map SLOT-1 & SCRATCH memory locations to external serial flash locations.

    2. I want to provide mcuboot SPI interface APIs to interact with external flash.

    So, for the above 2 requirements, kindly suggest how and where I can tweak & build the mcuboot source code.

    If any sample is available wherein mcuboot source code is modified, it would be great.

    Thanks,

    Ubaid

Children
  • Ubaid_M said:

    1. I want to map SLOT-1 & SCRATCH memory locations to external serial flash locations.

    2. I want to provide mcuboot SPI interface APIs to interact with external flash.

    What chip are you using? I believe it is possible to offload this to an external QSPI flash chip by using CONFIG_NORDIC_QSPI_NOR=y. Without knowing the details, perhaps you can look into what this does, and try to implement something similar using SPI. 

    The MCUBOOT bootloader project is located in ncs <vX.Y.Z>\bootloader\mcuboot.

    BR,
    Edvin

  • Hello ,

    The MCUBOOT bootloader project is located in ncs <vX.Y.Z>\bootloader\mcuboot.

    1. So i can tweak in the and make changes to mcuboot source code from here right..?



    Another query i had was with copying of mcuboot,

    So in this case you can see that the bootloader is located at address 0x0

    2. WHO does this copying of mcuboot onto device memory location 0x00..?


    Thanking you,

    Ubaid

  • Hello ,


    The MCUBOOT bootloader project is located in ncs <vX.Y.Z>\bootloader\mcuboot.

    Where can i find the mcuboot source code..?

    What chip are you using?

    I am using nrf52833dk_nrf52833 board with an external flash IS25LQ040B.
    The interface is SPI single line & not QSPI.

    That is, i need to change mcuboot source code to provide, SPI access to it, so that  mcuboot can copy new firmware file from external flash to internal flash.



    Thanks,

  • Hello,

    Please see the v1.9.1\bootloader\mcuboot\boot\zephyr (that is the project folder, containing the main.c for the bootloader. You can see that if you follow the guide from one of the links, it should print something like 

    I: Starting bootloader
    
    I: Primary image: magic=bad, swap_type=0x0, copy_done=0x2, image_ok=0x2
    
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    
    I: Boot source: none
    
    I: Swap type: none
    
    I: Bootloader chainload address offset: 0xc000
    
    I: Jumping to the first image slot
    *** Booting Zephyr OS build v2.7.99-ncs1  ***
    

    The first and last line is coming from that main.c file.

    BR,
    Edvin

  • Thank you Edvin,


    the bootloader is located at address 0x0

    Can you please suggest who copies bootloader code from hex file onto memory location 0x000..?

    And also what is the size overhead added by enabling MCU_BOOT on the firmware file..?

    Can i compile mcboot separately..?

    Thanks,

    Ubaid

Related