CONFIG_FLASH_LOAD_OFFSET not respected in v2.8.0?

We have been porting from v2.5.3 to v2.8.0.  So far the only thing that we've had to change has been the board files, but one thing that was noticed is that the CONFIG_FLASH_LOAD_OFFSET offset we use, typically our value of 0xC000, is not being respected and the project is being located at hex 0x0000.  This is going to prevent us from using v2.8.0 until it is resolved because we cannot use our NRF5 bootloader.

Has anyone else seen this issue so far?

  • Thank you for your answer.  I have tried that method with the following changes in the Kconfig and Kconfig.defconfig, but it now only starts at 0x00001000 instead of the 0x0000C000 that I would have expected.

    At the end of my prj.conf file I have this line.
    CONFIG_FLASH_LOAD_OFFSET=0xC000

    I'm definitely seeing it offset by 0x1000, but I have no idea where that is actually being set, it should be 0xC000 as best I can tell.

    I have attached the Kconfig and Kconfig.defconfig in case I'm doing something obviously wrong.  Both have had .txt added to the end to automatically show in the post, and the forum requires file extensions.

    if BOARD_NRF52840
    
    config BOARD_HAS_NRF5_BOOTLOADER
    	bool "Board has nRF5 bootloader"
    	default y
    	help
    	  If selected, applications are linked so that they can be loaded by Nordic
    	  nRF5 bootloader.
    
    endif # BOARD_NRF52840
    if BOARD_NRF52840
    
    # To let the nRF5 bootloader load an application, the application
    # must be linked after Nordic MBR, that is factory-programmed on the board.
    
    # Nordic nRF5 bootloader exists outside of the partitions specified in the
    # DTS file, so we manually override FLASH_LOAD_OFFSET to link the application
    # correctly, after Nordic MBR.
    
    # When building MCUBoot, MCUBoot itself will select USE_DT_CODE_PARTITION
    # which will make it link into the correct partition specified in DTS file,
    # the offset is applied here so that the full partition size can be used when
    # the bootloader Kconfig option has been disabled.
    
    config FLASH_LOAD_OFFSET
    	default 0xC000
    	depends on BOARD_HAS_NRF5_BOOTLOADER && (MCUBOOT || !USE_DT_CODE_PARTITION)
    
    config BT_CTLR
    	default BT
    
    endif # BOARD_NRF52840

  • Check the .config file in your build folder, and check what CONFIG_FLASH_LOAD_OFFSET is being set to there.

  • It is not set there at all, but it does get offset to 0x1000.

    SB_CONFIG_BOARD="nrf52840"
    SB_CONFIG_BOARD_REVISION=""
    SB_CONFIG_BOARD_NRF52840=y
    SB_CONFIG_BOARD_NRF52840_NRF52840=y
    SB_CONFIG_BOARD_QUALIFIERS="nrf52840"
    SB_CONFIG_SOC="nrf52840"
    SB_CONFIG_SOC_SERIES="nrf52"
    SB_CONFIG_SOC_FAMILY="nordic_nrf"
    SB_CONFIG_SOC_FAMILY_NORDIC_NRF=y
    SB_CONFIG_SOC_SERIES_NRF52X=y
    SB_CONFIG_SOC_NRF52840=y
    SB_CONFIG_SOC_NRF52840_QIAA=y
    
    #
    # Sysbuild image configuration
    #
    
    #
    # Modules
    #
    
    #
    # Available modules.
    #
    
    #
    # nrf (C:/ncs/v2.8.0/nrf)
    #
    SB_CONFIG_PARTITION_MANAGER=y
    # SB_CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK is not set
    SB_CONFIG_BUILD_OUTPUT_BIN=y
    SB_CONFIG_BUILD_OUTPUT_HEX=y
    SB_CONFIG_APPCORE_REMOTE_BOARD_TARGET_CPUCLUSTER="cpuapp"
    SB_CONFIG_APPCORE_REMOTE_DOMAIN="CPUAPP"
    
    #
    # Secure Bootloader
    #
    # SB_CONFIG_SECURE_BOOT_APPCORE is not set
    # end of Secure Bootloader
    
    SB_CONFIG_SUPPORT_QSPI_XIP=y
    # SB_CONFIG_BT_FAST_PAIR is not set
    # SB_CONFIG_MATTER is not set
    
    #
    # Wi-Fi
    #
    # SB_CONFIG_WIFI_NRF70 is not set
    # end of Wi-Fi
    
    #
    # SUIT
    #
    # SB_CONFIG_SUIT_ENVELOPE is not set
    # SB_CONFIG_SUIT_BUILD_RECOVERY is not set
    # SB_CONFIG_SUIT_BUILD_FLASH_COMPANION is not set
    # end of SUIT
    
    #
    # SDP
    #
    # SB_CONFIG_SDP is not set
    # end of SDP
    
    # SB_CONFIG_APPROTECT_USE_UICR is not set
    # SB_CONFIG_APPROTECT_LOCK is not set
    SB_CONFIG_APPROTECT_NO_SYSBUILD=y
    SB_CONFIG_ZEPHYR_NRF_MODULE=y
    # end of nrf (C:/ncs/v2.8.0/nrf)
    
    SB_CONFIG_ZEPHYR_MCUBOOT_MODULE=y
    SB_CONFIG_ZEPHYR_MBEDTLS_MODULE=y
    SB_CONFIG_ZEPHYR_OBERON_PSA_CRYPTO_MODULE=y
    SB_CONFIG_ZEPHYR_TRUSTED_FIRMWARE_M_MODULE=y
    SB_CONFIG_ZEPHYR_PSA_ARCH_TESTS_MODULE=y
    SB_CONFIG_ZEPHYR_SOC_HWMV1_MODULE=y
    SB_CONFIG_ZEPHYR_CJSON_MODULE=y
    SB_CONFIG_ZEPHYR_AZURE_SDK_FOR_C_MODULE=y
    SB_CONFIG_ZEPHYR_CIRRUS_LOGIC_MODULE=y
    SB_CONFIG_ZEPHYR_OPENTHREAD_MODULE=y
    SB_CONFIG_ZEPHYR_SUIT_GENERATOR_MODULE=y
    SB_CONFIG_ZEPHYR_SUIT_PROCESSOR_MODULE=y
    SB_CONFIG_ZEPHYR_MEMFAULT_FIRMWARE_SDK_MODULE=y
    SB_CONFIG_ZEPHYR_COREMARK_MODULE=y
    SB_CONFIG_ZEPHYR_CANOPENNODE_MODULE=y
    SB_CONFIG_ZEPHYR_CHRE_MODULE=y
    SB_CONFIG_ZEPHYR_LZ4_MODULE=y
    SB_CONFIG_ZEPHYR_NANOPB_MODULE=y
    SB_CONFIG_ZEPHYR_TF_M_TESTS_MODULE=y
    SB_CONFIG_ZEPHYR_ZSCILIB_MODULE=y
    SB_CONFIG_ZEPHYR_CMSIS_MODULE=y
    SB_CONFIG_ZEPHYR_CMSIS_DSP_MODULE=y
    SB_CONFIG_ZEPHYR_CMSIS_NN_MODULE=y
    SB_CONFIG_ZEPHYR_FATFS_MODULE=y
    SB_CONFIG_ZEPHYR_HAL_NORDIC_MODULE=y
    SB_CONFIG_ZEPHYR_HAL_ST_MODULE=y
    SB_CONFIG_ZEPHYR_HAL_WURTHELEKTRONIK_MODULE=y
    SB_CONFIG_ZEPHYR_HOSTAP_MODULE=y
    SB_CONFIG_ZEPHYR_LIBMETAL_MODULE=y
    SB_CONFIG_ZEPHYR_LIBLC3_MODULE=y
    SB_CONFIG_ZEPHYR_LITTLEFS_MODULE=y
    SB_CONFIG_ZEPHYR_LORAMAC_NODE_MODULE=y
    SB_CONFIG_ZEPHYR_LVGL_MODULE=y
    SB_CONFIG_ZEPHYR_MIPI_SYS_T_MODULE=y
    SB_CONFIG_ZEPHYR_NRF_HW_MODELS_MODULE=y
    SB_CONFIG_ZEPHYR_OPEN_AMP_MODULE=y
    SB_CONFIG_ZEPHYR_PICOLIBC_MODULE=y
    SB_CONFIG_ZEPHYR_SEGGER_MODULE=y
    SB_CONFIG_ZEPHYR_TINYCRYPT_MODULE=y
    SB_CONFIG_ZEPHYR_UOSCORE_UEDHOC_MODULE=y
    SB_CONFIG_ZEPHYR_ZCBOR_MODULE=y
    SB_CONFIG_ZEPHYR_NRFXLIB_MODULE=y
    SB_CONFIG_ZEPHYR_CONNECTEDHOMEIP_MODULE=y
    
    #
    # Unavailable modules, please install those via the project manifest.
    #
    # end of Modules
    
    # SB_CONFIG_WARN_EXPERIMENTAL is not set
    SB_CONFIG_WARN_DEPRECATED=y
    SB_CONFIG_SUPPORT_BOOTLOADER=y
    SB_CONFIG_SUPPORT_BOOTLOADER_MCUBOOT_ZEPHYR=y
    SB_CONFIG_BOOTLOADER_NONE=y
    # SB_CONFIG_BOOTLOADER_MCUBOOT is not set
    
    #
    # Build options
    #
    # SB_CONFIG_COMPILER_WARNINGS_AS_ERRORS is not set
    # end of Build options
    

  • Check the .config that is located in build_folder\<application_name>\zephyr

Related