This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BootLoader

hi,

I have a puzzle in the BootLoader project

I'm not particularly familiar with the mechanics of this BootLoader

I try to run bootloar in nrf5340dk_nrf5340_cpuapp,use this setup to create the project

I found a problem where I printed out an error parameter

What bohers me is that SPU_BLOCK_SIZE should not count whether it is 32*1024 or 16*1024

I feel like there's something wrong with the example

I think the second parameter of the fprotect_area function should be equal to SPU_BLOCK_SIZE,But I haven't changed it here

I don't know if I think wrong, I hope you can correct me,Thank you!

If possible, I would like you to provide a detailed DFU tutorial,Thank you so much!!!

Parents
  • If you want to use the immutable bootloader, the simplest (and intended) approach is to simply set CONFIG_SECURE_BOOT=y in the prj.conf of your sample, e.g. zephyr/samples/hello_world/prj.conf. Then the generated build output for the bootloader should get placed into hello_world/<build folder>/bootloder/ (I think) and the file hello_world/<build folder>/zephyr/merged.hex contains both the application and the bootloader image. If you build it this way, all the partitions/memory placement and signing will get handled automatically and you don't have to do anything regarding this.

    Try this and see if you're able to make it work. Check if you get the following log from the hello_world sample:

    Attempting to boot from address 0x8000.
    
    Verifying signature against key 0.
    
    Signature verified.
    
    Booting (0x8000).

    If you for some reason want to build the immutable bootlader separately, please tell me and I can look into the issues you described in your initial post.

    By the way, if you want to have the possibility to update your main application, you should use MCUBoot in addition, which can be done by setting CONFIG_BOOTLOADER_MCUBOOT=y in the prj.conf

    Best regards,

    Simon

Reply
  • If you want to use the immutable bootloader, the simplest (and intended) approach is to simply set CONFIG_SECURE_BOOT=y in the prj.conf of your sample, e.g. zephyr/samples/hello_world/prj.conf. Then the generated build output for the bootloader should get placed into hello_world/<build folder>/bootloder/ (I think) and the file hello_world/<build folder>/zephyr/merged.hex contains both the application and the bootloader image. If you build it this way, all the partitions/memory placement and signing will get handled automatically and you don't have to do anything regarding this.

    Try this and see if you're able to make it work. Check if you get the following log from the hello_world sample:

    Attempting to boot from address 0x8000.
    
    Verifying signature against key 0.
    
    Signature verified.
    
    Booting (0x8000).

    If you for some reason want to build the immutable bootlader separately, please tell me and I can look into the issues you described in your initial post.

    By the way, if you want to have the possibility to update your main application, you should use MCUBoot in addition, which can be done by setting CONFIG_BOOTLOADER_MCUBOOT=y in the prj.conf

    Best regards,

    Simon

Children
No Data
Related