• Lv0
    粉丝0

积分4 / 贡献0

提问2答案被采纳0文章0

作者动态

按照教程进行环境搭建在测试talkweb 的 STM32F407板子的时候出现错误

guisuanzi 显示全部楼层 发表于 2023-11-24 15:25:25

【问题描述】

  1. 介绍问题现象和发生的背景
    1. 按照官方教程进行环境搭建(命令行方式 )

调试打印示例

Hello World

沿袭程序界的传统,第一个程序都是Hello World。在Niobe407 开发板中,指的是通过开发板串口,在串口日志中输出Hello World字符串。

在Niobe407开发板系统代码中,Hello World程序位于applications目录下面,具体路径如下:

device/board/talkweb/niobe407/applications/001_system_helloworld/hello_world.c

编译调试

  • 进入//kernel/liteos_m目录, 在menuconfig配置中进入如下选项:

    (Top) → Platform → Board Selection → select board niobe407 → use talkweb niobe407 application → niobe407 application choose

  • 选择 001_system_helloworld

  • 回到sdk根目录,执行hb build -f脚本进行编译。

运行结果

示例代码编译烧录代码后,按下开发板的RESET按键,通过串口助手查看日志,显示内容如下则表示执行成功:

**********************
[Talkweb] Hello world.
**********************

~

  1. 运行结果、错误截图
  2. image.png 求助各位高手,谁能帮忙确认下问题

您尚未登录,无法参与评论,登录后可以:
参与开源共建问题交流
认同或收藏高质量问答
获取积分成为开源共建先驱

精彩评论8

guisuanzi

沙发 发表于 2023-11-24 16:02:20

我尝试了一下,部分指令可以运行,比如 python3 build.py -p qemu_small_system_demo@ohemu

python3 build.py -p ipcamera_hispark_taurus@hisilicon

但是其他的,不行,一运行就出错 [OHOS ERROR] Traceback (most recent call last): [OHOS ERROR] File "/home/xyc/harmony/build/hb/containers/status.py", line 47, in wrapper [OHOS ERROR] return func(*args, **kwargs) [OHOS ERROR] File "/home/xyc/harmony/build/hb/modules/ohos_build_module.py", line 65, in run [OHOS ERROR] super().run() [OHOS ERROR] File "/home/xyc/harmony/build/hb/modules/interface/build_module_interface.py", line 65, in run [OHOS ERROR] self._load() [OHOS ERROR] File "/home/xyc/harmony/build/hb/modules/ohos_build_module.py", line 84, in _load [OHOS ERROR] self.loader.run() [OHOS ERROR] File "/home/xyc/harmony/build/hb/services/interface/load_interface.py", line 45, in run [OHOS ERROR] self.post_init() [OHOS ERROR] File "/home/xyc/harmony/build/hb/services/loader.py", line 117, in post_init [OHOS ERROR] self.parts_config_info = load_ohos_build.get_parts_info( [OHOS ERROR] File "/home/xyc/harmony/build/hb/util/loader/load_ohos_build.py", line 884, in get_parts_info [OHOS ERROR] _output_parts_info(parts_config_dict, [OHOS ERROR] File "/home/xyc/harmony/build/hb/util/loader/load_ohos_build.py", line 697, in _output_parts_info [OHOS ERROR] check_subsystem_and_component(parts_info_output_path, skip_partlist_check) [OHOS ERROR] File "/home/xyc/harmony/build/hb/util/loader/load_ohos_build.py", line 672, in check_subsystem_and_component [OHOS ERROR] compare_subsystem_and_component(subsystem_name, components_name, subsystem_compoents_whitelist_info, [OHOS ERROR] File "/home/xyc/harmony/build/hb/util/loader/load_ohos_build.py", line 639, in compare_subsystem_and_component [OHOS ERROR] raise Exception(message) [OHOS ERROR] Exception: find component device_gr5515_sk failed, please check it in /home/xyc/harmony/out/preloader/gr5515_sk_xts_demo/parts.json. [OHOS ERROR] [OHOS ERROR] Code: 0000 [OHOS ERROR] [OHOS ERROR] Reason: find component device_gr5515_sk failed, please check it in /home/xyc/harmony/out/preloader/gr5515_sk_xts_demo/parts.json. [OHOS ERROR] [OHOS ERROR] Solution: no solution [OHOS ERROR]

dragon

板凳 发表于 2023-11-24 21:02:14

按照教程进行环境搭建在测试talkweb 的 STM32F407板子的时候出现错误

本帖最后由 dragon 于 2023-11-25 09:26 编辑

手上没有这块板子,也不知道您用的哪个版本的OpenHarmony,也不清楚您编译环境配置的是否正确。

只能猜测。

在源码根目录下尝试以下步骤:

python3 -m pip install --user build/hb

hb set
选择对应开发板
hb build

guisuanzi

发表于 2023-12-6 16:17  IP属地: 山东省济南市

回复 dragon: 我是用的最新的,OpenHarmony4.0;方便加你微信吗,或者加我18678873658

guisuanzi

发表于 2023-12-6 16:21  IP属地: 山东省济南市

回复 dragon: 使用的OpenHarmony 4.0  按照您的建议,状态依旧如下:
xyc@xyc-SER:~$ python3 -m pip install --user build/hb
Processing ./build/hb
Requirement already satisfied: PyYAML in /usr/lib/python3/dist-packages (from ohos-build==1.0.0) (5.3.1)
Requirement already satisfied: kconfiglib>=14.1.0 in ./.local/lib/python3.8/site-packages (from ohos-build==1.0.0) (14.1.0)
Requirement already satisfied: prompt_toolkit==1.0.14 in ./.local/lib/python3.8/site-packages (from ohos-build==1.0.0) (1.0.14)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from ohos-build==1.0.0) (2.22.0)
Requirement already satisfied: wcwidth in ./.local/lib/python3.8/site-packages (from prompt_toolkit==1.0.14->ohos-build==1.0.0) (0.2.12)
Requirement already satisfied: six>=1.9.0 in /usr/lib/python3/dist-packages (from prompt_toolkit==1.0.14->ohos-build==1.0.0) (1.14.0)
Building wheels for collected packages: ohos-build
  Building wheel for ohos-build (setup.py) ... done
  Created wheel for ohos-build: filename=ohos_build-1.0.0-py3-none-any.whl size=6722 sha256=fd5a839b3d51483fc4b52e3dc5cbaa950fe90c6e6388077fac1af88bf3f7e5c4
  Stored in directory: /tmp/pip-ephem-wheel-cache-846yg4hh/wheels/f8/18/71/17ad38a9b760d84b8fb6f8a13ff86cb726ff6f663fb5dfb44b
Successfully built ohos-build
Installing collected packages: ohos-build
  Attempting uninstall: ohos-build
    Found existing installation: ohos-build 1.0.0
    Uninstalling ohos-build-1.0.0:
      Successfully uninstalled ohos-build-1.0.0
Successfully installed ohos-build-1.0.0
xyc@xyc-SER:~$ hb set
OHOS Which os_level do you need?  mini
OHOS Which product do you need?  niobe407
xyc@xyc-SER:~$ hb build -f
[OHOS INFO] Set cache size limit to 100.0 GB
[OHOS WARNING] The target_cpu needs to be specified, default target_cpu=arm
[OHOS INFO] generated build prop info to /home/xyc/out/preloader/niobe407/build.prop
[OHOS INFO] generated build config info to /home/xyc/out/preloader/niobe407/build_config.json
[OHOS INFO] generated product parts info to /home/xyc/out/preloader/niobe407/parts.json
[OHOS INFO] generated parts config info to /home/xyc/out/preloader/niobe407/parts_config.json
[OHOS INFO] generated build gnargs prop info to /home/xyc/out/preloader/niobe407/build_gnargs.prop
[OHOS INFO] generated features info to /home/xyc/out/preloader/niobe407/features.json
[OHOS INFO] generated syscap info to /home/xyc/out/preloader/niobe407/syscap.json
[OHOS INFO] generated exclusion modules info to /home/xyc/out/preloader/niobe407/exclusion_modules.json
[OHOS INFO] generated platforms build info to /home/xyc/out/preloader/niobe407/platforms.build
[OHOS INFO] generated subsystem config info to /home/xyc/out/preloader/niobe407/subsystem_config.json
[OHOS INFO] generated system capability info to /home/xyc/out/preloader/niobe407/systemcapability.json
[OHOS INFO] generated compile_standard_whitelist info to /home/xyc/out/preloader/niobe407/compile_standard_whitelist.json
[OHOS INFO] generated compile_env_allowlist info to /home/xyc/out/preloader/niobe407/compile_env_allowlist.json
[OHOS INFO] Checking all build args...
[OHOS INFO] subsytem config scan completed
[OHOS INFO] generate all parts of platforms info to '/home/xyc/out/niobe407/niobe407/build_configs/platforms_info/all_parts.json'
[OHOS INFO] generate toolchain to variant of platforms info to '/home/xyc/out/niobe407/niobe407/build_configs/platforms_info/toolchain_to_variant.json'
[OHOS INFO] generate all parts build gn file to '/home/xyc//out/niobe407/niobe407/build_configs'
[OHOS INFO] generate parts info to '/home/xyc/out/niobe407/niobe407/build_configs/parts_info/parts_info.json'
[OHOS INFO] generate part-subsystem of parts-info to '/home/xyc/out/niobe407/niobe407/build_configs/parts_info/part_subsystem.json'
[OHOS ERROR] Traceback (most recent call last):
[OHOS ERROR]   File "/home/xyc/build/hb/containers/status.py", line 47, in wrapper
[OHOS ERROR]     return func(*args, **kwargs)
[OHOS ERROR]   File "/home/xyc/build/hb/modules/ohos_build_module.py", line 65, in run
[OHOS ERROR]     super().run()
[OHOS ERROR]   File "/home/xyc/build/hb/modules/interface/build_module_interface.py", line 65, in run
[OHOS ERROR]     self._load()
[OHOS ERROR]   File "/home/xyc/build/hb/modules/ohos_build_module.py", line 84, in _load
[OHOS ERROR]     self.loader.run()
[OHOS ERROR]   File "/home/xyc/build/hb/services/interface/load_interface.py", line 45, in run
[OHOS ERROR]     self.__post_init__()
[OHOS ERROR]   File "/home/xyc/build/hb/services/loader.py", line 117, in __post_init__
[OHOS ERROR]     self.parts_config_info = load_ohos_build.get_parts_info(
[OHOS ERROR]   File "/home/xyc/build/hb/util/loader/load_ohos_build.py", line 884, in get_parts_info
[OHOS ERROR]     _output_parts_info(parts_config_dict,
[OHOS ERROR]   File "/home/xyc/build/hb/util/loader/load_ohos_build.py", line 697, in _output_parts_info
[OHOS ERROR]     check_subsystem_and_component(parts_info_output_path, skip_partlist_check)
[OHOS ERROR]   File "/home/xyc/build/hb/util/loader/load_ohos_build.py", line 672, in check_subsystem_and_component
[OHOS ERROR]     compare_subsystem_and_component(subsystem_name, components_name, subsystem_compoents_whitelist_info,
[OHOS ERROR]   File "/home/xyc/build/hb/util/loader/load_ohos_build.py", line 639, in compare_subsystem_and_component
[OHOS ERROR]     raise Exception(message)
[OHOS ERROR] Exception: find component product_niobe407 failed, please check it in /home/xyc/out/preloader/niobe407/parts.json.
[OHOS ERROR]
[OHOS ERROR] Code:      0000
[OHOS ERROR]
[OHOS ERROR] Reason:    find component product_niobe407 failed, please check it in /home/xyc/out/preloader/niobe407/parts.json.
[OHOS ERROR]
[OHOS ERROR] Solution:  no solution
[OHOS ERROR]

guisuanzi

发表于 2023-12-6 17:01  IP属地: 山东省济南市

回复 dragon: 还有一个点,我如果执行qemu_mini_system_demo 示例,就可以顺利编译下来,所以应该不是环境的问题。

【4 条回复】 查看全部
共8 条回复,点击查看

Copyright   ©2023  OpenHarmony开发者论坛  京ICP备2020036654号-3 |技术支持 Discuz!

返回顶部