I am using NCS 3.0.2 + VSCode to develop for the nRF54L15. I have two projects:
\nrf\samples\bootloader\src\nrf\samples\esb_prx
Since my custom board does not have a 32.768 kHz crystal, I defined CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC in the prj.confof the ESB project, and the code runs successfully. I can also confirm that CONFIG_CLOCK_CONTROL_NRF_K32SRC_RCis correctly set in the .configfile.However, when I define the same macro (CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC) in the bootloader project's prj.conf, I get the following error:
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC was assigned the value y, but got the value n. Missing dependencies: <choice CLOCK_CONTROL_NRF_SOURCE>
I don’t understand why the same macro definition behaves differently in the two projects. The error mentions a missing dependency (CLOCK_CONTROL_NRF_SOURCE), but I didn’t define it in the ESB project either, yet the ESB project works fine. This is very confusing to me.
My questions are:
- How can I successfully define
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RCin the bootloader project? - What is the root cause of this issue?
- If I encounter similar
CONFIGdefinition failures in the future, what approach should I take to debug and resolve them?
- If I encounter similar
Thank you!
here are prj.conf of tow project↓
bootloader prj.conf # # Copyright (c) 2019 Nordic Semiconductor ASA # # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # CONFIG_CLOCK_CONTROL=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y CONFIG_IS_SECURE_BOOTLOADER=y CONFIG_MULTITHREADING=n CONFIG_GPIO=n CONFIG_ARM_MPU=n CONFIG_TICKLESS_KERNEL=n CONFIG_ERRNO=n CONFIG_FPROTECT=y CONFIG_SECURE_BOOT_CRYPTO=y CONFIG_LOG=y CONFIG_LOG_MODE_MINIMAL=y CONFIG_LOG_DEFAULT_LEVEL=0 CONFIG_SECURE_BOOT_VALIDATION=y CONFIG_SECURE_BOOT_VALIDATION_LOG_LEVEL_INF=y CONFIG_SECURE_BOOT_STORAGE=y CONFIG_BL_ROT_VERIFY_EXT_API_ENABLED=y CONFIG_BL_SHA256_EXT_API_ENABLED=y CONFIG_BL_SECP256R1_EXT_API_ENABLED=y CONFIG_BL_VALIDATE_FW_EXT_API_ENABLED=y CONFIG_EXT_API_PROVIDE_EXT_API_ENABLED=y CONFIG_MAIN_STACK_SIZE=2048 CONFIG_TIMEOUT_64BIT=n # Disable asserts because of false positive when writing to OTP. CONFIG_ASSERT=n # Avoid triggering IRQs from the RTC CONFIG_NRF_RTC_TIMER=n esb prj.conf # # Copyright (c) 2019 Nordic Semiconductor ASA # # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # CONFIG_NCS_SAMPLES_DEFAULTS=y CONFIG_MY_ESB=y CONFIG_DK_LIBRARY=y CONFIG_CLOCK_CONTROL=y CONFIG_STDOUT_CONSOLE=y CONFIG_FLASH=y CONFIG_MPU_ALLOW_FLASH_WRITE=y CONFIG_SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS=y CONFIG_FCB=y CONFIG_FLASH_MAP=y CONFIG_SETTINGS=y CONFIG_SETTINGS_FCB=y CONFIG_FLASH_LOAD_OFFSET=0x10000 CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y # CONFIG_ESB_FAST_SWITCHING=y # 启用日志系统 CONFIG_LOG=y CONFIG_LOG_MODE_DEFERRED=y # 启用 RTT 后端 CONFIG_USE_SEGGER_RTT=y CONFIG_LOG_BACKEND_RTT=y CONFIG_LOG_BACKEND_RTT_MODE_BLOCK=n # RTT输出方式,可选 # 禁用 UART 后端 CONFIG_LOG_BACKEND_UART=n CONFIG_UART_CONSOLE=n CONFIG_RTT_CONSOLE=y # 若还在使用 printk,也重定向到 RTT CONFIG_CONSOLE=y CONFIG_PRINTK=y CONFIG_STDOUT_CONSOLE=y # CONFIG_LOG_BACKEND_FORMAT_TIMESTAMP=n CONFIG_LOG_PROCESS_THREAD_SLEEP_MS=10 CONFIG_NRFX_POWER=y