Does not have enough internal flash memory on nrf5340DK + nrf7002EK to have an application that has an immutable bootloader, mcuboot as platform bootloader and a wifi example code. How to resolve this issue.

Hi,

I am using an nrf5340DK + nrf7002EK. i am able to run an example helloworld application with an immutable bootloader and mcuboot as platform bootloader. When i try to add the wifi code, im getting an error stating that the internal flash doesnt have enough memory to run the application, which is understandable. So i tried to have XIP enabled. What i see here from the memory report is that ncs folder is consuming a lot of space. Is there a way where i can relocate the entire application code and ncs code to the external flash and run the application?

This is my prj.conf. I have disabled the wifi related code for now. its just the XIP and Bootloader code that is enabled

###################################### BOOTLOADERS ######################################
# Print a banner on the UART on startup.
CONFIG_BOOT_BANNER=y

# Enable console and printk()
CONFIG_PRINTK=y
CONFIG_STDOUT_CONSOLE=y

# Enable Zephyr application to be booted by MCUboot
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_SECURE_BOOT=y
# CONFIG_FLASH_LOAD_OFFSET=0x00000000
# CONFIG_FLASH_LOAD_SIZE=0x800000  # Full external flash size

# Use the default MCUBoot PEM key file (BOOT_SIGNATURE_KEY_FILE)
CONFIG_MCUBOOT_SIGNATURE_KEY_FILE="bootloader/mcuboot/root-rsa-2048.pem"

# Enable SPI NOR driver
# CONFIG_SPI=y
# CONFIG_FLASH=y
# CONFIG_SPI_NOR=y

# Use external flash for application slots
# CONFIG_PM_EXTERNAL_FLASH=y
###################################### XIP ######################################

CONFIG_CODE_DATA_RELOCATION=y
CONFIG_HAVE_CUSTOM_LINKER_SCRIPT=y
CONFIG_CUSTOM_LINKER_SCRIPT="xip_ext_flash.ld"
CONFIG_BUILD_NO_GAP_FILL=y
CONFIG_XIP=y
CONFIG_NORDIC_QSPI_NOR_XIP=y
CONFIG_FLASH_INIT_PRIORITY=40
CONFIG_NRF_WIFI_PATCHES_EXT_FLASH_XIP=n # This DISABLES XIP after its done loading the nRF7002 (BAD, need to fix!!!)
# Enable caching for improved performance
# CONFIG_NORDIC_QSPI_NOR_FLASH_CACHE=y
# # Enable relocation of driver code to external flash
# CONFIG_CODE_PARTITION=y
# CONFIG_PM_EXTERNAL_FLASH=y
# # Reduce internal flash usage
# CONFIG_DRIVERS_FLASH_EXTENDED=y
# CONFIG_WIFI_NRF700X_BUS_LOG_LEVEL_OFF=y # Makes the NRF700X driver able to be relocated to XIP? (still seems to have runtime issues)


# ###################################### WIFI ######################################
# CONFIG_WIFI=y
# CONFIG_WIFI_NRF70=y

# # WPA supplicant
# CONFIG_WIFI_NM_WPA_SUPPLICANT=y
# CONFIG_WIFI_READY_LIB=y
# CONFIG_NRF_WIFI_RPU_RECOVERY=y

# CONFIG_WIFI_MGMT_EXT=y
# CONFIG_WIFI_CREDENTIALS=y
# CONFIG_WIFI_CREDENTIALS_STATIC=y
# CONFIG_WIFI_CREDENTIALS_STATIC_SSID="ArjunKariat"
# CONFIG_WIFI_CREDENTIALS_STATIC_PASSWORD="kariat2018"

# # Networking
# CONFIG_NETWORKING=y
# CONFIG_NET_SOCKETS=y
# CONFIG_NET_LOG=y
# CONFIG_NET_IPV4=y
# CONFIG_NET_UDP=y
# CONFIG_NET_TCP=y
# CONFIG_NET_DHCPV4=y

# CONFIG_NET_PKT_RX_COUNT=8
# CONFIG_NET_PKT_TX_COUNT=8

# # Below section is the primary contributor to SRAM and is currently
# # tuned for performance, but this will be revisited in the future.
# CONFIG_NET_BUF_RX_COUNT=8
# CONFIG_NET_BUF_TX_COUNT=16
# CONFIG_NRF70_RX_NUM_BUFS=16
# CONFIG_HEAP_MEM_POOL_SIZE=120000
# CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y
# CONFIG_NET_TC_TX_COUNT=1

# CONFIG_NET_IF_UNICAST_IPV4_ADDR_COUNT=1
# CONFIG_NET_MAX_CONTEXTS=5
# CONFIG_NET_CONTEXT_SYNC_RECV=y

# CONFIG_INIT_STACKS=y

# CONFIG_NET_L2_ETHERNET=y

# CONFIG_NET_CONFIG_SETTINGS=y
# CONFIG_NET_CONFIG_INIT_TIMEOUT=0

# CONFIG_NET_SOCKETS_POLL_MAX=10

# # Memories
# CONFIG_MAIN_STACK_SIZE=5200
# CONFIG_NET_TX_STACK_SIZE=4096
# CONFIG_NET_RX_STACK_SIZE=4096
# CONFIG_STA_SAMPLE_START_WIFI_THREAD_STACK_SIZE=5200

# # Debugging
# CONFIG_STACK_SENTINEL=y
# CONFIG_DEBUG_COREDUMP=y
# CONFIG_DEBUG_COREDUMP_BACKEND_LOGGING=y
# CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_MIN=y
# CONFIG_SHELL_CMDS_RESIZE=n


# # Kernel options
# CONFIG_ENTROPY_GENERATOR=y

# # Logging
# CONFIG_LOG=y
# CONFIG_LOG_BUFFER_SIZE=2048
# CONFIG_POSIX_CLOCK=y

# CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.168.1.99"
# CONFIG_NET_CONFIG_MY_IPV4_NETMASK="255.255.255.0"
# CONFIG_NET_CONFIG_MY_IPV4_GW="192.168.1.1"

# # printing of scan results puts pressure on queues in new locking
# # design in net_mgmt. So, use a higher timeout for a crowded
# # environment.
# CONFIG_NET_MGMT_EVENT_QUEUE_TIMEOUT=5000

This is my CMakeFile

# Top-level CMakeLists.txt for the skeleton application.
#
# Copyright (c) 2017 Open Source Foundries Limited
# Copyright (c) 2018 Foundries.io Ltd
#
# SPDX-License-Identifier: Apache-2.0
#
# This provides a basic application structure suitable for loading by
# mcuboot, which is easy to customize on a per-board basis. It can be
# used as a starting point for new applications.

cmake_minimum_required(VERSION 3.8)

# find_package(Zephyr) in order to load application boilerplate:
# https://docs.zephyrproject.org/latest/develop/application/index.html
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(Test)

# This string ends up getting printed in the device console
if (NOT DEFINED FROM_WHO)
  set(FROM_WHO Zephyr)
endif()

target_compile_definitions(app PRIVATE "-DMCUBOOT_HELLO_WORLD_FROM=\"${FROM_WHO}\"")

target_sources(app PRIVATE src/main.c)
# target_sources(app PRIVATE src/wifi_manager.c)

# Modules moved to XIP area in external flash
zephyr_code_relocate(FILES src/main.c LOCATION EXTFLASH)
# zephyr_code_relocate(FILES src/wifi_manager.c LOCATION EXTFLASH)
# zephyr_code_relocate(LIBRARY drivers__wifi LOCATION EXTFLASH)

Screenshot of the memory report

This is the code.

/cfs-file/__key/communityserver-discussions-components-files/4/1586.Test.zip

Parents
  • Hello,

    I tried building your sample with the extra CMake argument you mentioned, and I was able to build it successfully, though with some warnings. I am sharing the build logs I obtained.

    Kind regards,
    Abhijith

    Executing task: nRF Connect: Generate config nrf5340dk/nrf5340/cpuapp for c:\ncs\v2.9.0\case_338727 
    
    Building case_338727
    C:\WINDOWS\system32\cmd.exe /d /s /c "west build --build-dir c:/ncs/v2.9.0/case_338727/build_1 c:/ncs/v2.9.0/case_338727 --pristine --board nrf5340dk/nrf5340/cpuapp --sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE -DSHIELD=nrf7002ek -DBOARD_ROOT=c:/ncs/v2.9.0/nrf/samples/cellular/modem_shell;c:/ncs/v2.9.0/case_338727"
    
    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: C:/ncs/toolchains/ce3b5ff664/opt/bin/python.exe (found suitable version "3.9.13", minimum required is "3.8") found components: Interpreter 
    -- Cache files will be written to: C:/ncs/v2.9.0/zephyr/.cache
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf5340dk, qualifiers: nrf5340/cpuapp
    -- Shield(s): nrf7002ek
    Parsing C:/ncs/v2.9.0/zephyr/share/sysbuild/Kconfig
    Loaded configuration 'C:/ncs/v2.9.0/case_338727/build_1/_sysbuild/empty.conf'
    Merged configuration 'C:/ncs/v2.9.0/case_338727/build_1/_sysbuild/empty.conf'
    Configuration saved to 'C:/ncs/v2.9.0/case_338727/build_1/zephyr/.config'
    Kconfig header saved to 'C:/ncs/v2.9.0/case_338727/build_1/_sysbuild/autoconf.h'
    -- 
       *********************************
       * Running CMake for case_338727 *
       *********************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/ncs/v2.9.0/case_338727
    -- CMake version: 3.21.0
    -- Found Python3: C:/ncs/toolchains/ce3b5ff664/opt/bin/python.exe (found suitable version "3.9.13", minimum required is "3.8") found components: Interpreter 
    -- Cache files will be written to: C:/ncs/v2.9.0/zephyr/.cache
    -- Zephyr version: 3.7.99 (C:/ncs/v2.9.0/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf5340dk, qualifiers: nrf5340/cpuapp
    -- Shield(s): nrf7002ek
    -- Found host-tools: zephyr 0.16.5 (C:/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (C:/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/ce3b5ff664/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: C:/ncs/v2.9.0/zephyr/boards/nordic/nrf5340dk/nrf5340dk_nrf5340_cpuapp.dts
    -- Found devicetree overlay: C:/ncs/v2.9.0/zephyr/boards/shields/nrf7002ek/nrf7002ek.overlay
    -- Found devicetree overlay: C:/ncs/v2.9.0/zephyr/boards/shields/nrf7002ek/boards/nrf5340dk_nrf5340_cpuapp.overlay
    -- Generated zephyr.dts: C:/ncs/v2.9.0/case_338727/build_1/case_338727/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/ncs/v2.9.0/case_338727/build_1/case_338727/zephyr/include/generated/zephyr/devicetree_generated.h
    -- Including generated dts.cmake file: C:/ncs/v2.9.0/case_338727/build_1/case_338727/zephyr/dts.cmake
    
    warning: FLASH_INIT_PRIORITY (defined at
    C:/ncs/v2.9.0/zephyr/soc/ite/ec\it8xxx2\Kconfig.defconfig.series:22, drivers/flash/Kconfig:158) was
    assigned the value '40' but got the value ''. Check these unsatisfied dependencies:
    ((SOC_SERIES_IT8XXX2 && SOC_FAMILY_ITE_EC) || FLASH) (=n). See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_FLASH_INIT_PRIORITY and/or look up
    FLASH_INIT_PRIORITY in the menuconfig/guiconfig interface. The Application Development Primer,
    Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
    helpful too.
    
    
    warning: BOOT_BANNER (defined at kernel/Kconfig:441) was assigned the value 'y' but got the value
    'n'. Check these unsatisfied dependencies: (!NCS_BOOT_BANNER) (=n). See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BOOT_BANNER and/or look up BOOT_BANNER in
    the menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration
    Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful too.
    
    
    warning: NORDIC_QSPI_NOR_XIP (defined at drivers/flash/Kconfig.nordic_qspi_nor:45) was assigned the
    value 'y' but got the value 'n'. Check these unsatisfied dependencies: NORDIC_QSPI_NOR (=n), FLASH
    (=n). See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_NORDIC_QSPI_NOR_XIP and/or look
    up NORDIC_QSPI_NOR_XIP in the menuconfig/guiconfig interface. The Application Development Primer,
    Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
    helpful too.
    
    
    warning: Deprecated symbol BUILD_NO_GAP_FILL is enabled.
    
    Parsing C:/ncs/v2.9.0/case_338727/Kconfig
    Loaded configuration 'C:/ncs/v2.9.0/zephyr/boards/nordic/nrf5340dk/nrf5340dk_nrf5340_cpuapp_defconfig'
    Merged configuration 'C:/ncs/v2.9.0/case_338727/prj.conf'
    Merged configuration 'C:/ncs/v2.9.0/case_338727/build_1/case_338727/zephyr/.config.sysbuild'
    Configuration saved to 'C:/ncs/v2.9.0/case_338727/build_1/case_338727/zephyr/.config'
    Kconfig header saved to 'C:/ncs/v2.9.0/case_338727/build_1/case_338727/zephyr/include/generated/zephyr/autoconf.h'
    -- Found GnuLd: c:/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38") 
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Setting build type to 'MinSizeRel' as none was specified.
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/ncs/v2.9.0/case_338727/build_1/case_338727
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/ncs/v2.9.0/case_338727/build_1
    -- west build: building application
    [4/148] Generating include/generated/zephyr/version.h
    -- Zephyr version: 3.7.99 (C:/ncs/v2.9.0/zephyr), build: v3.7.99-ncs2
    [148/148] Linking C executable zephyr\zephyr.elf
    Memory region         Used Size  Region Size  %age Used
            EXTFLASH:          96 B        64 MB      0.00%
               FLASH:       23412 B         1 MB      2.23%
                 RAM:        6416 B       448 KB      1.40%
            IDT_LIST:          0 GB        32 KB      0.00%
    Generating files from C:/ncs/v2.9.0/case_338727/build_1/case_338727/zephyr/zephyr.elf for board: nrf5340dk
    [10/10] Generating ../merged.hex
     *  Terminal will be reused by tasks, press any key to close it. 
    

Reply
  • Hello,

    I tried building your sample with the extra CMake argument you mentioned, and I was able to build it successfully, though with some warnings. I am sharing the build logs I obtained.

    Kind regards,
    Abhijith

    Executing task: nRF Connect: Generate config nrf5340dk/nrf5340/cpuapp for c:\ncs\v2.9.0\case_338727 
    
    Building case_338727
    C:\WINDOWS\system32\cmd.exe /d /s /c "west build --build-dir c:/ncs/v2.9.0/case_338727/build_1 c:/ncs/v2.9.0/case_338727 --pristine --board nrf5340dk/nrf5340/cpuapp --sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE -DSHIELD=nrf7002ek -DBOARD_ROOT=c:/ncs/v2.9.0/nrf/samples/cellular/modem_shell;c:/ncs/v2.9.0/case_338727"
    
    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: C:/ncs/toolchains/ce3b5ff664/opt/bin/python.exe (found suitable version "3.9.13", minimum required is "3.8") found components: Interpreter 
    -- Cache files will be written to: C:/ncs/v2.9.0/zephyr/.cache
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf5340dk, qualifiers: nrf5340/cpuapp
    -- Shield(s): nrf7002ek
    Parsing C:/ncs/v2.9.0/zephyr/share/sysbuild/Kconfig
    Loaded configuration 'C:/ncs/v2.9.0/case_338727/build_1/_sysbuild/empty.conf'
    Merged configuration 'C:/ncs/v2.9.0/case_338727/build_1/_sysbuild/empty.conf'
    Configuration saved to 'C:/ncs/v2.9.0/case_338727/build_1/zephyr/.config'
    Kconfig header saved to 'C:/ncs/v2.9.0/case_338727/build_1/_sysbuild/autoconf.h'
    -- 
       *********************************
       * Running CMake for case_338727 *
       *********************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/ncs/v2.9.0/case_338727
    -- CMake version: 3.21.0
    -- Found Python3: C:/ncs/toolchains/ce3b5ff664/opt/bin/python.exe (found suitable version "3.9.13", minimum required is "3.8") found components: Interpreter 
    -- Cache files will be written to: C:/ncs/v2.9.0/zephyr/.cache
    -- Zephyr version: 3.7.99 (C:/ncs/v2.9.0/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf5340dk, qualifiers: nrf5340/cpuapp
    -- Shield(s): nrf7002ek
    -- Found host-tools: zephyr 0.16.5 (C:/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (C:/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/ce3b5ff664/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: C:/ncs/v2.9.0/zephyr/boards/nordic/nrf5340dk/nrf5340dk_nrf5340_cpuapp.dts
    -- Found devicetree overlay: C:/ncs/v2.9.0/zephyr/boards/shields/nrf7002ek/nrf7002ek.overlay
    -- Found devicetree overlay: C:/ncs/v2.9.0/zephyr/boards/shields/nrf7002ek/boards/nrf5340dk_nrf5340_cpuapp.overlay
    -- Generated zephyr.dts: C:/ncs/v2.9.0/case_338727/build_1/case_338727/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/ncs/v2.9.0/case_338727/build_1/case_338727/zephyr/include/generated/zephyr/devicetree_generated.h
    -- Including generated dts.cmake file: C:/ncs/v2.9.0/case_338727/build_1/case_338727/zephyr/dts.cmake
    
    warning: FLASH_INIT_PRIORITY (defined at
    C:/ncs/v2.9.0/zephyr/soc/ite/ec\it8xxx2\Kconfig.defconfig.series:22, drivers/flash/Kconfig:158) was
    assigned the value '40' but got the value ''. Check these unsatisfied dependencies:
    ((SOC_SERIES_IT8XXX2 && SOC_FAMILY_ITE_EC) || FLASH) (=n). See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_FLASH_INIT_PRIORITY and/or look up
    FLASH_INIT_PRIORITY in the menuconfig/guiconfig interface. The Application Development Primer,
    Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
    helpful too.
    
    
    warning: BOOT_BANNER (defined at kernel/Kconfig:441) was assigned the value 'y' but got the value
    'n'. Check these unsatisfied dependencies: (!NCS_BOOT_BANNER) (=n). See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BOOT_BANNER and/or look up BOOT_BANNER in
    the menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration
    Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful too.
    
    
    warning: NORDIC_QSPI_NOR_XIP (defined at drivers/flash/Kconfig.nordic_qspi_nor:45) was assigned the
    value 'y' but got the value 'n'. Check these unsatisfied dependencies: NORDIC_QSPI_NOR (=n), FLASH
    (=n). See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_NORDIC_QSPI_NOR_XIP and/or look
    up NORDIC_QSPI_NOR_XIP in the menuconfig/guiconfig interface. The Application Development Primer,
    Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
    helpful too.
    
    
    warning: Deprecated symbol BUILD_NO_GAP_FILL is enabled.
    
    Parsing C:/ncs/v2.9.0/case_338727/Kconfig
    Loaded configuration 'C:/ncs/v2.9.0/zephyr/boards/nordic/nrf5340dk/nrf5340dk_nrf5340_cpuapp_defconfig'
    Merged configuration 'C:/ncs/v2.9.0/case_338727/prj.conf'
    Merged configuration 'C:/ncs/v2.9.0/case_338727/build_1/case_338727/zephyr/.config.sysbuild'
    Configuration saved to 'C:/ncs/v2.9.0/case_338727/build_1/case_338727/zephyr/.config'
    Kconfig header saved to 'C:/ncs/v2.9.0/case_338727/build_1/case_338727/zephyr/include/generated/zephyr/autoconf.h'
    -- Found GnuLd: c:/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38") 
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Setting build type to 'MinSizeRel' as none was specified.
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/ncs/v2.9.0/case_338727/build_1/case_338727
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/ncs/v2.9.0/case_338727/build_1
    -- west build: building application
    [4/148] Generating include/generated/zephyr/version.h
    -- Zephyr version: 3.7.99 (C:/ncs/v2.9.0/zephyr), build: v3.7.99-ncs2
    [148/148] Linking C executable zephyr\zephyr.elf
    Memory region         Used Size  Region Size  %age Used
            EXTFLASH:          96 B        64 MB      0.00%
               FLASH:       23412 B         1 MB      2.23%
                 RAM:        6416 B       448 KB      1.40%
            IDT_LIST:          0 GB        32 KB      0.00%
    Generating files from C:/ncs/v2.9.0/case_338727/build_1/case_338727/zephyr/zephyr.elf for board: nrf5340dk
    [10/10] Generating ../merged.hex
     *  Terminal will be reused by tasks, press any key to close it. 
    

Children
  • Hi Arjun,

    I am filling in for Abhijith a little while he is out of office.

    Are you certain you are building the same project you attached in the opening post?

    I also tried it, and it built just fine.

    PS C:\_w\c\c338727_build_issue\Test> west build -b nrf5340dk/nrf5340/cpuapp -- -DSHIELD="nrf7002ek"
    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base (cached)): sysbuild_default
    -- Cache files will be written to: C:/ncs/v2.9.0/zephyr/.cache
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf5340dk, qualifiers: nrf5340/cpuapp
    -- Shield(s): nrf7002ek
    Parsing C:/ncs/v2.9.0/zephyr/share/sysbuild/Kconfig
    Loaded configuration 'C:/_w/c/c338727_build_issue/Test/build/_sysbuild/empty.conf'
    Merged configuration 'C:/_w/c/c338727_build_issue/Test/build/_sysbuild/empty.conf'
    Configuration saved to 'C:/_w/c/c338727_build_issue/Test/build/zephyr/.config'
    Kconfig header saved to 'C:/_w/c/c338727_build_issue/Test/build/_sysbuild/autoconf.h'
    -- 
       **************************
       * Running CMake for Test *
       **************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/_w/c/c338727_build_issue/Test
    -- CMake version: 3.21.0
    -- Using NCS Toolchain 2.8.20241119.782234748775 for building. (C:/ncs/toolchains/b620d30767/cmake)
    -- Found Python3: C:/ncs/toolchains/b620d30767/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.8") found components: Interpreter 
    -- Cache files will be written to: C:/ncs/v2.9.0/zephyr/.cache
    -- Zephyr version: 3.7.99 (C:/ncs/v2.9.0/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf5340dk, qualifiers: nrf5340/cpuapp
    -- Shield(s): nrf7002ek
    -- Found host-tools: zephyr 0.17.0 (C:/ncs/toolchains/b620d30767/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.17.0 (C:/ncs/toolchains/b620d30767/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/b620d30767/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: C:/ncs/v2.9.0/zephyr/boards/nordic/nrf5340dk/nrf5340dk_nrf5340_cpuapp.dts
    -- Found devicetree overlay: C:/ncs/v2.9.0/zephyr/boards/shields/nrf7002ek/nrf7002ek.overlay
    -- Found devicetree overlay: C:/ncs/v2.9.0/zephyr/boards/shields/nrf7002ek/boards/nrf5340dk_nrf5340_cpuapp.overlay
    -- Generated zephyr.dts: C:/_w/c/c338727_build_issue/Test/build/Test/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/_w/c/c338727_build_issue/Test/build/Test/zephyr/include/generated/zephyr/devicetree_generated.h
    -- Including generated dts.cmake file: C:/_w/c/c338727_build_issue/Test/build/Test/zephyr/dts.cmake
    
    warning: FLASH_INIT_PRIORITY (defined at
    C:/ncs/v2.9.0/zephyr/soc/ite/ec\it8xxx2\Kconfig.defconfig.series:22, drivers/flash/Kconfig:158) was
    assigned the value '40' but got the value ''. Check these unsatisfied dependencies:
    ((SOC_SERIES_IT8XXX2 && SOC_FAMILY_ITE_EC) || FLASH) (=n). See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_FLASH_INIT_PRIORITY and/or look up
    FLASH_INIT_PRIORITY in the menuconfig/guiconfig interface. The Application Development Primer,
    Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
    helpful too.
    
    
    warning: BOOT_BANNER (defined at kernel/Kconfig:441) was assigned the value 'y' but got the value
    'n'. Check these unsatisfied dependencies: (!NCS_BOOT_BANNER) (=n). See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BOOT_BANNER and/or look up BOOT_BANNER in
    the menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration
    Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful too.
    
    
    warning: NORDIC_QSPI_NOR_XIP (defined at drivers/flash/Kconfig.nordic_qspi_nor:45) was assigned the
    value 'y' but got the value 'n'. Check these unsatisfied dependencies: NORDIC_QSPI_NOR (=n), FLASH
    (=n). See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_NORDIC_QSPI_NOR_XIP and/or look
    up NORDIC_QSPI_NOR_XIP in the menuconfig/guiconfig interface. The Application Development Primer,
    Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
    helpful too.
    
    
    warning: Deprecated symbol BUILD_NO_GAP_FILL is enabled.
    
    Parsing C:/_w/c/c338727_build_issue/Test/Kconfig
    Loaded configuration 'C:/ncs/v2.9.0/zephyr/boards/nordic/nrf5340dk/nrf5340dk_nrf5340_cpuapp_defconfig'
    Merged configuration 'C:/_w/c/c338727_build_issue/Test/prj.conf'
    Merged configuration 'C:/_w/c/c338727_build_issue/Test/build/Test/zephyr/.config.sysbuild'
    Configuration saved to 'C:/_w/c/c338727_build_issue/Test/build/Test/zephyr/.config'
    Kconfig header saved to 'C:/_w/c/c338727_build_issue/Test/build/Test/zephyr/include/generated/zephyr/autoconf.h'
    -- Found GnuLd: c:/ncs/toolchains/b620d30767/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38") 
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/b620d30767/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Setting build type to 'MinSizeRel' as none was specified.
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/_w/c/c338727_build_issue/Test/build/Test
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/_w/c/c338727_build_issue/Test/build
    ←[92m-- west build: building application
    [5/10] Performing build step for 'Test'
    [4/148] Generating include/generated/zephyr/version.h
    -- Zephyr version: 3.7.99 (C:/ncs/v2.9.0/zephyr), build: v3.7.99-ncs2
    [148/148] Linking C executable zephyr\zephyr.elf
    Memory region         Used Size  Region Size  %age Used
            EXTFLASH:          96 B        64 MB      0.00%
               FLASH:       23412 B         1 MB      2.23%
                 RAM:        6416 B       448 KB      1.40%
            IDT_LIST:          0 GB        32 KB      0.00%
    Generating files from C:/_w/c/c338727_build_issue/Test/build/Test/zephyr/zephyr.elf for board: nrf5340dk
    [10/10] Generating ../merged.hex
    PS C:\_w\c\c338727_build_issue\Test> 

    Hieu

  • Hey apologies for the delayed response. 

    Im building the same code and still gettting the error i posted in the previous comment. im not sure why.

    This is my build config

    Everything other than the -DSHILED='nrf7002ek' was auto generated

  • Your screenshot also shows that perhaps your nRF Connect extension is outdated. Please update it.

    After that, could you please try to delete that build configuration and create a fresh one?

    If push comes to shove, we might have to consider reinstalling the SDK, but let's try the recommendation above first.

  • I am able to build the code now, but as per my memory report, i cant see the mcuboot secondary in the external flash.

      

Related