Adding NVS in zigbee sample

We are making ZigBee product. The base we have took is from nrf connect sdk samples light_switch and coordniator example. everything works fine but we need to keep some information stored in NVS/flash.

Mainly for device list in network so that we can relate mac and short address and update it when rejoins. so that when coordinator  restarts it has network device list.

Issue we are facing is that when we add nvs sample code it gives error 

*** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
[00:00:00.020,416] <err> flash_nrf: invalid address: 0x00100ff8:8
[00:00:00.037,841] <inf> fs_nvs: 3 Sectors of 4096 bytes
[00:00:00.038,604] <inf> fs_nvs: alloc wra: 0, fe8
[00:00:00.039,306] <inf> fs_nvs: data wra: 0, 0
[00:00:00.040,039] <err> flash_nrf: invalid address: 0x00100ff8:8
No address found, adding 192.168.1.1 at id 1
[00:00:00.041,351] <err> flash_nrf: invalid address: 0x00100ff8:8
[00:00:00.042,236] <err> flash_nrf: invalid address: 0x00100ff8:8
No key found, adding it at id 2

After research found its due to multi build 
The nRF Connect SDK build system enables sysbuild by default, while Zephyr build system does not. You can select the build system default or choose to explicitly use --sysbuild or --no-sysbuild for your build configuration. 

I am not sure how to fix it still
Any suggestion idea will be helpful!

Parents
  • Hi,

     

    Can you share how you are reproducing this issue?

    When altering the partition layout, it is important that you re-generate the build (ie. delete the build folder, then re-configure) - this is to ensure that the partitions are generated within the address space of the chosen device.

    Your address space seems to be out-of-bounds.

     

    Kind regards,

    Håkon

  • Hi Hakon 
    I am not sure where to alter partition layout 
    in nvs example it used to be mentioned in device tree but if have used zigbee samples 
    not able to find where to add nvs partition or if it has then how to modify it 


  • Hi Hakon 

    this worked but partially If I compile same in mac it gives compilation error second_storage undefined

  • Hi,

     

    Dhaval Dalvadi said:
    this worked but partially If I compile same in mac it gives compilation error second_storage undefined

    I am not sure I understand, did the proposed fix work on one machine and not another?

    Can you share a bit more details on what works and what does not ?

     

    Please note that you have to delete your build folder when explicitly creating a new pm_static.yml file.

     

    Kind regards,

    Håkon

  • Hi 
    It worked in windows system but in mac it gives error as mentioned above 

    had already deleted build folder and have confirmed pm_static.yml there with code you have provided and confirmed in windows that it works fine

  • Thank you for explaining.

    Can you share the full output? including the cmake configuration?

     

    It should look similar to this (tested on a macbook):

    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: /Library/Developer/CommandLineTools/usr/bin/python3 (found suitable version "3.9.6", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: /Users/hkn/Library/Caches/zephyr
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf52840dk, qualifiers: nrf52840
    Parsing /opt/ncs/nrf/samples/zigbee/light_bulb/Kconfig.sysbuild
    Loaded configuration '/opt/ncs/nrf/samples/zigbee/light_bulb/build/_sysbuild/empty.conf'
    Merged configuration '/opt/ncs/nrf/samples/zigbee/light_bulb/build/_sysbuild/empty.conf'
    Configuration saved to '/opt/ncs/nrf/samples/zigbee/light_bulb/build/zephyr/.config'
    Kconfig header saved to '/opt/ncs/nrf/samples/zigbee/light_bulb/build/_sysbuild/autoconf.h'
    -- 
       ********************************
       * Running CMake for light_bulb *
       ********************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: /opt/ncs/nrf/samples/zigbee/light_bulb
    -- CMake version: 3.30.2
    -- Found Python3: /usr/bin/python3 (found suitable version "3.9.6", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: /Users/hkn/Library/Caches/zephyr
    -- Zephyr version: 3.6.99 (/opt/ncs/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf52840dk, qualifiers: nrf52840
    -- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
    -- Found host-tools: zephyr 0.16.8 (/opt/zephyr-sdk-0.16.8)
    -- Found toolchain: zephyr 0.16.8 (/opt/zephyr-sdk-0.16.8)
    -- Found Dtc: /opt/homebrew/bin/dtc (found suitable version "1.7.1", minimum required is "1.4.6")
    -- Found BOARD.dts: /opt/ncs/zephyr/boards/nordic/nrf52840dk/nrf52840dk_nrf52840.dts
    -- Found devicetree overlay: /opt/ncs/nrf/samples/zigbee/light_bulb/boards/nrf52840dk_nrf52840.overlay
    -- Generated zephyr.dts: /opt/ncs/nrf/samples/zigbee/light_bulb/build/light_bulb/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /opt/ncs/nrf/samples/zigbee/light_bulb/build/light_bulb/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /opt/ncs/nrf/samples/zigbee/light_bulb/build/light_bulb/zephyr/dts.cmake
    Parsing /opt/ncs/zephyr/Kconfig
    Loaded configuration '/opt/ncs/zephyr/boards/nordic/nrf52840dk/nrf52840dk_nrf52840_defconfig'
    Merged configuration '/opt/ncs/nrf/samples/zigbee/light_bulb/prj.conf'
    Merged configuration '/opt/ncs/nrf/samples/zigbee/light_bulb/build/light_bulb/zephyr/.config.sysbuild'
    Configuration saved to '/opt/ncs/nrf/samples/zigbee/light_bulb/build/light_bulb/zephyr/.config'
    Kconfig header saved to '/opt/ncs/nrf/samples/zigbee/light_bulb/build/light_bulb/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: /opt/zephyr-sdk-0.16.8/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd (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: /opt/zephyr-sdk-0.16.8/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Using ccache: /opt/homebrew/bin/ccache
    CMake Warning at /opt/ncs/zephyr/CMakeLists.txt:2027 (message):
      __ASSERT() statements are globally ENABLED
    
    
    -- Configuring done (4.1s)
    -- Generating done (0.2s)
    -- Build files have been written to: /opt/ncs/nrf/samples/zigbee/light_bulb/build/light_bulb
    -- Found partition manager static configuration : /opt/ncs/nrf/samples/zigbee/light_bulb/pm_static.yml
    Partition 'settings_storage' is not included in the dynamic resolving since it is statically defined.
    Partition 'zboss_nvram' is not included in the dynamic resolving since it is statically defined.
    Partition 'zboss_product_config' is not included in the dynamic resolving since it is statically defined.
    -- Configuring done (6.1s)
    -- Generating done (0.0s)
    -- Build files have been written to: /opt/ncs/nrf/samples/zigbee/light_bulb/build
    -- west build: building application
    [5/10] Performing build step for 'light_bulb'
    [1/363] Preparing syscall dependency handling
    
    [6/363] Generating include/generated/version.h
    -- Zephyr version: 3.6.99 (/opt/ncs/zephyr), build: v3.6.99-ncs2
    [356/363] Building C object CMakeFiles/app.dir/src/main.c.obj
    [363/363] Linking C executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:      374960 B       972 KB     37.67%
                 RAM:       59504 B       256 KB     22.70%
            IDT_LIST:          0 GB        32 KB      0.00%
    Generating files from /opt/ncs/nrf/samples/zigbee/light_bulb/build/light_bulb/zephyr/zephyr.elf for board: nrf52840dk
    [10/10] Generating ../merged.hex

     

    Kind regards,

    Håkon

  • Hi,

    I am getting below error in mac

    CMakeLists.txt File

    # SPDX-License-Identifier: Apache-2.0

    cmake_minimum_required(VERSION 3.20.0)

    macro(app_set_runner_args)
    board_runner_args(dfu-util "--dfuse-modifiers=force:mass-erase")
    board_runner_args(pyocd "--erase")
    board_runner_args(nrfjprog "--erase")
    endmacro()

    find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
    project(nvs_2)


    target_sources(app PRIVATE src/main.c)
    target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/fs/nvs)



    Error 


    [{
    "resource": "/Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c",
    "owner": "C/C++: IntelliSense",
    "code": "20",
    "severity": 8,
    "message": "identifier \"__device_dts_ord_DT_N_NODELABEL_second_storage_PARENT_PARENT_ORD\" is undefined",
    "source": "C/C++",
    "startLineNumber": 81,
    "startColumn": 20,
    "endLineNumber": 81,
    "endColumn": 40
    },{
    "resource": "/Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c",
    "owner": "C/C++: IntelliSense",
    "code": "20",
    "severity": 8,
    "message": "identifier \"DT_N_NODELABEL_second_storage_REG_IDX_0_VAL_ADDRESS\" is undefined",
    "source": "C/C++",
    "startLineNumber": 86,
    "startColumn": 14,
    "endLineNumber": 86,
    "endColumn": 34
    }]


    Full Output

    * Executing task: nRF Connect: Generate config nrf21540dk_nrf52840 for /Users/nistantritech/Documents/Zigbee/nvs_2

    Building nvs_2
    west build --build-dir /Users/nistantritech/Documents/Zigbee/nvs_2/build /Users/nistantritech/Documents/Zigbee/nvs_2 --pristine --board nrf21540dk_nrf52840 -- -DNCS_TOOLCHAIN_VERSION=NONE -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DCONF_FILE=/Users/nistantritech/Documents/Zigbee/nvs_2/prj.conf -DDTC_OVERLAY_FILE=nrf21540dk_nrf52840.overlay -DBOARD_ROOT=/Users/nistantritech/Documents/Zigbee/nvs_2

    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: /Users/nistantritech/Documents/Zigbee/nvs_2
    -- CMake version: 3.21.0
    -- Found Python3: /opt/nordic/ncs/toolchains/f8037e9b83/opt/[email protected]/bin/python3.9 (found suitable version "3.9.6", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: /Users/nistantritech/Library/Caches/zephyr
    -- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf21540dk_nrf52840
    -- Found host-tools: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk)
    -- Found Dtc: /opt/nordic/ncs/toolchains/f8037e9b83/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
    -- Found BOARD.dts: /opt/nordic/ncs/v2.6.1/zephyr/boards/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840.dts
    -- Found devicetree overlay: nrf21540dk_nrf52840.overlay
    -- Generated zephyr.dts: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/dts.cmake
    Parsing /opt/nordic/ncs/v2.6.1/zephyr/Kconfig
    Loaded configuration '/opt/nordic/ncs/v2.6.1/zephyr/boards/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840_defconfig'
    Merged configuration '/Users/nistantritech/Documents/Zigbee/nvs_2/prj.conf'
    Merged configuration '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/.config'
    Kconfig header saved to '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (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: /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Using ccache: /opt/nordic/ncs/toolchains/f8037e9b83/bin/ccache
    -- Found partition manager static configuration: /Users/nistantritech/Documents/Zigbee/nvs_2/pm_static.yml
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /Users/nistantritech/Documents/Zigbee/nvs_2/build
    -- west build: building application
    [1/164] Preparing syscall dependency handling

    [4/164] Generating include/generated/version.h
    -- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr), build: v3.5.99-ncs1-1
    [163/164] Linking C executable zephyr/zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 45652 B 1 MB 4.35%
    RAM: 12480 B 256 KB 4.76%
    IDT_LIST: 0 GB 32 KB 0.00%
    [164/164] Generating zephyr/merged.hex
    * Terminal will be reused by tasks, press any key to close it.

    * Executing task: nRF Connect: Build [pristine]: nvs_2/build (active)

    Building nvs_2
    west build --build-dir /Users/nistantritech/Documents/Zigbee/nvs_2/build /Users/nistantritech/Documents/Zigbee/nvs_2 --pristine --board nrf21540dk_nrf52840 -- -DNCS_TOOLCHAIN_VERSION=NONE -DCONF_FILE=prj.conf -DDTC_OVERLAY_FILE=nrf21540dk_nrf52840.overlay -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DBOARD_ROOT=/Users/nistantritech/Documents/Zigbee/nvs_2

    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: /Users/nistantritech/Documents/Zigbee/nvs_2
    -- CMake version: 3.21.0
    -- Found Python3: /opt/nordic/ncs/toolchains/f8037e9b83/opt/[email protected]/bin/python3.9 (found suitable version "3.9.6", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: /Users/nistantritech/Library/Caches/zephyr
    -- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf21540dk_nrf52840
    -- Found host-tools: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk)
    -- Found Dtc: /opt/nordic/ncs/toolchains/f8037e9b83/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
    -- Found BOARD.dts: /opt/nordic/ncs/v2.6.1/zephyr/boards/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840.dts
    -- Found devicetree overlay: nrf21540dk_nrf52840.overlay
    -- Generated zephyr.dts: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/dts.cmake
    Parsing /opt/nordic/ncs/v2.6.1/zephyr/Kconfig
    Loaded configuration '/opt/nordic/ncs/v2.6.1/zephyr/boards/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840_defconfig'
    Merged configuration '/Users/nistantritech/Documents/Zigbee/nvs_2/prj.conf'
    Merged configuration '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/.config'
    Kconfig header saved to '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (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: /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Using ccache: /opt/nordic/ncs/toolchains/f8037e9b83/bin/ccache
    -- Found partition manager static configuration: /Users/nistantritech/Documents/Zigbee/nvs_2/pm_static.yml
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /Users/nistantritech/Documents/Zigbee/nvs_2/build
    -- west build: building application
    [1/164] Preparing syscall dependency handling

    [4/164] Generating include/generated/version.h
    -- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr), build: v3.5.99-ncs1-1
    [163/164] Linking C executable zephyr/zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 45652 B 1 MB 4.35%
    RAM: 12480 B 256 KB 4.76%
    IDT_LIST: 0 GB 32 KB 0.00%
    [164/164] Generating zephyr/merged.hex
    * Terminal will be reused by tasks, press any key to close it.

    * Executing task: nRF Connect: Build: nvs_2/build (active)

    Building nvs_2
    west build --build-dir /Users/nistantritech/Documents/Zigbee/nvs_2/build /Users/nistantritech/Documents/Zigbee/nvs_2

    ninja: no work to do.
    * Terminal will be reused by tasks, press any key to close it.

    * Executing task: nRF Connect: Flash: nvs_2/build (active)

    Flashing build to 681596074
    west flash -d /Users/nistantritech/Documents/Zigbee/nvs_2/build --skip-rebuild --dev-id 681596074

    -- west flash: using runner nrfjprog
    -- runners.nrfjprog: mass erase requested
    -- runners.nrfjprog: reset after flashing requested
    -- runners.nrfjprog: Flashing file: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/merged.hex
    [ #################### ] 0.218s | Erase file - Done erasing
    [ #################### ] 0.563s | Program file - Done programming
    [ #################### ] 0.552s | Verify file - Done verifying
    Enabling pin reset.
    Applying pin reset.
    -- runners.nrfjprog: Board with serial number 681596074 flashed successfully.
    * Terminal will be reused by tasks, press any key to close it.

    * Executing task: nRF Connect: Build [pristine]: nvs_2/build (active)

    Building nvs_2
    west build --build-dir /Users/nistantritech/Documents/Zigbee/nvs_2/build /Users/nistantritech/Documents/Zigbee/nvs_2 --pristine --board nrf21540dk_nrf52840 -- -DNCS_TOOLCHAIN_VERSION=NONE -DCONF_FILE=prj.conf -DDTC_OVERLAY_FILE=nrf21540dk_nrf52840.overlay -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DBOARD_ROOT=/Users/nistantritech/Documents/Zigbee/nvs_2

    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: /Users/nistantritech/Documents/Zigbee/nvs_2
    -- CMake version: 3.21.0
    -- Found Python3: /opt/nordic/ncs/toolchains/f8037e9b83/opt/[email protected]/bin/python3.9 (found suitable version "3.9.6", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: /Users/nistantritech/Library/Caches/zephyr
    -- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf21540dk_nrf52840
    -- Found host-tools: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk)
    -- Found Dtc: /opt/nordic/ncs/toolchains/f8037e9b83/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
    -- Found BOARD.dts: /opt/nordic/ncs/v2.6.1/zephyr/boards/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840.dts
    -- Found devicetree overlay: nrf21540dk_nrf52840.overlay
    -- Generated zephyr.dts: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/dts.cmake
    Parsing /opt/nordic/ncs/v2.6.1/zephyr/Kconfig
    Loaded configuration '/opt/nordic/ncs/v2.6.1/zephyr/boards/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840_defconfig'
    Merged configuration '/Users/nistantritech/Documents/Zigbee/nvs_2/prj.conf'
    Merged configuration '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/.config'
    Kconfig header saved to '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (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: /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Using ccache: /opt/nordic/ncs/toolchains/f8037e9b83/bin/ccache
    -- Found partition manager static configuration: /Users/nistantritech/Documents/Zigbee/nvs_2/pm_static.yml
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /Users/nistantritech/Documents/Zigbee/nvs_2/build
    -- west build: building application
    [1/164] Preparing syscall dependency handling

    [4/164] Generating include/generated/version.h
    -- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr), build: v3.5.99-ncs1-1
    [156/164] Building C object CMakeFiles/app.dir/src/main.c.obj
    FAILED: CMakeFiles/app.dir/src/main.c.obj
    ccache /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DKERNEL -DNRF52840_XXAA -DPICOLIBC_LONG_LONG_PRINTF_SCANF -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I/opt/nordic/ncs/v2.6.1/zephyr/subsys/fs/nvs -I/opt/nordic/ncs/v2.6.1/zephyr/include -I/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated -I/opt/nordic/ncs/v2.6.1/zephyr/soc/arm/nordic_nrf/nrf52 -I/opt/nordic/ncs/v2.6.1/zephyr/soc/common/nordic_nrf/. -I/opt/nordic/ncs/v2.6.1/zephyr/soc/arm/nordic_nrf/common/. -I/opt/nordic/ncs/v2.6.1/nrf/include -I/opt/nordic/ncs/v2.6.1/nrf/tests/include -I/opt/nordic/ncs/v2.6.1/modules/hal/cmsis/CMSIS/Core/Include -I/opt/nordic/ncs/v2.6.1/zephyr/modules/cmsis/. -I/opt/nordic/ncs/v2.6.1/modules/hal/nordic/nrfx -I/opt/nordic/ncs/v2.6.1/modules/hal/nordic/nrfx/drivers/include -I/opt/nordic/ncs/v2.6.1/modules/hal/nordic/nrfx/mdk -I/opt/nordic/ncs/v2.6.1/zephyr/modules/hal_nordic/nrfx/. -I/opt/nordic/ncs/v2.6.1/modules/debug/segger/SEGGER -I/opt/nordic/ncs/v2.6.1/modules/debug/segger/Config -isystem /opt/nordic/ncs/v2.6.1/zephyr/lib/libc/common/include -isystem /opt/nordic/ncs/v2.6.1/nrfxlib/crypto/nrf_cc310_platform/include -fno-strict-aliasing -Og -imacros /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft --sysroot=/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=/Users/nistantritech/Documents/Zigbee/nvs_2=CMAKE_SOURCE_DIR -fmacro-prefix-map=/opt/nordic/ncs/v2.6.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/opt/nordic/ncs/v2.6.1=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -std=c99 -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles/app.dir/src/main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c
    In file included from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/toolchain/gcc.h:98,
    from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/toolchain.h:50,
    from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/kernel_includes.h:23,
    from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/kernel.h:17,
    from /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:41:
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c: In function 'main':
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:89:41: error: '__device_dts_ord_DT_N_NODELABEL_second_storage_PARENT_PARENT_ORD' undeclared (first use in this function)
    89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/toolchain/common.h:137:26: note: in definition of macro '_DO_CONCAT'
    137 | #define _DO_CONCAT(x, y) x ## y
    | ^
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:89:33: note: in expansion of macro '_CONCAT'
    89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:216:37: note: in expansion of macro 'DEVICE_NAME_GET'
    216 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
    | ^~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:233:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
    233 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
    | ^~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/storage/flash_map.h:348:9: note: in expansion of macro 'DEVICE_DT_GET'
    348 | DEVICE_DT_GET(DT_MTD_FROM_FIXED_PARTITION(DT_NODELABEL(label)))
    | ^~~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:52:33: note: in expansion of macro 'FIXED_PARTITION_DEVICE'
    52 | #define NVS_PARTITION_DEVICE FIXED_PARTITION_DEVICE(NVS_PARTITION)
    | ^~~~~~~~~~~~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:81:27: note: in expansion of macro 'NVS_PARTITION_DEVICE'
    81 | fs.flash_device = NVS_PARTITION_DEVICE;
    | ^~~~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:89:41: note: each undeclared identifier is reported only once for each function it appears in
    89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/toolchain/common.h:137:26: note: in definition of macro '_DO_CONCAT'
    137 | #define _DO_CONCAT(x, y) x ## y
    | ^
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:89:33: note: in expansion of macro '_CONCAT'
    89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:216:37: note: in expansion of macro 'DEVICE_NAME_GET'
    216 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
    | ^~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:233:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
    233 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
    | ^~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/storage/flash_map.h:348:9: note: in expansion of macro 'DEVICE_DT_GET'
    348 | DEVICE_DT_GET(DT_MTD_FROM_FIXED_PARTITION(DT_NODELABEL(label)))
    | ^~~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:52:33: note: in expansion of macro 'FIXED_PARTITION_DEVICE'
    52 | #define NVS_PARTITION_DEVICE FIXED_PARTITION_DEVICE(NVS_PARTITION)
    | ^~~~~~~~~~~~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:81:27: note: in expansion of macro 'NVS_PARTITION_DEVICE'
    81 | fs.flash_device = NVS_PARTITION_DEVICE;
    | ^~~~~~~~~~~~~~~~~~~~
    In file included from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/arch/arm/arch.h:20,
    from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/arch/cpu.h:19,
    from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/kernel_includes.h:37:
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/devicetree.h:198:36: error: 'DT_N_NODELABEL_second_storage_REG_IDX_0_VAL_ADDRESS' undeclared (first use in this function)
    198 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
    | ^~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/devicetree.h:4345:33: note: in definition of macro 'DT_CAT4'
    4345 | #define DT_CAT4(a1, a2, a3, a4) a1 ## a2 ## a3 ## a4
    | ^~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/devicetree.h:2225:30: note: in expansion of macro 'DT_REG_ADDR_BY_IDX'
    2225 | #define DT_REG_ADDR(node_id) DT_REG_ADDR_BY_IDX(node_id, 0)
    | ^~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/storage/flash_map.h:319:39: note: in expansion of macro 'DT_REG_ADDR'
    319 | #define FIXED_PARTITION_OFFSET(label) DT_REG_ADDR(DT_NODELABEL(label))
    | ^~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/devicetree.h:198:29: note: in expansion of macro 'DT_CAT'
    198 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
    | ^~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/storage/flash_map.h:319:51: note: in expansion of macro 'DT_NODELABEL'
    319 | #define FIXED_PARTITION_OFFSET(label) DT_REG_ADDR(DT_NODELABEL(label))
    | ^~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:53:33: note: in expansion of macro 'FIXED_PARTITION_OFFSET'
    53 | #define NVS_PARTITION_OFFSET FIXED_PARTITION_OFFSET(NVS_PARTITION)
    | ^~~~~~~~~~~~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:86:21: note: in expansion of macro 'NVS_PARTITION_OFFSET'
    86 | fs.offset = NVS_PARTITION_OFFSET;
    | ^~~~~~~~~~~~~~~~~~~~
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/f8037e9b83/bin/cmake --build /Users/nistantritech/Documents/Zigbee/nvs_2/build

    * The terminal process terminated with exit code: 1.
    * Terminal will be reused by tasks, press any key to close it.

    * Executing task: nRF Connect: Build [pristine]: nvs_2/build (active)

    Building nvs_2
    west build --build-dir /Users/nistantritech/Documents/Zigbee/nvs_2/build /Users/nistantritech/Documents/Zigbee/nvs_2 --pristine --board nrf21540dk_nrf52840 -- -DNCS_TOOLCHAIN_VERSION=NONE -DCONF_FILE=prj.conf -DDTC_OVERLAY_FILE=nrf21540dk_nrf52840.overlay -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DBOARD_ROOT=/Users/nistantritech/Documents/Zigbee/nvs_2

    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: /Users/nistantritech/Documents/Zigbee/nvs_2
    -- CMake version: 3.21.0
    -- Found Python3: /opt/nordic/ncs/toolchains/f8037e9b83/opt/[email protected]/bin/python3.9 (found suitable version "3.9.6", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: /Users/nistantritech/Library/Caches/zephyr
    -- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf21540dk_nrf52840
    -- Found host-tools: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk)
    -- Found Dtc: /opt/nordic/ncs/toolchains/f8037e9b83/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
    -- Found BOARD.dts: /opt/nordic/ncs/v2.6.1/zephyr/boards/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840.dts
    -- Found devicetree overlay: nrf21540dk_nrf52840.overlay
    -- Generated zephyr.dts: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/dts.cmake
    Parsing /opt/nordic/ncs/v2.6.1/zephyr/Kconfig
    Loaded configuration '/opt/nordic/ncs/v2.6.1/zephyr/boards/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840_defconfig'
    Merged configuration '/Users/nistantritech/Documents/Zigbee/nvs_2/prj.conf'
    Merged configuration '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/.config'
    Kconfig header saved to '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (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: /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Using ccache: /opt/nordic/ncs/toolchains/f8037e9b83/bin/ccache
    -- Found partition manager static configuration: /Users/nistantritech/Documents/Zigbee/nvs_2/pm_static.yml
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /Users/nistantritech/Documents/Zigbee/nvs_2/build
    -- west build: building application
    [1/164] Preparing syscall dependency handling

    [4/164] Generating include/generated/version.h
    -- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr), build: v3.5.99-ncs1-1
    [156/164] Building C object CMakeFiles/app.dir/src/main.c.obj
    FAILED: CMakeFiles/app.dir/src/main.c.obj
    ccache /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DKERNEL -DNRF52840_XXAA -DPICOLIBC_LONG_LONG_PRINTF_SCANF -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I/opt/nordic/ncs/v2.6.1/zephyr/subsys/fs/nvs -I/opt/nordic/ncs/v2.6.1/zephyr/include -I/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated -I/opt/nordic/ncs/v2.6.1/zephyr/soc/arm/nordic_nrf/nrf52 -I/opt/nordic/ncs/v2.6.1/zephyr/soc/common/nordic_nrf/. -I/opt/nordic/ncs/v2.6.1/zephyr/soc/arm/nordic_nrf/common/. -I/opt/nordic/ncs/v2.6.1/nrf/include -I/opt/nordic/ncs/v2.6.1/nrf/tests/include -I/opt/nordic/ncs/v2.6.1/modules/hal/cmsis/CMSIS/Core/Include -I/opt/nordic/ncs/v2.6.1/zephyr/modules/cmsis/. -I/opt/nordic/ncs/v2.6.1/modules/hal/nordic/nrfx -I/opt/nordic/ncs/v2.6.1/modules/hal/nordic/nrfx/drivers/include -I/opt/nordic/ncs/v2.6.1/modules/hal/nordic/nrfx/mdk -I/opt/nordic/ncs/v2.6.1/zephyr/modules/hal_nordic/nrfx/. -I/opt/nordic/ncs/v2.6.1/modules/debug/segger/SEGGER -I/opt/nordic/ncs/v2.6.1/modules/debug/segger/Config -isystem /opt/nordic/ncs/v2.6.1/zephyr/lib/libc/common/include -isystem /opt/nordic/ncs/v2.6.1/nrfxlib/crypto/nrf_cc310_platform/include -fno-strict-aliasing -Og -imacros /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft --sysroot=/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=/Users/nistantritech/Documents/Zigbee/nvs_2=CMAKE_SOURCE_DIR -fmacro-prefix-map=/opt/nordic/ncs/v2.6.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/opt/nordic/ncs/v2.6.1=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -std=c99 -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles/app.dir/src/main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c
    In file included from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/toolchain/gcc.h:98,
    from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/toolchain.h:50,
    from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/kernel_includes.h:23,
    from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/kernel.h:17,
    from /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:41:
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c: In function 'main':
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:89:41: error: '__device_dts_ord_DT_N_NODELABEL_second_storage_PARENT_PARENT_ORD' undeclared (first use in this function)
    89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/toolchain/common.h:137:26: note: in definition of macro '_DO_CONCAT'
    137 | #define _DO_CONCAT(x, y) x ## y
    | ^
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:89:33: note: in expansion of macro '_CONCAT'
    89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:216:37: note: in expansion of macro 'DEVICE_NAME_GET'
    216 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
    | ^~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:233:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
    233 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
    | ^~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/storage/flash_map.h:348:9: note: in expansion of macro 'DEVICE_DT_GET'
    348 | DEVICE_DT_GET(DT_MTD_FROM_FIXED_PARTITION(DT_NODELABEL(label)))
    | ^~~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:52:33: note: in expansion of macro 'FIXED_PARTITION_DEVICE'
    52 | #define NVS_PARTITION_DEVICE FIXED_PARTITION_DEVICE(NVS_PARTITION)
    | ^~~~~~~~~~~~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:81:27: note: in expansion of macro 'NVS_PARTITION_DEVICE'
    81 | fs.flash_device = NVS_PARTITION_DEVICE;
    | ^~~~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:89:41: note: each undeclared identifier is reported only once for each function it appears in
    89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/toolchain/common.h:137:26: note: in definition of macro '_DO_CONCAT'
    137 | #define _DO_CONCAT(x, y) x ## y
    | ^
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:89:33: note: in expansion of macro '_CONCAT'
    89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:216:37: note: in expansion of macro 'DEVICE_NAME_GET'
    216 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
    | ^~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:233:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
    233 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
    | ^~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/storage/flash_map.h:348:9: note: in expansion of macro 'DEVICE_DT_GET'
    348 | DEVICE_DT_GET(DT_MTD_FROM_FIXED_PARTITION(DT_NODELABEL(label)))
    | ^~~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:52:33: note: in expansion of macro 'FIXED_PARTITION_DEVICE'
    52 | #define NVS_PARTITION_DEVICE FIXED_PARTITION_DEVICE(NVS_PARTITION)
    | ^~~~~~~~~~~~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:81:27: note: in expansion of macro 'NVS_PARTITION_DEVICE'
    81 | fs.flash_device = NVS_PARTITION_DEVICE;
    | ^~~~~~~~~~~~~~~~~~~~
    In file included from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/arch/arm/arch.h:20,
    from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/arch/cpu.h:19,
    from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/kernel_includes.h:37:
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/devicetree.h:198:36: error: 'DT_N_NODELABEL_second_storage_REG_IDX_0_VAL_ADDRESS' undeclared (first use in this function)
    198 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
    | ^~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/devicetree.h:4345:33: note: in definition of macro 'DT_CAT4'
    4345 | #define DT_CAT4(a1, a2, a3, a4) a1 ## a2 ## a3 ## a4
    | ^~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/devicetree.h:2225:30: note: in expansion of macro 'DT_REG_ADDR_BY_IDX'
    2225 | #define DT_REG_ADDR(node_id) DT_REG_ADDR_BY_IDX(node_id, 0)
    | ^~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/storage/flash_map.h:319:39: note: in expansion of macro 'DT_REG_ADDR'
    319 | #define FIXED_PARTITION_OFFSET(label) DT_REG_ADDR(DT_NODELABEL(label))
    | ^~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/devicetree.h:198:29: note: in expansion of macro 'DT_CAT'
    198 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
    | ^~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/storage/flash_map.h:319:51: note: in expansion of macro 'DT_NODELABEL'
    319 | #define FIXED_PARTITION_OFFSET(label) DT_REG_ADDR(DT_NODELABEL(label))
    | ^~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:53:33: note: in expansion of macro 'FIXED_PARTITION_OFFSET'
    53 | #define NVS_PARTITION_OFFSET FIXED_PARTITION_OFFSET(NVS_PARTITION)
    | ^~~~~~~~~~~~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:86:21: note: in expansion of macro 'NVS_PARTITION_OFFSET'
    86 | fs.offset = NVS_PARTITION_OFFSET;
    | ^~~~~~~~~~~~~~~~~~~~
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/f8037e9b83/bin/cmake --build /Users/nistantritech/Documents/Zigbee/nvs_2/build

    * The terminal process terminated with exit code: 1.
    * Terminal will be reused by tasks, press any key to close it.

Reply
  • Hi,

    I am getting below error in mac

    CMakeLists.txt File

    # SPDX-License-Identifier: Apache-2.0

    cmake_minimum_required(VERSION 3.20.0)

    macro(app_set_runner_args)
    board_runner_args(dfu-util "--dfuse-modifiers=force:mass-erase")
    board_runner_args(pyocd "--erase")
    board_runner_args(nrfjprog "--erase")
    endmacro()

    find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
    project(nvs_2)


    target_sources(app PRIVATE src/main.c)
    target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/fs/nvs)



    Error 


    [{
    "resource": "/Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c",
    "owner": "C/C++: IntelliSense",
    "code": "20",
    "severity": 8,
    "message": "identifier \"__device_dts_ord_DT_N_NODELABEL_second_storage_PARENT_PARENT_ORD\" is undefined",
    "source": "C/C++",
    "startLineNumber": 81,
    "startColumn": 20,
    "endLineNumber": 81,
    "endColumn": 40
    },{
    "resource": "/Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c",
    "owner": "C/C++: IntelliSense",
    "code": "20",
    "severity": 8,
    "message": "identifier \"DT_N_NODELABEL_second_storage_REG_IDX_0_VAL_ADDRESS\" is undefined",
    "source": "C/C++",
    "startLineNumber": 86,
    "startColumn": 14,
    "endLineNumber": 86,
    "endColumn": 34
    }]


    Full Output

    * Executing task: nRF Connect: Generate config nrf21540dk_nrf52840 for /Users/nistantritech/Documents/Zigbee/nvs_2

    Building nvs_2
    west build --build-dir /Users/nistantritech/Documents/Zigbee/nvs_2/build /Users/nistantritech/Documents/Zigbee/nvs_2 --pristine --board nrf21540dk_nrf52840 -- -DNCS_TOOLCHAIN_VERSION=NONE -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DCONF_FILE=/Users/nistantritech/Documents/Zigbee/nvs_2/prj.conf -DDTC_OVERLAY_FILE=nrf21540dk_nrf52840.overlay -DBOARD_ROOT=/Users/nistantritech/Documents/Zigbee/nvs_2

    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: /Users/nistantritech/Documents/Zigbee/nvs_2
    -- CMake version: 3.21.0
    -- Found Python3: /opt/nordic/ncs/toolchains/f8037e9b83/opt/[email protected]/bin/python3.9 (found suitable version "3.9.6", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: /Users/nistantritech/Library/Caches/zephyr
    -- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf21540dk_nrf52840
    -- Found host-tools: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk)
    -- Found Dtc: /opt/nordic/ncs/toolchains/f8037e9b83/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
    -- Found BOARD.dts: /opt/nordic/ncs/v2.6.1/zephyr/boards/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840.dts
    -- Found devicetree overlay: nrf21540dk_nrf52840.overlay
    -- Generated zephyr.dts: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/dts.cmake
    Parsing /opt/nordic/ncs/v2.6.1/zephyr/Kconfig
    Loaded configuration '/opt/nordic/ncs/v2.6.1/zephyr/boards/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840_defconfig'
    Merged configuration '/Users/nistantritech/Documents/Zigbee/nvs_2/prj.conf'
    Merged configuration '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/.config'
    Kconfig header saved to '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (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: /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Using ccache: /opt/nordic/ncs/toolchains/f8037e9b83/bin/ccache
    -- Found partition manager static configuration: /Users/nistantritech/Documents/Zigbee/nvs_2/pm_static.yml
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /Users/nistantritech/Documents/Zigbee/nvs_2/build
    -- west build: building application
    [1/164] Preparing syscall dependency handling

    [4/164] Generating include/generated/version.h
    -- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr), build: v3.5.99-ncs1-1
    [163/164] Linking C executable zephyr/zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 45652 B 1 MB 4.35%
    RAM: 12480 B 256 KB 4.76%
    IDT_LIST: 0 GB 32 KB 0.00%
    [164/164] Generating zephyr/merged.hex
    * Terminal will be reused by tasks, press any key to close it.

    * Executing task: nRF Connect: Build [pristine]: nvs_2/build (active)

    Building nvs_2
    west build --build-dir /Users/nistantritech/Documents/Zigbee/nvs_2/build /Users/nistantritech/Documents/Zigbee/nvs_2 --pristine --board nrf21540dk_nrf52840 -- -DNCS_TOOLCHAIN_VERSION=NONE -DCONF_FILE=prj.conf -DDTC_OVERLAY_FILE=nrf21540dk_nrf52840.overlay -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DBOARD_ROOT=/Users/nistantritech/Documents/Zigbee/nvs_2

    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: /Users/nistantritech/Documents/Zigbee/nvs_2
    -- CMake version: 3.21.0
    -- Found Python3: /opt/nordic/ncs/toolchains/f8037e9b83/opt/[email protected]/bin/python3.9 (found suitable version "3.9.6", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: /Users/nistantritech/Library/Caches/zephyr
    -- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf21540dk_nrf52840
    -- Found host-tools: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk)
    -- Found Dtc: /opt/nordic/ncs/toolchains/f8037e9b83/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
    -- Found BOARD.dts: /opt/nordic/ncs/v2.6.1/zephyr/boards/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840.dts
    -- Found devicetree overlay: nrf21540dk_nrf52840.overlay
    -- Generated zephyr.dts: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/dts.cmake
    Parsing /opt/nordic/ncs/v2.6.1/zephyr/Kconfig
    Loaded configuration '/opt/nordic/ncs/v2.6.1/zephyr/boards/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840_defconfig'
    Merged configuration '/Users/nistantritech/Documents/Zigbee/nvs_2/prj.conf'
    Merged configuration '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/.config'
    Kconfig header saved to '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (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: /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Using ccache: /opt/nordic/ncs/toolchains/f8037e9b83/bin/ccache
    -- Found partition manager static configuration: /Users/nistantritech/Documents/Zigbee/nvs_2/pm_static.yml
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /Users/nistantritech/Documents/Zigbee/nvs_2/build
    -- west build: building application
    [1/164] Preparing syscall dependency handling

    [4/164] Generating include/generated/version.h
    -- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr), build: v3.5.99-ncs1-1
    [163/164] Linking C executable zephyr/zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 45652 B 1 MB 4.35%
    RAM: 12480 B 256 KB 4.76%
    IDT_LIST: 0 GB 32 KB 0.00%
    [164/164] Generating zephyr/merged.hex
    * Terminal will be reused by tasks, press any key to close it.

    * Executing task: nRF Connect: Build: nvs_2/build (active)

    Building nvs_2
    west build --build-dir /Users/nistantritech/Documents/Zigbee/nvs_2/build /Users/nistantritech/Documents/Zigbee/nvs_2

    ninja: no work to do.
    * Terminal will be reused by tasks, press any key to close it.

    * Executing task: nRF Connect: Flash: nvs_2/build (active)

    Flashing build to 681596074
    west flash -d /Users/nistantritech/Documents/Zigbee/nvs_2/build --skip-rebuild --dev-id 681596074

    -- west flash: using runner nrfjprog
    -- runners.nrfjprog: mass erase requested
    -- runners.nrfjprog: reset after flashing requested
    -- runners.nrfjprog: Flashing file: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/merged.hex
    [ #################### ] 0.218s | Erase file - Done erasing
    [ #################### ] 0.563s | Program file - Done programming
    [ #################### ] 0.552s | Verify file - Done verifying
    Enabling pin reset.
    Applying pin reset.
    -- runners.nrfjprog: Board with serial number 681596074 flashed successfully.
    * Terminal will be reused by tasks, press any key to close it.

    * Executing task: nRF Connect: Build [pristine]: nvs_2/build (active)

    Building nvs_2
    west build --build-dir /Users/nistantritech/Documents/Zigbee/nvs_2/build /Users/nistantritech/Documents/Zigbee/nvs_2 --pristine --board nrf21540dk_nrf52840 -- -DNCS_TOOLCHAIN_VERSION=NONE -DCONF_FILE=prj.conf -DDTC_OVERLAY_FILE=nrf21540dk_nrf52840.overlay -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DBOARD_ROOT=/Users/nistantritech/Documents/Zigbee/nvs_2

    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: /Users/nistantritech/Documents/Zigbee/nvs_2
    -- CMake version: 3.21.0
    -- Found Python3: /opt/nordic/ncs/toolchains/f8037e9b83/opt/[email protected]/bin/python3.9 (found suitable version "3.9.6", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: /Users/nistantritech/Library/Caches/zephyr
    -- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf21540dk_nrf52840
    -- Found host-tools: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk)
    -- Found Dtc: /opt/nordic/ncs/toolchains/f8037e9b83/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
    -- Found BOARD.dts: /opt/nordic/ncs/v2.6.1/zephyr/boards/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840.dts
    -- Found devicetree overlay: nrf21540dk_nrf52840.overlay
    -- Generated zephyr.dts: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/dts.cmake
    Parsing /opt/nordic/ncs/v2.6.1/zephyr/Kconfig
    Loaded configuration '/opt/nordic/ncs/v2.6.1/zephyr/boards/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840_defconfig'
    Merged configuration '/Users/nistantritech/Documents/Zigbee/nvs_2/prj.conf'
    Merged configuration '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/.config'
    Kconfig header saved to '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (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: /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Using ccache: /opt/nordic/ncs/toolchains/f8037e9b83/bin/ccache
    -- Found partition manager static configuration: /Users/nistantritech/Documents/Zigbee/nvs_2/pm_static.yml
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /Users/nistantritech/Documents/Zigbee/nvs_2/build
    -- west build: building application
    [1/164] Preparing syscall dependency handling

    [4/164] Generating include/generated/version.h
    -- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr), build: v3.5.99-ncs1-1
    [156/164] Building C object CMakeFiles/app.dir/src/main.c.obj
    FAILED: CMakeFiles/app.dir/src/main.c.obj
    ccache /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DKERNEL -DNRF52840_XXAA -DPICOLIBC_LONG_LONG_PRINTF_SCANF -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I/opt/nordic/ncs/v2.6.1/zephyr/subsys/fs/nvs -I/opt/nordic/ncs/v2.6.1/zephyr/include -I/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated -I/opt/nordic/ncs/v2.6.1/zephyr/soc/arm/nordic_nrf/nrf52 -I/opt/nordic/ncs/v2.6.1/zephyr/soc/common/nordic_nrf/. -I/opt/nordic/ncs/v2.6.1/zephyr/soc/arm/nordic_nrf/common/. -I/opt/nordic/ncs/v2.6.1/nrf/include -I/opt/nordic/ncs/v2.6.1/nrf/tests/include -I/opt/nordic/ncs/v2.6.1/modules/hal/cmsis/CMSIS/Core/Include -I/opt/nordic/ncs/v2.6.1/zephyr/modules/cmsis/. -I/opt/nordic/ncs/v2.6.1/modules/hal/nordic/nrfx -I/opt/nordic/ncs/v2.6.1/modules/hal/nordic/nrfx/drivers/include -I/opt/nordic/ncs/v2.6.1/modules/hal/nordic/nrfx/mdk -I/opt/nordic/ncs/v2.6.1/zephyr/modules/hal_nordic/nrfx/. -I/opt/nordic/ncs/v2.6.1/modules/debug/segger/SEGGER -I/opt/nordic/ncs/v2.6.1/modules/debug/segger/Config -isystem /opt/nordic/ncs/v2.6.1/zephyr/lib/libc/common/include -isystem /opt/nordic/ncs/v2.6.1/nrfxlib/crypto/nrf_cc310_platform/include -fno-strict-aliasing -Og -imacros /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft --sysroot=/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=/Users/nistantritech/Documents/Zigbee/nvs_2=CMAKE_SOURCE_DIR -fmacro-prefix-map=/opt/nordic/ncs/v2.6.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/opt/nordic/ncs/v2.6.1=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -std=c99 -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles/app.dir/src/main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c
    In file included from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/toolchain/gcc.h:98,
    from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/toolchain.h:50,
    from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/kernel_includes.h:23,
    from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/kernel.h:17,
    from /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:41:
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c: In function 'main':
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:89:41: error: '__device_dts_ord_DT_N_NODELABEL_second_storage_PARENT_PARENT_ORD' undeclared (first use in this function)
    89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/toolchain/common.h:137:26: note: in definition of macro '_DO_CONCAT'
    137 | #define _DO_CONCAT(x, y) x ## y
    | ^
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:89:33: note: in expansion of macro '_CONCAT'
    89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:216:37: note: in expansion of macro 'DEVICE_NAME_GET'
    216 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
    | ^~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:233:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
    233 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
    | ^~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/storage/flash_map.h:348:9: note: in expansion of macro 'DEVICE_DT_GET'
    348 | DEVICE_DT_GET(DT_MTD_FROM_FIXED_PARTITION(DT_NODELABEL(label)))
    | ^~~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:52:33: note: in expansion of macro 'FIXED_PARTITION_DEVICE'
    52 | #define NVS_PARTITION_DEVICE FIXED_PARTITION_DEVICE(NVS_PARTITION)
    | ^~~~~~~~~~~~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:81:27: note: in expansion of macro 'NVS_PARTITION_DEVICE'
    81 | fs.flash_device = NVS_PARTITION_DEVICE;
    | ^~~~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:89:41: note: each undeclared identifier is reported only once for each function it appears in
    89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/toolchain/common.h:137:26: note: in definition of macro '_DO_CONCAT'
    137 | #define _DO_CONCAT(x, y) x ## y
    | ^
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:89:33: note: in expansion of macro '_CONCAT'
    89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:216:37: note: in expansion of macro 'DEVICE_NAME_GET'
    216 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
    | ^~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:233:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
    233 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
    | ^~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/storage/flash_map.h:348:9: note: in expansion of macro 'DEVICE_DT_GET'
    348 | DEVICE_DT_GET(DT_MTD_FROM_FIXED_PARTITION(DT_NODELABEL(label)))
    | ^~~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:52:33: note: in expansion of macro 'FIXED_PARTITION_DEVICE'
    52 | #define NVS_PARTITION_DEVICE FIXED_PARTITION_DEVICE(NVS_PARTITION)
    | ^~~~~~~~~~~~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:81:27: note: in expansion of macro 'NVS_PARTITION_DEVICE'
    81 | fs.flash_device = NVS_PARTITION_DEVICE;
    | ^~~~~~~~~~~~~~~~~~~~
    In file included from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/arch/arm/arch.h:20,
    from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/arch/cpu.h:19,
    from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/kernel_includes.h:37:
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/devicetree.h:198:36: error: 'DT_N_NODELABEL_second_storage_REG_IDX_0_VAL_ADDRESS' undeclared (first use in this function)
    198 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
    | ^~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/devicetree.h:4345:33: note: in definition of macro 'DT_CAT4'
    4345 | #define DT_CAT4(a1, a2, a3, a4) a1 ## a2 ## a3 ## a4
    | ^~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/devicetree.h:2225:30: note: in expansion of macro 'DT_REG_ADDR_BY_IDX'
    2225 | #define DT_REG_ADDR(node_id) DT_REG_ADDR_BY_IDX(node_id, 0)
    | ^~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/storage/flash_map.h:319:39: note: in expansion of macro 'DT_REG_ADDR'
    319 | #define FIXED_PARTITION_OFFSET(label) DT_REG_ADDR(DT_NODELABEL(label))
    | ^~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/devicetree.h:198:29: note: in expansion of macro 'DT_CAT'
    198 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
    | ^~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/storage/flash_map.h:319:51: note: in expansion of macro 'DT_NODELABEL'
    319 | #define FIXED_PARTITION_OFFSET(label) DT_REG_ADDR(DT_NODELABEL(label))
    | ^~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:53:33: note: in expansion of macro 'FIXED_PARTITION_OFFSET'
    53 | #define NVS_PARTITION_OFFSET FIXED_PARTITION_OFFSET(NVS_PARTITION)
    | ^~~~~~~~~~~~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:86:21: note: in expansion of macro 'NVS_PARTITION_OFFSET'
    86 | fs.offset = NVS_PARTITION_OFFSET;
    | ^~~~~~~~~~~~~~~~~~~~
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/f8037e9b83/bin/cmake --build /Users/nistantritech/Documents/Zigbee/nvs_2/build

    * The terminal process terminated with exit code: 1.
    * Terminal will be reused by tasks, press any key to close it.

    * Executing task: nRF Connect: Build [pristine]: nvs_2/build (active)

    Building nvs_2
    west build --build-dir /Users/nistantritech/Documents/Zigbee/nvs_2/build /Users/nistantritech/Documents/Zigbee/nvs_2 --pristine --board nrf21540dk_nrf52840 -- -DNCS_TOOLCHAIN_VERSION=NONE -DCONF_FILE=prj.conf -DDTC_OVERLAY_FILE=nrf21540dk_nrf52840.overlay -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DBOARD_ROOT=/Users/nistantritech/Documents/Zigbee/nvs_2

    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: /Users/nistantritech/Documents/Zigbee/nvs_2
    -- CMake version: 3.21.0
    -- Found Python3: /opt/nordic/ncs/toolchains/f8037e9b83/opt/[email protected]/bin/python3.9 (found suitable version "3.9.6", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: /Users/nistantritech/Library/Caches/zephyr
    -- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf21540dk_nrf52840
    -- Found host-tools: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk)
    -- Found Dtc: /opt/nordic/ncs/toolchains/f8037e9b83/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
    -- Found BOARD.dts: /opt/nordic/ncs/v2.6.1/zephyr/boards/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840.dts
    -- Found devicetree overlay: nrf21540dk_nrf52840.overlay
    -- Generated zephyr.dts: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/dts.cmake
    Parsing /opt/nordic/ncs/v2.6.1/zephyr/Kconfig
    Loaded configuration '/opt/nordic/ncs/v2.6.1/zephyr/boards/arm/nrf21540dk_nrf52840/nrf21540dk_nrf52840_defconfig'
    Merged configuration '/Users/nistantritech/Documents/Zigbee/nvs_2/prj.conf'
    Merged configuration '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/.config'
    Kconfig header saved to '/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (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: /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Using ccache: /opt/nordic/ncs/toolchains/f8037e9b83/bin/ccache
    -- Found partition manager static configuration: /Users/nistantritech/Documents/Zigbee/nvs_2/pm_static.yml
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /Users/nistantritech/Documents/Zigbee/nvs_2/build
    -- west build: building application
    [1/164] Preparing syscall dependency handling

    [4/164] Generating include/generated/version.h
    -- Zephyr version: 3.5.99 (/opt/nordic/ncs/v2.6.1/zephyr), build: v3.5.99-ncs1-1
    [156/164] Building C object CMakeFiles/app.dir/src/main.c.obj
    FAILED: CMakeFiles/app.dir/src/main.c.obj
    ccache /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DKERNEL -DNRF52840_XXAA -DPICOLIBC_LONG_LONG_PRINTF_SCANF -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I/opt/nordic/ncs/v2.6.1/zephyr/subsys/fs/nvs -I/opt/nordic/ncs/v2.6.1/zephyr/include -I/Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated -I/opt/nordic/ncs/v2.6.1/zephyr/soc/arm/nordic_nrf/nrf52 -I/opt/nordic/ncs/v2.6.1/zephyr/soc/common/nordic_nrf/. -I/opt/nordic/ncs/v2.6.1/zephyr/soc/arm/nordic_nrf/common/. -I/opt/nordic/ncs/v2.6.1/nrf/include -I/opt/nordic/ncs/v2.6.1/nrf/tests/include -I/opt/nordic/ncs/v2.6.1/modules/hal/cmsis/CMSIS/Core/Include -I/opt/nordic/ncs/v2.6.1/zephyr/modules/cmsis/. -I/opt/nordic/ncs/v2.6.1/modules/hal/nordic/nrfx -I/opt/nordic/ncs/v2.6.1/modules/hal/nordic/nrfx/drivers/include -I/opt/nordic/ncs/v2.6.1/modules/hal/nordic/nrfx/mdk -I/opt/nordic/ncs/v2.6.1/zephyr/modules/hal_nordic/nrfx/. -I/opt/nordic/ncs/v2.6.1/modules/debug/segger/SEGGER -I/opt/nordic/ncs/v2.6.1/modules/debug/segger/Config -isystem /opt/nordic/ncs/v2.6.1/zephyr/lib/libc/common/include -isystem /opt/nordic/ncs/v2.6.1/nrfxlib/crypto/nrf_cc310_platform/include -fno-strict-aliasing -Og -imacros /Users/nistantritech/Documents/Zigbee/nvs_2/build/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft --sysroot=/opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=/Users/nistantritech/Documents/Zigbee/nvs_2=CMAKE_SOURCE_DIR -fmacro-prefix-map=/opt/nordic/ncs/v2.6.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/opt/nordic/ncs/v2.6.1=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -std=c99 -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles/app.dir/src/main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c
    In file included from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/toolchain/gcc.h:98,
    from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/toolchain.h:50,
    from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/kernel_includes.h:23,
    from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/kernel.h:17,
    from /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:41:
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c: In function 'main':
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:89:41: error: '__device_dts_ord_DT_N_NODELABEL_second_storage_PARENT_PARENT_ORD' undeclared (first use in this function)
    89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/toolchain/common.h:137:26: note: in definition of macro '_DO_CONCAT'
    137 | #define _DO_CONCAT(x, y) x ## y
    | ^
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:89:33: note: in expansion of macro '_CONCAT'
    89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:216:37: note: in expansion of macro 'DEVICE_NAME_GET'
    216 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
    | ^~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:233:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
    233 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
    | ^~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/storage/flash_map.h:348:9: note: in expansion of macro 'DEVICE_DT_GET'
    348 | DEVICE_DT_GET(DT_MTD_FROM_FIXED_PARTITION(DT_NODELABEL(label)))
    | ^~~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:52:33: note: in expansion of macro 'FIXED_PARTITION_DEVICE'
    52 | #define NVS_PARTITION_DEVICE FIXED_PARTITION_DEVICE(NVS_PARTITION)
    | ^~~~~~~~~~~~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:81:27: note: in expansion of macro 'NVS_PARTITION_DEVICE'
    81 | fs.flash_device = NVS_PARTITION_DEVICE;
    | ^~~~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:89:41: note: each undeclared identifier is reported only once for each function it appears in
    89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/toolchain/common.h:137:26: note: in definition of macro '_DO_CONCAT'
    137 | #define _DO_CONCAT(x, y) x ## y
    | ^
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:89:33: note: in expansion of macro '_CONCAT'
    89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:216:37: note: in expansion of macro 'DEVICE_NAME_GET'
    216 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
    | ^~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/device.h:233:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
    233 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
    | ^~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/storage/flash_map.h:348:9: note: in expansion of macro 'DEVICE_DT_GET'
    348 | DEVICE_DT_GET(DT_MTD_FROM_FIXED_PARTITION(DT_NODELABEL(label)))
    | ^~~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:52:33: note: in expansion of macro 'FIXED_PARTITION_DEVICE'
    52 | #define NVS_PARTITION_DEVICE FIXED_PARTITION_DEVICE(NVS_PARTITION)
    | ^~~~~~~~~~~~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:81:27: note: in expansion of macro 'NVS_PARTITION_DEVICE'
    81 | fs.flash_device = NVS_PARTITION_DEVICE;
    | ^~~~~~~~~~~~~~~~~~~~
    In file included from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/arch/arm/arch.h:20,
    from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/arch/cpu.h:19,
    from /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/kernel_includes.h:37:
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/devicetree.h:198:36: error: 'DT_N_NODELABEL_second_storage_REG_IDX_0_VAL_ADDRESS' undeclared (first use in this function)
    198 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
    | ^~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/devicetree.h:4345:33: note: in definition of macro 'DT_CAT4'
    4345 | #define DT_CAT4(a1, a2, a3, a4) a1 ## a2 ## a3 ## a4
    | ^~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/devicetree.h:2225:30: note: in expansion of macro 'DT_REG_ADDR_BY_IDX'
    2225 | #define DT_REG_ADDR(node_id) DT_REG_ADDR_BY_IDX(node_id, 0)
    | ^~~~~~~~~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/storage/flash_map.h:319:39: note: in expansion of macro 'DT_REG_ADDR'
    319 | #define FIXED_PARTITION_OFFSET(label) DT_REG_ADDR(DT_NODELABEL(label))
    | ^~~~~~~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/devicetree.h:198:29: note: in expansion of macro 'DT_CAT'
    198 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
    | ^~~~~~
    /opt/nordic/ncs/v2.6.1/zephyr/include/zephyr/storage/flash_map.h:319:51: note: in expansion of macro 'DT_NODELABEL'
    319 | #define FIXED_PARTITION_OFFSET(label) DT_REG_ADDR(DT_NODELABEL(label))
    | ^~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:53:33: note: in expansion of macro 'FIXED_PARTITION_OFFSET'
    53 | #define NVS_PARTITION_OFFSET FIXED_PARTITION_OFFSET(NVS_PARTITION)
    | ^~~~~~~~~~~~~~~~~~~~~~
    /Users/nistantritech/Documents/Zigbee/nvs_2/src/main.c:86:21: note: in expansion of macro 'NVS_PARTITION_OFFSET'
    86 | fs.offset = NVS_PARTITION_OFFSET;
    | ^~~~~~~~~~~~~~~~~~~~
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/f8037e9b83/bin/cmake --build /Users/nistantritech/Documents/Zigbee/nvs_2/build

    * The terminal process terminated with exit code: 1.
    * Terminal will be reused by tasks, press any key to close it.

Children
No Data
Related