This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 6: invalid start byte

Microsoft Windows [版本 10.0.18363.1198]
(c) 2019 Microsoft Corporation。保留所有权利。

D:\ncs\v1.6.0>cd zephyr\samples\hello_world

D:\ncs\v1.6.0\zephyr\samples\hello_world>west build -b nrf9160dk_nrf9160ns --build-dir build_nrf9160dk_nrf9160ns -p
-- west build: generating a build system
Including boilerplate (Zephyr base): D:/ncs/v1.6.0/zephyr/cmake/app/boilerplate.cmake
-- Application: D:/ncs/v1.6.0/zephyr/samples/hello_world
-- Using NCS Toolchain 1.6.0 for building. (D:/ncs/v1.6.0/toolchain/cmake)
-- Zephyr version: 2.6.0-rc1 (D:/ncs/v1.6.0/zephyr), build: v2.6.0-rc1-ncs1
-- Found Python3: D:/ncs/v1.6.0/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Found west (found suitable version "0.11.0", minimum required is "0.7.1")
-- Board: nrf9160dk_nrf9160ns, Revision: 0.7.0
-- Cache files will be written to: D:/ncs/v1.6.0/zephyr/.cache
-- Found dtc: D:/ncs/v1.6.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (D:/ncs/v1.6.0/toolchain/opt)
-- Found BOARD.dts: D:/ncs/v1.6.0/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns.dts
-- Generated zephyr.dts: D:/ncs/v1.6.0/zephyr/samples/hello_world/build_nrf9160dk_nrf9160ns/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: D:/ncs/v1.6.0/zephyr/samples/hello_world/build_nrf9160dk_nrf9160ns/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: D:/ncs/v1.6.0/zephyr/samples/hello_world/build_nrf9160dk_nrf9160ns/zephyr/include/generated/device_extern.h
Parsing D:/ncs/v1.6.0/zephyr/Kconfig
Loaded configuration 'D:/ncs/v1.6.0/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns_defconfig'
Merged configuration 'D:/ncs/v1.6.0/zephyr/samples/hello_world/prj.conf'
Configuration saved to 'D:/ncs/v1.6.0/zephyr/samples/hello_world/build_nrf9160dk_nrf9160ns/zephyr/.config'
Kconfig header saved to 'D:/ncs/v1.6.0/zephyr/samples/hello_world/build_nrf9160dk_nrf9160ns/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: D:/ncs/v1.6.0/toolchain/opt/bin/arm-none-eabi-gcc.exe
Changed board to secure nrf9160dk_nrf9160 (NOT NS)

=== child image spm -  begin ===
Including boilerplate (Zephyr base): D:/ncs/v1.6.0/zephyr/cmake/app/boilerplate.cmake
-- Application: D:/ncs/v1.6.0/nrf/samples/spm
-- Using NCS Toolchain 1.6.0 for building. (D:/ncs/v1.6.0/toolchain/cmake)
-- Zephyr version: 2.6.0-rc1 (D:/ncs/v1.6.0/zephyr), build: v2.6.0-rc1-ncs1
-- Found Python3: D:/ncs/v1.6.0/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Found west (found suitable version "0.11.0", minimum required is "0.7.1")
-- Board: nrf9160dk_nrf9160, Revision: 0.7.0
-- Cache files will be written to: D:/ncs/v1.6.0/zephyr/.cache
-- Found dtc: D:/ncs/v1.6.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (D:/ncs/v1.6.0/toolchain/opt)
-- Found BOARD.dts: D:/ncs/v1.6.0/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160.dts
-- Found devicetree overlay: D:/ncs/v1.6.0/nrf/samples/spm/nrf9160dk_nrf9160.overlay
-- Generated zephyr.dts: D:/ncs/v1.6.0/zephyr/samples/hello_world/build_nrf9160dk_nrf9160ns/spm/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: D:/ncs/v1.6.0/zephyr/samples/hello_world/build_nrf9160dk_nrf9160ns/spm/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: D:/ncs/v1.6.0/zephyr/samples/hello_world/build_nrf9160dk_nrf9160ns/spm/zephyr/include/generated/device_extern.h
Parsing D:/ncs/v1.6.0/zephyr/Kconfig
Loaded configuration 'D:/ncs/v1.6.0/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_defconfig'
Merged configuration 'D:/ncs/v1.6.0/nrf/samples/spm/prj.conf'
Merged configuration 'D:/ncs/v1.6.0/nrf/samples/spm/boards/nrf9160dk_nrf9160.conf'
Merged configuration 'D:/ncs/v1.6.0/nrf/subsys/partition_manager/partition_manager_enabled.conf'
Merged configuration 'D:/ncs/v1.6.0/zephyr/samples/hello_world/build_nrf9160dk_nrf9160ns/spm/zephyr/misc/generated/extra_kconfig_options.conf'
Configuration saved to 'D:/ncs/v1.6.0/zephyr/samples/hello_world/build_nrf9160dk_nrf9160ns/spm/zephyr/.config'
Kconfig header saved to 'D:/ncs/v1.6.0/zephyr/samples/hello_world/build_nrf9160dk_nrf9160ns/spm/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: D:/ncs/v1.6.0/toolchain/opt/bin/arm-none-eabi-gcc.exe
CMake Warning at D:/ncs/v1.6.0/zephyr/CMakeLists.txt:1607 (message):
  __ASSERT() statements are globally ENABLED


-- Configuring done
-- Generating done
-- Build files have been written to: D:/ncs/v1.6.0/zephyr/samples/hello_world/build_nrf9160dk_nrf9160ns/spm
=== child image spm -  end ===

-- Configuring done
-- Generating done
-- Build files have been written to: D:/ncs/v1.6.0/zephyr/samples/hello_world/build_nrf9160dk_nrf9160ns
Traceback (most recent call last):
  File "runpy.py", line 193, in _run_module_as_main
  File "runpy.py", line 86, in _run_code
  File "D:\ncs\v1.6.0\toolchain\opt\bin\Scripts\west.exe\__main__.py", line 7, in <module>
  File "D:\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\main.py", line 779, in main
    app.run(argv or sys.argv[1:])
  File "D:\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\main.py", line 106, in run
    self.run_command(argv)
  File "D:\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\main.py", line 338, in run_command
    self.run_extension(args.command, argv)
  File "D:\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\app\main.py", line 408, in run_extension
    command.run(args, unknown, self.topdir, manifest=self.manifest)
  File "D:\ncs\v1.6.0\toolchain\opt\bin\Lib\site-packages\west\commands.py", line 132, in run
    self.do_run(args, unknown)
  File "D:\ncs\v1.6.0\zephyr\scripts\west_commands\build.py", line 184, in do_run
    self._update_cache()
  File "D:\ncs\v1.6.0\zephyr\scripts\west_commands\build.py", line 236, in _update_cache
    self.cmake_cache = CMakeCache.from_build_dir(self.build_dir)
  File "D:\ncs\v1.6.0\zephyr\scripts/west_commands\zcmake.py", line 213, in from_build_dir
    return CMakeCache(os.path.join(build_dir, DEFAULT_CACHE))
  File "D:\ncs\v1.6.0\zephyr\scripts/west_commands\zcmake.py", line 217, in __init__
    self.load(cache_file)
  File "D:\ncs\v1.6.0\zephyr\scripts/west_commands\zcmake.py", line 222, in load
    for line_no, line in enumerate(cache):
  File "codecs.py", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 6: invalid start byte

Excuse me:

                    An error occurred when I compiled the project with West,How to solve this problem?

Parents Reply Children
Related