Re: How to resolve FATAL ERROR that displayed when I edited, modified some files.


Dicek Bear
 

Dear Zephyr Users, Developers,

Thank you for good support.
I did not know that header files and c-sources comments can not  include any irregular code that represent some languages' characters except alphabet.

Now I replaced all comments to the alphabet. Then the problem is solved.  

Thank you and best regards,
Dicek Bear.

2020年9月11日(金) 12:20 Dicek Bear via lists.zephyrproject.org <dicek334=gmail.com@...>:

Dear Zephyr Users, Developers,

I am a beginner of Zepher OS, so it is too difficult to analyze the following problem.
Please teach me how to resolve it.

First step,
I install the development environment as following "Getting Started Guide "https://docs.zephyrproject.org/latest/getting_started/index.html".
Then I try some samples and demos, 'hello_world', 'blinky', 'Button','console_getchar() Sample Application','console_getline() Sample Application'
and so on. The build command is "$ west build -p auto -b atsamr21_xpro samples/hello_world/".

Second step,
I edit, modify some header files and c-source files, then I rebuild 'hello_world' sample again. It is no problem.
The rebuild command is "$ west build -p auto -b atsamr21_xpro samples/hello_world/".

Third step,
I clean the build files. The clean command  is "$west build -t clean". It is no problem.

Fourth step,
I try to build again with the same build command "$ west build -p auto -b atsamr21_xpro samples/hello_world/". It causes 'FATAL ERROR".
The following is the displayed messages.

==================================================================================================================================
vagrant@ubuntu2004:~/zephyrproject/zephyr$ west build -p auto -b atsamr21_xpro samples/hello_world/
[1/122] Preparing syscall dependency handling
[3/122] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
FAILED: zephyr/misc/generated/syscalls.json zephyr/misc/generated/struct_tags.json
cd /home/vagrant/zephyrproject/zephyr/build/zephyr && /usr/bin/python3.8 /home/vagrant/zephyrproject/zephyr/scripts/parse_syscalls.py --include /home/vagrant/zephyrproject/zephyr/include --include /home/vagrant/zephyrproject/zephyr/drivers --include /home/vagrant/zephyrproject/zephyr/subsys/net --json-file /home/vagrant/zephyrproject/zephyr/build/zephyr/misc/generated/syscalls.json --tag-struct-file /home/vagrant/zephyrproject/zephyr/build/zephyr/misc/generated/struct_tags.json
Traceback (most recent call last):
  File "/home/vagrant/zephyrproject/zephyr/scripts/parse_syscalls.py", line 153, in <module>
    main()
  File "/home/vagrant/zephyrproject/zephyr/scripts/parse_syscalls.py", line 132, in main
    syscalls, tagged = analyze_headers(args.include)
  File "/home/vagrant/zephyrproject/zephyr/scripts/parse_syscalls.py", line 80, in analyze_headers
    contents = fp.read()
  File "/usr/lib/python3.8/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8f in position 16151: invalid start byte
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/bin/cmake --build /home/vagrant/zephyrproject/zephyr/build
==================================================================================================================================

Are there any rules to edit, modify header files and c-source files ?.

Thank you and best regards,
Dicek Bear.

Join users@lists.zephyrproject.org to automatically receive all group messages.