OpenHarmony开发者论坛

标题: OpenHarmony4.1移植到stm32f407vgt6上的问题 [打印本页]

作者: zhangzhenxing    时间: 2024-12-9 13:39
标题: OpenHarmony4.1移植到stm32f407vgt6上的问题
[md][轻量系统STM32F407芯片移植案例 (openharmony.cn)](https://docs.openharmony.cn/page ... n-minisystem-eth.md)

我按照以上官方文档中stm32f407的移植步骤进行操作,在使用hb build -f进行编译时出现以下问题:

![image.png](https://forums-obs.openharmony.c ... irnx9v99zrxavtd.png "image.png")

提示找不到组件device_zzxing407,zzxing407是我创建的设备名称,也按照步骤一步一步操作了,请问为什么会出现这种问题,是我哪里配置的不对吗,问题出在哪里呢?

我刚开始做移植,有些地方不明白,希望各位大牛帮帮忙,指出我的问题所在。
[/md]
作者: fengyunrenwu    时间: 2024-12-17 09:12
标题: OpenHarmony4.1移植到stm32f407vgt6上的问题
[md]通过build/tools/product\_config\_version\_convert.py中的merge\_file方法生成config.json,这个方法根据找到productdefine/common目录下对应产品的json文件(记录当前产品需要编译哪些组件),找到后将其写到config.json中。

![image.png](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAABuCAIAAABwe1feAAASiElEQVR4Ae2dwYscxxWHdcifkVvSAznIWlu2hIyMZUNkkC9B8iEhEO+ufLAkgwjBpwScGYJPNtg+JCwegsjBh7iHyDgJBINmhxBddnIL+Op/IMecFapevVevuqt3ZnqqZ2qmf8til3pqqqq/nv2q9nVvvQtFMdji9+HJbHZytMoAjsbTeTmKjnlYzsth8+kMJ/MV+4r2Yg5ev/7Kw4cPr19/ZZWRN7aGRkAABEAgSuBCUQwuXX3pUtxrBy9dPYi+LdXBDQu6wewrq/POnbfu3bufCgLaAQEQAIEogQtF8bPPvj59/PHdmqMP7n7299OvPvppxN3Dcj4bj8azuf2ajg+pzvF4Ni/HJ+YwqXA4oRrmgF/bmmrujUNeQQemPh7PpM1iWHIb5ciX51xBurCvci/ShevXrLvd13R8aMdpxkOFketBr6+lWX2QCF6+/OKDB+/duvWmAurb5/pq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En6AIOiEMNEUCNQJJBL07mX1Xm8hyfGEOtDkR1Ske70xQ9AdEEh+udEgCGgCyQStG93dsl7qBivi8Gd7g9JUsZpwDDlAxgo6h6uAMewxAQh6xWUpRU4klNGhNF34QmIXGX4KIegMLwqGtE8EIOgVBd2hkXdvJBD0PrkA55IhgQSCpp9S/Le3BDL8WGNIILAfBCDodXNa99bLcuL78ZOAswCBDAnEBX3hg//Q9w8e/knKKIAACIAACGySwMFv/lL/vvC9a7+g7+LHP5cyCiAAAiAAApsk8MLtd+vfELSbnzZ5JdAXCIAACFQI1O38wu13IWgIGgRAAAS2TwCC3v41qMyZ+CcIgAAIEAEIGoIGARAAgUwJbEDQp98+e/btXxvP//1//+/Zd6ctJsw/fves3Rtb9IW3gAAIgMDmCUQF/X9XcVIQJKCY5AAAAABJRU5ErkJggg==)

在preloader阶段,会扫描一遍当前产品需要编译的模块是否都在这个config.json中有定义,没有的话,就会出现图片中的报错。所以,要解决报错就需要将新添加模块加到对应产品的json文件中。或者通过白名单方式在build/subsystem\_compoents\_whitelist.json文件中将组件加到白名单中。
[/md]
作者: 安念?    时间: 3 天前
哥们你移植成功了没





欢迎光临 OpenHarmony开发者论坛 (https://forums.openharmony.cn/) Powered by Discuz! X3.5