{"id":328,"date":"2025-11-21T20:54:46","date_gmt":"2025-11-21T12:54:46","guid":{"rendered":"https:\/\/szddt.com\/?p=328"},"modified":"2025-11-21T20:54:48","modified_gmt":"2025-11-21T12:54:48","slug":"clock-source-is-not-supported-or-not-defined%e9%94%99%e8%af%af%e7%9a%84%e4%b8%80%e7%a7%8d%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95","status":"publish","type":"post","link":"https:\/\/szddt.com\/?p=328","title":{"rendered":"\u201cClock source is not supported or not defined\u201d\u9519\u8bef\u7684\u4e00\u79cd\u89e3\u51b3\u529e\u6cd5"},"content":{"rendered":"\n<p>\u5728ncs v3.1.1\u7a0b\u5e8f\u7f16\u8bd1\u4e2d\uff0c\u53d1\u73b0\u62a5\u9519\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;283\/341] Building C object modules\/nrf\/subsys\/mpsl\/init\/CMakeFiles\/..__nrf__subsys__mpsl__init.dir\/mpsl_init.c.obj FAILED: modules\/nrf\/subsys\/mpsl\/init\/CMakeFiles\/..__nrf__subsys__mpsl__init.dir\/mpsl_init.c.obj C:\\ncs\\toolchains\\c1a76fddb2\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gcc.exe -DKERNEL -DK_HEAP_MEM_POOL_SIZE=2048 -DMBEDTLS_CONFIG_FILE=\\\"nrf-config.h\\\" -DMBEDTLS_PSA_CRYPTO_CONFIG_FILE=\\\"n rf-psa-crypto-config.h\\\" -DMBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE=\\\"nrf-psa-crypto-user-config.h\\\" -DNCS_APPLICATION_BOOT_BANNER_GIT_REPO -DNRF54L15_XXAA -DNRF_APPLICATION -DNRF_CONFIG_CPU_FREQ_MHZ=128 - DPICOLIBC_LONG_LONG_PRINTF_SCANF -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:\/ncs\/v3.1.1\/nrf\/drivers\/mpsl\/clock_control -IC:\/ncs\/v3.1.1\/zephyr\/samples\/0hec\/fci_ota\/build\/zephyr\/i nclude\/generated\/zephyr -IC:\/ncs\/v3.1.1\/zephyr\/include -IC:\/ncs\/v3.1.1\/zephyr\/samples\/0hec\/fci_ota\/build\/zephyr\/include\/generated -IC:\/ncs\/v3.1.1\/zephyr\/soc\/nordic -IC:\/ncs\/v3.1.1\/zephyr\/soc\/nordic\/nr f54l\/. -IC:\/ncs\/v3.1.1\/zephyr\/soc\/nordic\/common\/. -IC:\/ncs\/v3.1.1\/zephyr\/subsys\/bluetooth -IC:\/ncs\/v3.1.1\/zephyr\/subsys\/settings\/include -IC:\/ncs\/v3.1.1\/nrf\/include -IC:\/ncs\/v3.1.1\/nrf\/lib\/multithread ing_lock\/. -IC:\/ncs\/v3.1.1\/nrf\/subsys\/bluetooth\/controller\/. -IC:\/ncs\/v3.1.1\/nrf\/subsys\/settings\/include -IC:\/ncs\/v3.1.1\/zephyr\/drivers\/flash -IC:\/ncs\/v3.1.1\/nrf\/tests\/include -IC:\/ncs\/v3.1.1\/modules\/ hal\/cmsis\/CMSIS\/Core\/Include -IC:\/ncs\/v3.1.1\/modules\/hal\/cmsis_6\/CMSIS\/Core\/Include -IC:\/ncs\/v3.1.1\/zephyr\/modules\/cmsis_6\/. -IC:\/ncs\/v3.1.1\/nrf\/modules\/hal_nordic\/. -IC:\/ncs\/v3.1.1\/modules\/hal\/nordic \/nrfx -IC:\/ncs\/v3.1.1\/modules\/hal\/nordic\/nrfx\/drivers\/include -IC:\/ncs\/v3.1.1\/modules\/hal\/nordic\/nrfx\/mdk -IC:\/ncs\/v3.1.1\/zephyr\/modules\/hal_nordic\/nrfx\/. -IC:\/ncs\/v3.1.1\/modules\/debug\/segger\/SEGGER - IC:\/ncs\/v3.1.1\/modules\/debug\/segger\/Config -IC:\/ncs\/v3.1.1\/nrfxlib\/softdevice_controller\/include -IC:\/ncs\/v3.1.1\/nrfxlib\/mpsl\/fem\/common\/include -IC:\/ncs\/v3.1.1\/nrfxlib\/mpsl\/fem\/nrf21540_gpio\/include -IC:\/ncs\/v3.1.1\/nrfxlib\/mpsl\/fem\/nrf21540_gpio_spi\/include -IC:\/ncs\/v3.1.1\/nrfxlib\/mpsl\/fem\/nrf2220\/include -IC:\/ncs\/v3.1.1\/nrfxlib\/mpsl\/fem\/nrf2240\/include -IC:\/ncs\/v3.1.1\/nrfxlib\/mpsl\/fem\/nrf22xx\/in clude -IC:\/ncs\/v3.1.1\/nrfxlib\/mpsl\/fem\/simple_gpio\/include -IC:\/ncs\/v3.1.1\/nrfxlib\/mpsl\/fem\/include -IC:\/ncs\/v3.1.1\/nrfxlib\/mpsl\/fem\/include\/protocol -IC:\/ncs\/v3.1.1\/nrfxlib\/mpsl\/include -IC:\/ncs\/v3.1 .1\/nrfxlib\/mpsl\/include\/protocol -IC:\/ncs\/v3.1.1\/zephyr\/samples\/0hec\/fci_ota\/build\/generated\/library_nrf_security_psa -IC:\/ncs\/v3.1.1\/nrf\/subsys\/nrf_security\/include -IC:\/ncs\/v3.1.1\/modules\/crypto\/obe ron-psa-crypto\/oberon\/drivers -IC:\/ncs\/v3.1.1\/nrf\/subsys\/nrf_security\/src\/threading\/include -IC:\/ncs\/v3.1.1\/nrf\/subsys\/nrf_security\/src\/utils -IC:\/ncs\/v3.1.1\/nrf\/subsys\/nrf_security\/src\/drivers\/cracen \/common\/include -IC:\/ncs\/v3.1.1\/nrf\/subsys\/nrf_security\/src\/drivers\/cracen\/sxsymcrypt\/include -IC:\/ncs\/v3.1.1\/nrf\/subsys\/nrf_security\/src\/drivers\/cracen\/silexpk\/target\/baremetal_ba414e_with_ik -IC:\/nc s\/v3.1.1\/nrf\/subsys\/nrf_security\/src\/drivers\/cracen\/silexpk\/include -IC:\/ncs\/v3.1.1\/nrf\/subsys\/nrf_security\/src\/drivers\/cracen\/cracenpsa\/include -IC:\/ncs\/v3.1.1\/modules\/crypto\/oberon-psa-crypto\/includ e -IC:\/ncs\/v3.1.1\/modules\/crypto\/oberon-psa-crypto\/library -IC:\/ncs\/v3.1.1\/modules\/crypto\/mbedtls\/library -IC:\/ncs\/v3.1.1\/modules\/crypto\/mbedtls\/include -IC:\/ncs\/v3.1.1\/modules\/crypto\/mbedtls\/include\/ library -isystem C:\/ncs\/v3.1.1\/zephyr\/lib\/libc\/common\/include -fno-strict-aliasing -Os -imacros C:\/ncs\/v3.1.1\/zephyr\/samples\/0hec\/fci_ota\/build\/zephyr\/include\/generated\/zephyr\/autoconf.h -fno-printf-r eturn-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft --sysroot=C:\/ncs\/toolchains\/c1a76fddb2\/opt\/zephyr-sdk\/arm-zephyr-eabi\/ arm-zephyr-eabi -imacros C:\/ncs\/v3.1.1\/zephyr\/include\/zephyr\/toolchain\/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -We xpansion-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=C:\/ncs\/v3.1.1\/zephyr\/samples\/0hec\/fci_ota=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:\/ncs\/v3.1.1\/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:\/ncs\/v3.1.1=WEST_TOPDIR -ffunction-sections - fdata-sections -specs=picolibc.specs -std=c99 -MD -MT modules\/nrf\/subsys\/mpsl\/init\/CMakeFiles\/..__nrf__subsys__mpsl__init.dir\/mpsl_init.c.obj -MF modules\\nrf\\subsys\\mpsl\\init\\CMakeFiles\\..__nrf__subsy s__mpsl__init.dir\\mpsl_init.c.obj.d -o modules\/nrf\/subsys\/mpsl\/init\/CMakeFiles\/..__nrf__subsys__mpsl__init.dir\/mpsl_init.c.obj -c C:\/ncs\/v3.1.1\/nrf\/subsys\/mpsl\/init\/mpsl_init.c C:\/ncs\/v3.1.1\/nrf\/subsys\/mpsl\/init\/mpsl_init.c: In function 'm_config_clock_source_get': C:\/ncs\/v3.1.1\/nrf\/subsys\/mpsl\/init\/mpsl_init.c:335:10: error: #error \"Clock source is not supported or not defined\" 335 | #error \"Clock source is not supported or not defined\" | ^~~~~ C:\/ncs\/v3.1.1\/nrf\/subsys\/mpsl\/init\/mpsl_init.c: In function 'mpsl_lib_init_internal': C:\/ncs\/v3.1.1\/nrf\/subsys\/mpsl\/init\/mpsl_init.c:377:34: error: 'CONFIG_CLOCK_CONTROL_NRF_ACCURACY' undeclared (first use in this function); did you mean 'CONFIG_CLOCK_CONTROL_NRF_FORCE_ALT'? 377 | clock_cfg.accuracy_ppm = CONFIG_CLOCK_CONTROL_NRF_ACCURACY; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | CONFIG_CLOCK_CONTROL_NRF_FORCE_ALT C:\/ncs\/v3.1.1\/nrf\/subsys\/mpsl\/init\/mpsl_init.c:377:34: note: each undeclared identifier is reported only once for each function it appears in &#91;300\/341] Building C object modules\/hal_nordic\/modules\/hal_nordic\/nrfx\/CMakeFiles\/modules__hal_nordic__nrfx.dir\/C_\/ncs\/v3.1.1\/modules\/hal\/nordic\/nrfx\/drivers\/src\/nrfx_spim.c.obj ninja: build stopped: subcommand failed. FATAL ERROR: command exited with status 1: 'C:\\ncs\\toolchains\\c1a76fddb2\\opt\\bin\\cmake.EXE' --build 'c:\\ncs\\v3.1.1\\zephyr\\samples\\0hec\\fci_ota\\build' * The terminal process terminated with exit code: 1.<\/code><\/pre>\n\n\n\n<p>\u5c1d\u8bd5\u5728prj.conf\u91cc\u6dfb\u52a0\u5982\u4e0b\u5185\u5bb9\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u4f7f\u7528\u5916\u90e8\u6676\u632f\u4f5c\u4e3a\u4f4e\u9891 32k \u6e90\nCONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y\n\n# \u4f4e\u9891\u6676\u632f\u7cbe\u5ea6 (ppm) \u2014 \u6839\u636e\u6676\u632f\u89c4\u683c\u586b\u5199\uff0c\u5e38\u89c1\u6676\u632f\u5199 20\uff08\u793a\u4f8b\uff09\nCONFIG_CLOCK_CONTROL_NRF_ACCURACY=20\n\n# \u53ef\u9009\uff1a\u5f3a\u5236\u4f7f\u7528\u66ff\u4ee3\u9a71\u52a8\uff08\u4e00\u822c\u4e0d\u9700\u8981\uff09\n#CONFIG_CLOCK_CONTROL_NRF_FORCE_ALT=n<\/code><\/pre>\n\n\n\n<p>\u4ee5\u4e0a\u662f\u6839\u636e\u9519\u8bef\u63d0\u793a\uff0c\u6dfb\u52a0\u4f4e\u9891\u6676\u632f\/RC\u76f8\u5173\u5185\u5bb9\uff0c\u4f9d\u65e7\u62a5\u9519\uff0c\u7ecfChatGPT\u548cnordic\u5b98\u65b9\u7684AI\u5206\u6790\u4ecd\u65e7\u65e0\u6cd5\u89e3\u51b3\uff0c\u9042\u5c1d\u8bd5\u6062\u590dncs\u5230\u539f\u59cb\u7248\u672c\uff0c\u4e00\u5207\u6062\u590d\u6b63\u5e38\u3002<\/p>\n\n\n\n<p>\u6062\u590dncs\u5230\u539f\u59cb\u7248\u672c\u7684\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd C:\\ncs\\v3.1.1\nwest forall -c \"git reset --hard\"\nwest forall -c \"git clean -fd\"  \/\/\/\/\u6ce8\u610f\u8fd9\u4e2a\u547d\u4ee4\u5371\u9669\nwest update<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728ncs v3.1.1\u7a0b\u5e8f\u7f16\u8bd1\u4e2d\uff0c\u53d1\u73b0\u62a5\u9519\uff1a \u5c1d\u8bd5\u5728prj.conf\u91cc\u6dfb\u52a0\u5982\u4e0b\u5185\u5bb9\uff1a \u4ee5\u4e0a\u662f\u6839\u636e\u9519\u8bef&hellip; <a href=\"https:\/\/szddt.com\/?p=328\" class=\"more-link read-more\" rel=\"bookmark\">\u7ee7\u7eed\u9605\u8bfb <span class=\"screen-reader-text\">\u201cClock source is not supported or not defined\u201d\u9519\u8bef\u7684\u4e00\u79cd\u89e3\u51b3\u529e\u6cd5<\/span><i class=\"fa fa-arrow-right\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":{"0":"post-328","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-4","7":"h-entry","9":"h-as-article"},"_links":{"self":[{"href":"https:\/\/szddt.com\/index.php?rest_route=\/wp\/v2\/posts\/328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/szddt.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/szddt.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/szddt.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/szddt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=328"}],"version-history":[{"count":1,"href":"https:\/\/szddt.com\/index.php?rest_route=\/wp\/v2\/posts\/328\/revisions"}],"predecessor-version":[{"id":329,"href":"https:\/\/szddt.com\/index.php?rest_route=\/wp\/v2\/posts\/328\/revisions\/329"}],"wp:attachment":[{"href":"https:\/\/szddt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/szddt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/szddt.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}