After changing QSPI to SPI, prj_release.conf can no longer be used

As stated in the title, when I set CONFIG_CHIP_FACTORY_DATA_BUILD to n, the following compilation error occurs.

log_n.zip

However, if I keep it as y, the MCU fails to function and gets stuck in the following code.

FUNC_NORETURN __weak void arch_system_halt(unsigned int reason)
{
    ARG_UNUSED(reason);

    /* TODO: What's the best way to totally halt the system if SMP
     * is enabled?
     */

    (void)arch_irq_lock();
    for (;;) {
        /* Spin endlessly */
    }
}

These issues do not occur in prj.conf.

Please note that I am using a clean NCS 2.9.0 Matter Lock project.

The attachment below contains the modifications I made

0456.config.zip

  • Hi,

    As stated in the title, when I set CONFIG_CHIP_FACTORY_DATA_BUILD to n, the following compilation error occurs.

    I guess the title you refer to is the other duplicate case created here  Setting CONFIG_CHIP_FACTORY_DATA_BUILD=n causes a compilation error (SDK_2.9.0 matter lock) (closed due to duplicate).

    As stated in the title, when I set CONFIG_CHIP_FACTORY_DATA_BUILD to n, the following compilation error occurs.

    log_n.zip

    However, if I keep it as y, the MCU fails to function and gets stuck in the following code.

    See https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/matter/lock/README.html#factory_data_support and https://docs.nordicsemi.com/search?bundle=ncs-latest&q=CONFIG_CHIP_FACTORY_DATA_BUILD for how to enable factory data. 

    CONFIG_CHIP_FACTORY_DATA_BUILD was deprecated in 2.7.0 and https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_guide_2.7.html tells you how to enable it for newer versions of nRF Connect SDK.

    Kind regards,
    Andreas

  • Hi,

    I used the following configuration, but the error occurred. In fact, if you search through the Kconfig GUI, you won't find SB_CONFIG_MATTER_FACTORY_DATA_GENERATE.

    # Enable Factory Data feature
    CONFIG_CHIP_FACTORY_DATA=y
    SB_CONFIG_MATTER_FACTORY_DATA_GENERATE=y

    error: Aborting due to Kconfig warnings
    
    CMake Error at C:/ncs/v2.9.0/zephyr/cmake/modules/kconfig.cmake:396 (message):
      command failed with return code: 1
    Call Stack (most recent call first):
      C:/ncs/v2.9.0/nrf/cmake/modules/kconfig.cmake:29 (include)
      C:/ncs/v2.9.0/zephyr/cmake/modules/zephyr_default.cmake:133 (include)
      C:/ncs/v2.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      C:/ncs/v2.9.0-- Configuring incomplete, errors occurred!
    /zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:9 (find_package)
    
    
    CMake Error at cmake/modules/sysbuild_extensions.cmake:514 (message):
      CMake configure failed for Zephyr project: lock
    
      Location: C:/nordic_prj/lock
    Call Stack (most recent call first):
      cmake/modules/sysbuild_images.cmake:20 (ExternalZephyrProject_Cmake)
      cmake/modules/sysbuild_default.cmake:20 (include)
      C:/ncs/v2.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
      C:/ncs/v2.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      C:/ncs/v2.9.0/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
      template/CMakeLists.txt:10 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    See also "C:/nordic_prj/lock/build/CMakeFiles/CMakeOutput.log".
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\b620d30767\opt\bin\cmake.EXE' -DWEST_PYTHON=C:/ncs/toolchains/b620d30767/opt/bin/python.exe '-BC:\nordic_prj\lock\build' -GNinja -DBOARD=nrf5340dk_nrf5340_cpuapp -DCONF_FILE=prj_release.conf '-SC:\ncs\v2.9.0\zephyr\share\sysbuild' '-DAPP_DIR:PATH=C:\nordic_prj\lock'
    

    Please use the Matter Lock example from NCS v2.9.0 (nrf5340dk_nrf5340_cpuapp) and modify QSPI to SPI. Then you will understand the error I am referring to.

    If SPI is not modified, I can still normally use CONFIG_CHIP_FACTORY_DATA and CONFIG_CHIP_FACTORY_DATA_BUILD in prj_release.conf.

    These two configurations are also automatically generated by the default files.

  • Hi,

    SunHuang said:
    In fact, if you search through the Kconfig GUI, you won't find SB_CONFIG_MATTER_FACTORY_DATA_GENERATE.

    When looking for this config a chain of relevant configurations shows up for me for factory data:

    Did you enable the sysbuild-specific configuration within prj.conf? The way you list them implies that you have both within prj.conf, and I can't see any sysbuild.conf for the companion components,

    SB configurations are to be placed within prj.conf. I'm not sure if I've posted this course here for you earlier, but here it is nonetheless: https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-8-sysbuild/topic/sysbuild-explained/.

    W.r.t the SPI vs QSPI, I will have a look, but it will take some time.

    Kind regards,
    Andreas

  • Hi,

    I have already resolved the issue regarding the factory data. Thank you for the information you provided. I am currently trying to create a custom board to see if it can resolve the issue where SPI is not functioning properly in prj_release.

  • SunHuang said:
    I have already resolved the issue regarding the factory data. Thank you for the information you provided.

    Great! Glad to hear that!

    I didn't quite get a successful result w.r.t replacing QSPI to SPI yet, but I will continue looking into it early next week.

    Kind regards,
    Andreas

Related