CMake Error at C:/ncs/v2.9.0/zephyr/cmake/modules/boards.cmake:196 (message): Error finding board: nrf52833dk

Hi guys, I am using the SDK v2.9.0 and the toolchains b620d30767. To add the build configuration for the sample peripheral_uart, the console print some error log.The log as below:

uilding peripheral_uart

-- west build: generating a build system
Loading Zephyr module(s) (Zephyr base): sysbuild_default
-- Found Python3: C:/ncs/toolchains/b620d30767/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.8") found components: Interpreter
-- Cache files will be written to: C:/ncs/v2.9.0/zephyr/.cache
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
CMake Error at C:/ncs/v2.9.0/zephyr/cmake/modules/boards.cmake:196 (message):
Error finding board: nrf52833dk

Error message: Traceback (most recent call last):

File "C:\ncs\v2.9.0\zephyr\scripts\list_boards.py", line 469, in <module>
dump_v2_boards(args)
File "C:\ncs\v2.9.0\zephyr\scripts\list_boards.py", line 416, in dump_v2_boards
boards = find_v2_boards(args)
^^^^^^^^^^^^^^^^^^^^
File "C:\ncs\v2.9.0\zephyr\scripts\list_boards.py", line 341, in find_v2_boards
b, e = load_v2_boards(args.board, board_yml, systems)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ncs\v2.9.0\zephyr\scripts\list_boards.py", line 230, in load_v2_boards
b = yaml.load(f.read(), Loader=SafeLoader)
^^^^^^^^

UnicodeDecodeError: 'gbk' codec can't decode byte 0xa2 in position 46:
illegal multibyte sequence

Call Stack (most recent call first):
cmake/modules/sysbuild_default.cmake:15 (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:/ncs/v2.9.0/nrf/samples/bluetooth/peripheral_uart/build_6/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:\ncs\v2.9.0\nrf\samples\bluetooth\peripheral_uart\build_6' -GNinja -DBOARD=nrf52833dk/nrf52820 -DNCS_TOOLCHAIN_VERSION=NONE '-SC:\ncs\v2.9.0\zephyr\share\sysbuild' '-DAPP_DIR:PATH=c:\ncs\v2.9.0\nrf\samples\bluetooth\peripheral_uart'

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

Could you help me to fix it? thank you!the window

Parents
  • Strange. I have no experience developing using Visual Studio Code or Windows unfortunately. But with the same version of the toolchain on Linux, I get another, very unrelated, error when building using the command line:

    $ west build --build-dir build/peripheral_uart --board nrf52833dk/nrf52820 nrf/samples/bluetooth/peripheral_uart
    
    [...]
    
    /home/jakob/ncs/toolchains/b77d8c1312/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/zephyr_pre0.elf section `noinit' will not fit in region `RAM'
    /home/jakob/ncs/toolchains/b77d8c1312/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: region `RAM' overflowed by 1348 bytes
    collect2: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.

    So it seems like the MCU does not have enough RAM for this sample application. The same sample works for example when I build it for the board `nrf52840dk/nrf52840`, like so:

    $ west build --build-dir build/peripheral_uart_nrf52840 --board nrf52840dk/nrf52840 nrf/samples/bluetooth/peripheral_uart
    
    [...]
    
    [241/241] Linking C executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:      226960 B       992 KB     22.34%
                 RAM:       38660 B       256 KB     14.75%
            IDT_LIST:          0 GB        32 KB      0.00%
    Generating files from /home/jakob/prog/libs/nrfproject/build/peripheral_uart_nrf52840/peripheral_uart/zephyr/zephyr.elf for board: nrf52840dk
    [10/10] Generating ../merged.hex
    

    However. That is probably very unrelated to what you are experiencing.

    Some things to test:

    - Can you build that example for another board?

    - Can you build another sample applications for that board or another?

    - Is it possible that some file in your SDK/toolchain has been accidentally modified or corrupted?

  • Thank you sir, maybe there are something wrong with the nRF Connect SDK which i got. I got the SDK from another way and everything is well. Have a nice day!

  • Great to hear that! Please consider to mark this question as solved. Good luck with your project!

Reply Children
No Data
Related