• Home
Name Date Size #Lines LOC

..--

docs/12-May-2024-325195

gpu/12-May-2024-8656

sdk_linux/12-May-2024-49,46827,965

README_zh.mdD12-May-20249.7 KiB187134

soc.gniD12-May-2024752 1815

README_zh.md

1# Hi3751V35X开发指引<a name="ZH-CN_TOPIC_0000001142448981"></a>
2
3-   [简介](#section11660541593)
4-   [目录](#section835037926256)
5-   [许可说明](#section777565921879 )
6-   [开发环境搭建](#section161941989596)
7    -   [系统要求](#section149127526335)
8    -   [IDE方式](#section724948309150)
9    -   [安装包方式](#section204672979943)
10
11-   [代码下载](#section119744591305)
12-   [编译烧录](#section137768191623)
13-   [调试说明](#section1312121216216)
14    -   [hdc工具](#section129654513264)
15    -   [点屏配置](#section864408051434)
16
17-   [相关仓](#section144978787332)
18-   [FAQ](#section1371113476307)
19
20## 简介<a name="section11660541593"></a>
21
22HiSpark-Phoenix是基于海思Hi3751V350智能电视芯片的一块高性能开发板,内置高性能多核 ARM A53 CPU,多核MALI T450 GPU,支持NTSC/PAL/SECAM制式解调,支持DTMB/DVB-C/ATSC/ISDB-T等全球数字Demod,可以扩展DVB-T/T2/S/S2,支持USB播放,支持主流的视频格式包括MPGE2、H.264、H.265、RMVB、AVS+等,支持主流音频解码及音效处理,以及海思自研的SWS音效处理,支持LVDS和miniLVDS接口,支持主流的Tconless屏。
23
24**图 1**  HiSpark_Phoenix单板正面外观图<a name="fig4460722185514"></a>
25
26![hispark_phoenix](docs/figures/zn-cn_image_Hi3751V350.png)
27
28## 目录<a name="section835037926256"></a>
29```
30.
31├── docs    # 资料文档
32│   ├── figures
33│   └── public_sys-resources
34├── gpu
35│   └── lib       # gpu预编译库
36└── sdk_linux     # SDK目录
37    ├── bin       # SDK预编译可执行程序
38    ├── include   # SDK向上提供的接口头文件
39    ├── lib       # SDK用户态驱动和接口库
40    └── source    # SDK内核态驱动源码
41        ├── common
42        │   ├── drv
43        │   │   ├── himedia     # 海思媒体平台驱动
44        │   │   ├── include
45        │   │   ├── mmz         # 海思媒体内存空间管理模块
46        │   │   └── osal        # 驱动适配层,用于屏蔽系统差异,提供统一接口
47        │   └── include
48        └── msp
49            ├── drv
50            │   ├── devfreq     # 芯片调频驱动模块
51            │   ├── gpio        # 通用输入输出驱动模块
52            │   ├── gt911       # 图形处理器驱动模块
53            │   ├── hiirq       # 用户态驱动中断注册管理模块
54            │   ├── hiproc      # 调试信息管理模块
55            │   ├── i2c         # I2C驱动模块
56            │   ├── include
57            │   └── regulator   # 芯片调压驱动模块
58            └── include
59
60```
61
62## 许可说明<a name="section777565921879"></a>
63-   sdk_linux/source/目录下为上海海思自研代码,使用基于GPL许可的Hisilicon (Shanghai) 版权声明,该目录下有LICENSE文件。许可信息和版权信息通常可以在文件开头看到:
64```
65    / *Copyright (C) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED.
66      *
67      * This program is free software; you can redistribute  it and/or modify it
68      * under  the terms of  the GNU General  Public License as published by the
69      * Free Software Foundation;  either version 2 of the  License, or (at your
70      * option) any later version.
71      * ... * /
72```
73
74-   sdk_linux/include目录下为上海海思自研代码,使用基于Apache License Version 2.0许可的Hisilicon (Shanghai) 版权声明,在该目录下有Apache License Version 2.0的LICENSE文件。
75
76-   sdk_linux/binsdk_linux/libgpu/lib下内容为上海海思自研二进制,遵循上海海思的LICENSE,此三者目录下均有LICENSE文件,LICENSE文件中可以看到版权信息:
77```
78    / *End User License Agreement ...  Copyright (C) 2021 Hisilicon (Shanghai) Technologies Co., Ltd. All rights reserved. * /
79
80```
81
82## 开发环境搭建<a name="section161941989596"></a>
83
84通常在嵌入式开发中,开发者习惯于使用Windows进行代码的编辑,比如使用Windows的Visual Studio Code进行OpenHarmony代码的开发。但当前阶段,大部分的开发板源码还不支持在Windows环境下进行编译,如Hi3861、Hi3516和Hi3751系列开发板。因此,建议搭建Windows + Ubuntu混合开发环境。
85
86Windows: 源码编辑、烧录、调试
87Ubuntu: 编译构建
88
89### 系统要求<a name = "section149127526335"></a>
90
91- Windows系统要求:Windows10 64位系统。
92- Ubuntu系统要求:Ubuntu18.04~21.10版本,内存推荐16 GB及以上,python版本要求3.7以上。
93- Windows系统和Ubuntu系统的用户名不能包含中文字符。
94
95### IDE(DevEco Device Tool)方式<a name = "section724948309150"></a>
96
97IDE方式完全采用DevEco Device Tool进行一站式开发,编译依赖工具的<b>安装</b>及<b>编译</b>、<b>烧录</b>、<b>运行</b>都通过IDE可视化操作, 这种方式需要在Windows和Ubuntu系统上安装的DevEco Device Tool 3.0 Release版本以上。
98
99   > ![icon-note.gif](docs/public_sys-resources/icon-note.gif) **说明:**
100   > 详细步骤请参考DOC仓[搭建IDE混合开发环境][ide_standard_envsetup]。
101
102[ide_standard_envsetup]: https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-ide-standard-env-setup-win-ubuntu.md
103
104### 安装包方式<a name = "section204672979943"></a>
105
106安装包方式直接在Ubuntu环境下执行命令来安装依赖工具,下载源码,编译构建,然后通过HiTool/IDE工具进行烧录。同时OpenHarmony还为开发者提供了[Docker][OpenHarmony docker]环境,在很大程度上简化了编译前的环境配置,习惯使用安装包方式的开发者也可以选择Docker环境进行编译 。
107
108   > ![icon-note.gif](docs/public_sys-resources/icon-note.gif) **说明:**
109   > 详细步骤请参考DOC仓[搭建标准系统环境][standard-env-setup], 若使用HiTool工具进行烧录,可不安装IDE,仅按照参考文档安装必要的库和工具。
110
111[OpenHarmony docker]: https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/get-code/gettools-acquire.md
112[standard-env-setup]: https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-standard-env-setup.md
113
114## 代码下载<a name="section119744591305"></a>
115
116Hispark_phoenix产品可在master和OpenHarmony-3.1-Release分支获取到,OpenHarmony-3.1-Release分支更稳定,建议下载OpenHarmony-3.1-Release分支。请参考[获取源码][sourcecode-acquire]配置git并下载码云repo工具。
117
118- OpenHarmony主干
119  - 方式一:通过repo + ssh下载(需注册公钥,请参考码云帮助中心)。
120
121    repo init -u git@gitee.com:openharmony/manifest.git -b master --no-repo-verify
122    repo sync -c
123    repo forall -c 'git lfs pull'
124    bash build/prebuilts_download.sh
125
126  - 方式二:通过repo + https下载。
127
128    repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify
129    repo sync -c
130    repo forall -c 'git lfs pull'
131    bash build/prebuilts_download.sh
132
133- OpenHarmony-3.1-Release分支(推荐)
134  - 方式一:通过repo + ssh下载(需注册公钥,请参考码云帮助中心)。
135
136    repo init -u git@gitee.com:openharmony/manifest.git -b OpenHarmony-3.1-Release    --no-repo-verify
137    repo sync -c
138    repo forall -c 'git lfs pull'
139    bash build/prebuilts_download.sh
140
141  - 方式二:通过repo + https下载。
142
143    repo init -u https://gitee.com/openharmony/manifest.git -b OpenHarmony-3.1-Release --no-repo-verify
144    repo sync -c
145    repo forall -c 'git lfs pull'
146    bash build/prebuilts_download.sh
147
148   > ![icon-note.gif](docs/public_sys-resources/icon-note.gif) **说明:**
149   > 在repo init时加参数--depth=1,能减少网络异常导致的下载失败,下载耗时也更短,缺点是git log信息太少,仅有最新的commit。
150
151[sourcecode-acquire]: https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/get-code/sourcecode-acquire.md
152
153## 编译烧录<a name="section137768191623"></a>
154
155### 编译源码
156
157安装包方式请参考文档[编译](./docs/quickstart-standard-running-hi3751-build.md)。
158IDE方式编译请先按照[导入工程][create_project]导入源码工程到IDE,然后参考文档[IDE编译](./docs/quickstart-ide-standard-running-hi3751-build.md)进行源码编译。
159
160### 烧录
161
162HiTool方式烧录直接选择分区配置文件//out/hispark_phoenix/packages/phone/images/Hi3751V350-slaveboot-emmc.xml后烧录,不做赘述。
163通过IDE烧录请参考[IDE烧录](./docs/quickstart-ide-standard-running-hi3751-burning.md);前面使用安装包方式编译,再使用IDE工具烧录请参考[烧录](./docs/quickstart-standard-running-hi3751-burning.md), 与前者的主要差异是需要先导入工程,再进行同样的烧录步骤。
164
165[create_project]: https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-ide-standard-create-project.md
166
167## 调试<a name="section1312121216216"></a>
168
169### hdc 工具<a name="section129654513264"></a>
170hdc工具获取和详细使用方法请参考文档[HDC-OpenHarmony设备连接器](https://gitee.com/openharmony/developtools_hdc)171需要注意的是Hi3751V35X仅支持TCP连接方式,且端口固定为34567,请依据本地网络环境配置开发版IP。
172
173    // hdc tcp链接方式:
174    ifconfig eth0 xxx.xxx.xxx.xxx netmask 255.255.xxx.xxx
175    hdc_std -tconn xxx.xxx.xxx.xxx:34567
176
177### 点屏配置<a name="section864408051434"></a>
178
179持续完善中......
180
181## 相关仓<a name="section144978787332"></a>
182
183[vendor_hisilicon](https://gitee.com/openharmony/vendor_hisilicon)
184[device_board_hisilicon](https://gitee.com/openharmony/device_board_hisilicon)
185
186## FAQ<a name="section1371113476307"></a>
187