nrf5_SDK secure bootloader with external QSPI Flash Image

Hi

I am working with the SDK secure bootloader from the SDK 17.1.0. The generated encrypted zip package we transfer with DFU and the APP and this is working great. The application image is too big to use the dual image feature. We have an external flash connected with QSPI and already implemented the possibility to receive and store the same zip package in this external QSPI flash.

Now we have to change the secure bootloader to read the new zip file content from this external flash in the bootloader and not over the BLE DFU feature. To get this feature, I checked the QSPI_booloader project in the examples folder (examples\peripheral\qspi_bootloader\pca10056\blank\ses) but can't see where this project is using the bootloader features like to check the CRC, the crypto key and all other features like in the secure bootloader project. Or is the idea to use this project to implement the start address to the existing secure bootloader project and this code will start reading from the external flash instead of the received files from the BLE DFU connection?

Is there an existing sample how to implement this feature in the secure bootloader project?

Thanks a lot for inputs, Dominik

  • Hi

    Please check out this case where my colleague Vidar explains a bit more on how to use an external flash as the storage space used by the bootloader. You will need to modify the bootloader in your project to support externally mapped memory, as we don't have something like this in the nRF5 SDK at the moment.

    Best regards,

    Simon

  • I merged the code from this SPI Bootloader Page to implement the SPI feature, but now I got the error:

    .bootloader_settings_page is too large to fit in FLASH memory segment

    I increased the bootloader size from actual 32kb to 64kb, but this didn't solve the error. The bootloader size can be increased without limit? (of course the Application will be smaller of this size)

    in the function the size will be calculated with the old SDK with the UICR feature,

    static uint32_t nrf_dfu_find_cache(uint32_t size_req, bool dual_bank_only, uint32_t * p_address)
    {
        uint32_t free_size =  DFU_REGION_TOTAL_SIZE_QSPI - DFU_APP_DATA_RESERVED;
        
    .....
    
    #define DFU_REGION_TOTAL_SIZE_QSPI               ((* (uint32_t *)NRF_UICR_BOOTLOADER_START_ADDRESS) - CODE_REGION_1_START)

    I changed this because of the new SDK 17.1.0 to:

    #define DFU_REGION_TOTAL_SIZE_QSPI               ((* (uint32_t *)BOOTLOADER_START_ADDR) - CODE_REGION_1_START)
    ....
    
    #ifndef BOOTLOADER_START_ADDR
    #if (__LINT__ == 1)
        #define BOOTLOADER_START_ADDR (0x3AC00)
    #elif defined(CODE_START)
        #define BOOTLOADER_START_ADDR (CODE_START)
    #else
        #error Not a valid compiler/linker for BOOTLOADER_START_ADDR.
    #endif
    #endif
    
    #elif defined(__SES_ARM)
    extern uint32_t * _vectors;
    extern uint32_t __FLASH1_segment_used_end__;
    #define CODE_START ((uint32_t)&_vectors)
    #define CODE_END   ((uint32_t)&__FLASH1_segment_used_end__)
    #define CODE_SIZE  (CODE_END - CODE_START)
    
    

    Because this code is used on the original DFU ver BLE, maybe this is wrong?

    Thanks

  • Hi

    This seems to be a linker issue. Can you upload the exact error message you're seeing on your end, maybe as a log file so we can get some context? Please check out this case, where my colleague Vidar explains a bit about the flash placement file (flash_placement.xml) and how to define the additional memory segments in your project. My guess is that by increasing the bootloader size the bootloader settings page has also been increased, and that where this is stored no longer fits in the allotted memory.

    Best regards,

    Simon

  • Here are the files, I will check also the case you liked above

    Building ‘secure_bootloader_G3_ble_s140’ from solution ‘secure_bootloader_G3_ble_s140’ in configuration ‘Release’
      Checking ‘thumb_crt0.s’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/thumb_crt0.o' is up to date
      Checking ‘nrf_log_frontend.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_log_frontend.o' is up to date
      Checking ‘nrf_log_str_formatter.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_log_str_formatter.o' is up to date
      Checking ‘app_error_weak.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/app_error_weak.o' is up to date
      Checking ‘app_util_platform.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/app_util_platform.o' is up to date
      Checking ‘nrf_assert.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_assert.o' is up to date
      Checking ‘app_scheduler.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/app_scheduler.o' is up to date
      Checking ‘crc32.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/crc32.o' is up to date
      Checking ‘mem_manager.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/mem_manager.o' is up to date
      Checking ‘nrf_atfifo.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_atfifo.o' is up to date
      Checking ‘nrf_atomic.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_atomic.o' is up to date
      Checking ‘nrf_balloc.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_balloc.o' is up to date
      Checking ‘nrf_fprintf.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_fprintf.o' is up to date
      Checking ‘nrf_fprintf_format.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_fprintf_format.o' is up to date
      Checking ‘nrf_fstorage.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_fstorage.o' is up to date
      Checking ‘nrf_fstorage_nvmc.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_fstorage_nvmc.o' is up to date
      Checking ‘nrf_fstorage_sd.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_fstorage_sd.o' is up to date
      Checking ‘nrf_memobj.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_memobj.o' is up to date
      Checking ‘nrf_queue.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_queue.o' is up to date
      Checking ‘nrf_ringbuf.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_ringbuf.o' is up to date
      Checking ‘nrf_section_iter.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_section_iter.o' is up to date
      Checking ‘nrf_strerror.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_strerror.o' is up to date
      Checking ‘pb_common.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/pb_common.o' is up to date
      Checking ‘pb_decode.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/pb_decode.o' is up to date
      Checking ‘cc310_bl_backend_ecc.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/cc310_bl_backend_ecc.o' is up to date
      Checking ‘cc310_bl_backend_ecdsa.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/cc310_bl_backend_ecdsa.o' is up to date
      Checking ‘cc310_bl_backend_hash.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/cc310_bl_backend_hash.o' is up to date
      Checking ‘cc310_bl_backend_init.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/cc310_bl_backend_init.o' is up to date
      Checking ‘cc310_bl_backend_shared.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/cc310_bl_backend_shared.o' is up to date
      Checking ‘boards.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/boards.o' is up to date
      Checking ‘nrf_sdh.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_sdh.o' is up to date
      Checking ‘nrf_sdh_ble.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_sdh_ble.o' is up to date
      Checking ‘nrf_sdh_soc.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_sdh_soc.o' is up to date
      Checking ‘nrf_nvmc.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_nvmc.o' is up to date
      Checking ‘nrfx_atomic.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrfx_atomic.o' is up to date
      Checking ‘nrfx_saadc.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrfx_saadc.o' is up to date
      Checking ‘nrfx_qspi.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrfx_qspi.o' is up to date
      Checking ‘nrf_crypto_ecc.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_crypto_ecc.o' is up to date
      Checking ‘nrf_crypto_ecdsa.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_crypto_ecdsa.o' is up to date
      Checking ‘nrf_crypto_hash.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_crypto_hash.o' is up to date
      Checking ‘nrf_crypto_init.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_crypto_init.o' is up to date
      Checking ‘nrf_crypto_shared.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_crypto_shared.o' is up to date
      Checking ‘main.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/main.o' is up to date
      Checking ‘dfu_public_key.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/dfu_public_key.o' is up to date
      Checking ‘nrf_dfu_svci.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_dfu_svci.o' is up to date
      Checking ‘nrf_dfu_svci_handler.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_dfu_svci_handler.o' is up to date
      Checking ‘nrf_svc_handler.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_svc_handler.o' is up to date
      Checking ‘ble_srv_common.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/ble_srv_common.o' is up to date
      Checking ‘nrf_bootloader_dfu_timers.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_bootloader_dfu_timers.o' is up to date
      Checking ‘nrf_bootloader_fw_activation.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_bootloader_fw_activation.o' is up to date
      Checking ‘nrf_bootloader_info.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_bootloader_info.o' is up to date
      Checking ‘nrf_bootloader_wdt.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_bootloader_wdt.o' is up to date
      Checking ‘nrf_bootloader.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_bootloader.o' is up to date
      Checking ‘ses_startup_nrf_common.s’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/ses_startup_nrf_common.o' is up to date
      Checking ‘ses_startup_nrf52840.s’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/ses_startup_nrf52840.o' is up to date
      Checking ‘system_nrf52840.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/system_nrf52840.o' is up to date
      Checking ‘dfu-cc.pb.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/dfu-cc.pb.o' is up to date
      Checking ‘nrf_dfu_flash.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_dfu_flash.o' is up to date
      Checking ‘nrf_dfu_handling_error.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_dfu_handling_error.o' is up to date
      Checking ‘nrf_dfu_mbr.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_dfu_mbr.o' is up to date
      Checking ‘nrf_dfu_req_handler.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_dfu_req_handler.o' is up to date
      Checking ‘nrf_dfu_settings.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_dfu_settings.o' is up to date
      Checking ‘nrf_dfu_settings_svci.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_dfu_settings_svci.o' is up to date
      Checking ‘nrf_dfu_transport.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_dfu_transport.o' is up to date
      Checking ‘nrf_dfu_utils.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_dfu_utils.o' is up to date
      Checking ‘nrf_dfu_validation.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_dfu_validation.o' is up to date
      Checking ‘nrf_dfu_ver_validation.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_dfu_ver_validation.o' is up to date
      Checking ‘nrf_dfu_ble.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_dfu_ble.o' is up to date
      Checking ‘nrf_dfu.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_dfu.o' is up to date
      Checking ‘oberon_backend_chacha_poly_aead.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/oberon_backend_chacha_poly_aead.o' is up to date
      Checking ‘oberon_backend_ecc.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/oberon_backend_ecc.o' is up to date
      Checking ‘oberon_backend_ecdh.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/oberon_backend_ecdh.o' is up to date
      Checking ‘oberon_backend_ecdsa.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/oberon_backend_ecdsa.o' is up to date
      Checking ‘oberon_backend_eddsa.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/oberon_backend_eddsa.o' is up to date
      Checking ‘oberon_backend_hash.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/oberon_backend_hash.o' is up to date
      Checking ‘oberon_backend_hmac.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/oberon_backend_hmac.o' is up to date
      Checking ‘hal_gpio_driver_bootloader.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/hal_gpio_driver_bootloader.o' is up to date
      Checking ‘hal_qspi_driver_bootloader.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/hal_qspi_driver_bootloader.o' is up to date
      Checking ‘nrf_bootloader_slim_spi.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_bootloader_slim_spi.o' is up to date
      Checking ‘nrf_dfu_spi_req_handler.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_dfu_spi_req_handler.o' is up to date
      Checking ‘nrf_bootloader_app_start_final_mod.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_bootloader_app_start_final_mod.o' is up to date
      Checking ‘nrf_bootloader_app_start_mod.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_bootloader_app_start_mod.o' is up to date
      Checking ‘spi_flash_block.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/spi_flash_block.o' is up to date
      Checking ‘spi_flash_misc.c’
        'Output/Release/Obj/secure_bootloader_G3_ble_s140/spi_flash_misc.o' is up to date
      Checking ‘secure_bootloader_G3_ble_s140’
        Output/Release/Exe/secure_bootloader_G3_ble_s140.elf does not exist.
      Linking secure_bootloader_G3_ble_s140.elf
        "C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.66/gcc/arm-none-eabi/bin/ld" -X --omagic -eReset_Handler --defsym=__do_debug_operation=__do_debug_operation_mempoll -EL --defsym=__vfprintf=__vfprintf_long --defsym=__vfscanf=__vfscanf_long --gc-sections -TC:/Projects/Smartlink_BLE/Software/G3/smartlink_ble_mesh/AstraLED_G3_SecureBootloader/ses/Output/Release/Obj/secure_bootloader_G3_ble_s140/secure_bootloader_G3_ble_s140.ld -Map Output/Release/Exe/secure_bootloader_G3_ble_s140.map -u_vectors -o Output/Release/Exe/secure_bootloader_G3_ble_s140.elf --emit-relocs --start-group @C:/Projects/Smartlink_BLE/Software/G3/smartlink_ble_mesh/AstraLED_G3_SecureBootloader/ses/Output/Release/Obj/secure_bootloader_G3_ble_s140/secure_bootloader_G3_ble_s140.ind --end-group
        Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_bootloader_slim_spi.o:C:\Projects\Smartlink_BLE\Software\G3\smartlink_ble_mesh\AstraLED_G3_SecureBootloader\bootloader_qspi/nrf_bootloader_slim_spi.c:82: multiple definition of `m_dfu_settings_buffer'; Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_dfu_settings.o:C:\Projects\Smartlink_BLE\Software\G3\smartlink_ble_mesh\nRF5_SDK\components\libraries\bootloader\dfu/nrf_dfu_settings.c:74: first defined here
        Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_bootloader_slim_spi.o:C:\Projects\Smartlink_BLE\Software\G3\smartlink_ble_mesh\AstraLED_G3_SecureBootloader\bootloader_qspi/nrf_bootloader_slim_spi.c:99: multiple definition of `s_dfu_settings'; Output/Release/Obj/secure_bootloader_G3_ble_s140/nrf_dfu_settings.o:C:\Projects\Smartlink_BLE\Software\G3\smartlink_ble_mesh\nRF5_SDK\components\libraries\bootloader\dfu/nrf_dfu_settings.c:156: first defined here
        .bootloader_settings_page is too large to fit in FLASH memory segment
    Build failed
    secure_bootloader_G3_ble_s140.map
    <!DOCTYPE Linker_Placement_File>
    <Root name="Flash Section Placement">
      <MemorySegment name="FLASH" start="$(FLASH_PH_START)" size="$(FLASH_PH_SIZE)">
        <ProgramSection load="no" name=".reserved_flash" start="$(FLASH_PH_START)" size="$(FLASH_START)-$(FLASH_PH_START)" />
        <ProgramSection alignment="0x100" load="Yes" name=".vectors" start="$(FLASH_START)" />
        <ProgramSection alignment="4" load="Yes" name=".init" />
        <ProgramSection alignment="4" load="Yes" name=".init_rodata" />
        <ProgramSection alignment="4" load="Yes" name=".text" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".crypto_data" inputsections="*(SORT(.crypto_data*))" address_symbol="__start_crypto_data" end_symbol="__stop_crypto_data" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".nrf_queue" inputsections="*(.nrf_queue*)" address_symbol="__start_nrf_queue" end_symbol="__stop_nrf_queue" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".dfu_trans" inputsections="*(SORT(.dfu_trans*))" address_symbol="__start_dfu_trans" end_symbol="__stop_dfu_trans" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".svc_data" inputsections="*(.svc_data*)" address_symbol="__start_svc_data" end_symbol="__stop_svc_data" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".log_const_data" inputsections="*(SORT(.log_const_data*))" address_symbol="__start_log_const_data" end_symbol="__stop_log_const_data" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".nrf_balloc" inputsections="*(.nrf_balloc*)" address_symbol="__start_nrf_balloc" end_symbol="__stop_nrf_balloc" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_ble_observers" inputsections="*(SORT(.sdh_ble_observers*))" address_symbol="__start_sdh_ble_observers" end_symbol="__stop_sdh_ble_observers" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".log_backends" inputsections="*(SORT(.log_backends*))" address_symbol="__start_log_backends" end_symbol="__stop_log_backends" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_req_observers" inputsections="*(SORT(.sdh_req_observers*))" address_symbol="__start_sdh_req_observers" end_symbol="__stop_sdh_req_observers" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_state_observers" inputsections="*(SORT(.sdh_state_observers*))" address_symbol="__start_sdh_state_observers" end_symbol="__stop_sdh_state_observers" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_stack_observers" inputsections="*(SORT(.sdh_stack_observers*))" address_symbol="__start_sdh_stack_observers" end_symbol="__stop_sdh_stack_observers" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".sdh_soc_observers" inputsections="*(SORT(.sdh_soc_observers*))" address_symbol="__start_sdh_soc_observers" end_symbol="__stop_sdh_soc_observers" />
        <ProgramSection alignment="4" keep="Yes" load="No" name=".nrf_sections" address_symbol="__start_nrf_sections" />
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".log_dynamic_data"  inputsections="*(SORT(.log_dynamic_data*))" runin=".log_dynamic_data_run"/>
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".log_filter_data"  inputsections="*(SORT(.log_filter_data*))" runin=".log_filter_data_run"/>
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".fs_data"  inputsections="*(.fs_data*)" runin=".fs_data_run"/>
        <ProgramSection alignment="4" load="Yes" name=".dtors" />
        <ProgramSection alignment="4" load="Yes" name=".ctors" />
        <ProgramSection alignment="4" load="Yes" name=".rodata" />
        <ProgramSection alignment="4" load="Yes" name=".ARM.exidx" address_symbol="__exidx_start" end_symbol="__exidx_end" />
        <ProgramSection alignment="4" load="Yes" runin=".fast_run" name=".fast" />
        <ProgramSection alignment="4" load="Yes" runin=".data_run" name=".data" />
        <ProgramSection alignment="4" load="Yes" runin=".tdata_run" name=".tdata" />
        <ProgramSection alignment="4" keep="Yes" load="No" name=".mbr_params_page" address_symbol="__start_mbr_params_page" end_symbol="__stop_mbr_params_page" start = "0x000FE000" size="0x1000" />
        <ProgramSection alignment="4" keep="Yes" load="No" name=".bootloader_settings_page" address_symbol="__start_bootloader_settings_page" end_symbol="__stop_bootloader_settings_page" start = "0x000FF000" size="0x1000" />
      </MemorySegment>
      <MemorySegment name="RAM1" start="$(RAM_PH_START)" size="$(RAM_PH_SIZE)">
        <ProgramSection load="no" name=".reserved_ram" start="$(RAM_PH_START)" size="$(RAM_START)-$(RAM_PH_START)" />
        <ProgramSection alignment="0x100" load="No" name=".vectors_ram" start="$(RAM_START)" address_symbol="__app_ram_start__"/>
        <ProgramSection alignment="4" keep="Yes" load="No" name=".nrf_sections_run" address_symbol="__start_nrf_sections_run" />
        <ProgramSection alignment="4" keep="Yes" load="No" name=".log_dynamic_data_run" address_symbol="__start_log_dynamic_data" end_symbol="__stop_log_dynamic_data" />
        <ProgramSection alignment="4" keep="Yes" load="No" name=".log_filter_data_run" address_symbol="__start_log_filter_data" end_symbol="__stop_log_filter_data" />
        <ProgramSection alignment="4" keep="Yes" load="No" name=".fs_data_run" address_symbol="__start_fs_data" end_symbol="__stop_fs_data" />
        <ProgramSection alignment="4" keep="Yes" load="No" name=".nrf_sections_run_end" address_symbol="__end_nrf_sections_run" />
        <ProgramSection alignment="4" load="No" name=".fast_run" />
        <ProgramSection alignment="4" load="No" name=".data_run" />
        <ProgramSection alignment="4" load="No" name=".tdata_run" />
        <ProgramSection alignment="4" load="No" name=".bss" />
        <ProgramSection alignment="4" load="No" name=".tbss" />
        <ProgramSection alignment="4" load="No" name=".non_init" />
        <ProgramSection alignment="4" size="__HEAPSIZE__" load="No" name=".heap" />
        <ProgramSection alignment="8" size="__STACKSIZE__" load="No" place_from_segment_end="Yes" name=".stack"  address_symbol="__StackLimit" end_symbol="__StackTop"/>
        <ProgramSection alignment="8" size="__STACKSIZE_PROCESS__" load="No" name=".stack_process" />
      </MemorySegment>
      <MemorySegment name="uicr_bootloader_start_address" start="0x10001014" size="0x4">
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".uicr_bootloader_start_address" address_symbol="__start_uicr_bootloader_start_address" end_symbol="__stop_uicr_bootloader_start_address" start = "0x10001014" size="0x4" />
      </MemorySegment>
      <MemorySegment name="uicr_mbr_params_page" start="0x10001018" size="0x4">
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".uicr_mbr_params_page" address_symbol="__start_uicr_mbr_params_page" end_symbol="__stop_uicr_mbr_params_page" start = "0x10001018" size="0x4" />
      </MemorySegment>
    </Root>
    

  • Problem for the compiler error was the following:

    I had to use the 2 variales as extern in the QSPI part.

    Now I'm testing and check the features of the Nordic original BLE DFU and also teh QSPI functions. There the crypto cehck is not included but this I will add from the BLE DFU Bootloader.

    extern nrf_dfu_settings_t s_dfu_settings;
    extern uint8_t m_dfu_settings_buffer[CODE_PAGE_SIZE];

Related