• Home
Name Date Size #Lines LOC

..--

docs/12-May-2024-695528

linux/12-May-2024-320259

peripherals/bluetooth/12-May-2024-20,59414,890

README_zh.mdD12-May-20248.9 KiB174121

device.gniD12-May-20241.2 KiB3430

README_zh.md

1# HiSpark_Phoenix开发指引<a name="ZH-CN_TOPIC_0000001142448981"></a>
2
3-   [简介](#section11660541593)
4-   [目录](#section835037926256)
5-   [开发环境搭建](#section161941989596)
6    -   [系统要求](#section149127526335)
7    -   [IDE方式](#section724948309150)
8    -   [安装包方式](#section204672979943)
9
10-   [代码下载](#section119744591305)
11-   [编译烧录](#section137768191623)
12-   [调试说明](#section1312121216216)
13    -   [hdc工具](#section129654513264)
14    -   [点屏配置](#section864408051434)
15
16-   [相关仓](#section144978787332)
17-   [FAQ](#section1371113476307)
18
19## 简介<a name="section11660541593"></a>
20
21HiSpark-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屏。
22
23**图 1**  HiSpark_Phoenix单板正面外观图<a name="fig4460722185514"></a>
24
25![hispark_phoenix](docs/figures/zn-cn_image_Hi3751V350.png)
26
27## 目录<a name="section835037926256"></a>
28```
29.
30├── docs // hispark_phoenix资料文档
31│   ├── figures
32│   └── public_sys-resources
33├── linux
34│   ├── boot // 预编译镜像分区文件
35│   ├── system // 系统资源和配置
36│   │   └── cfg
37│   └── updater // 升级子系统配置
38│       └── cfg
39└── peripherals
40    └── bluetooth // 蓝牙适配
41        └── rtkbt
42
43```
44
45## 开发环境搭建<a name="section161941989596"></a>
46
47在嵌入式开发中,很多开发者习惯于使用Windows进行代码的编辑,比如使用Windows的Visual Studio Code进行OpenHarmony代码的开发。但当前阶段,大部分的开发板源码还不支持在Windows环境下进行编译,如Hi3861、Hi3516系列开发板。因此,建议使用Ubuntu的编译环境对源码进行编译。
48
49在以上的设备开发场景中,可以搭建一套Windows+Ubuntu混合开发的环境,其中使用Windows平台的DevEco Device Tool可视化界面进行相关操作,通过远程连接的方式对接Ubuntu下的DevEco Device Tool(可以不安装Visual Studio Code),然后对Ubuntu下的源码进行开发、编译、烧录等操作。
50
51针对Hispark_phoenix开发板,建议搭建IDE开发环境,方便后面使用IDE烧录。
52### 系统要求<a name = "section149127526335"></a>
53
54- Windows系统要求:Windows10 64位系统。
55- Ubuntu系统要求:Ubuntu18.04~21.10版本,内存推荐16 GB及以上,python版本要求3.7以上。
56- Windows系统和Ubuntu系统的用户名不能包含中文字符。
57
58### 基于IDE(DevEco Device Tool)的环境<a name = "section724948309150"></a>
59
60IDE方式完全采用DevEco Device Tool进行一站式开发,编译依赖工具的<b>安装</b>及<b>编译</b>、<b>烧录</b>、<b>运行</b>都通过IDE可视化操作, 这种方式需要在Windows和Ubuntu系统上安装的DevEco Device Tool 3.0 Release版本以上。
61
62此方式需要进行下面的步骤:
63   - [搭建Windows环境][ide_envsetup_windows]
64   - [搭建Ubuntu环境][ide_envsetup_ubuntu]
65   - [配置远程访问环境][ide_envsetup_remote]
66   - [创建工程并获取源码][ide_envsetup_import_project]
67
68[ide_envsetup_windows]: https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-ide-env-win.md
69[ide_envsetup_ubuntu]: https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-ide-env-ubuntu.md
70[ide_envsetup_remote]: https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-ide-env-remote.md
71[ide_envsetup_import_project]: https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-ide-import-project.md
72
73
74   > ![icon-note.gif](docs/public_sys-resources/icon-note.gif) **说明:**
75   > 详情请参考[快速入门](https://gitee.com/openharmony/docs/tree/master/zh-cn/device-dev/quick-start)
76
77### 基于命令行的环境<a name = "section204672979943"></a>
78
79安装包方式直接在Ubuntu环境下执行命令来安装依赖工具,下载源码,编译构建,然后通过HiTool/IDE工具进行烧录。同时OpenHarmony还为开发者提供了[Docker][OpenHarmony docker]环境,在很大程度上简化了编译前的环境配置,习惯使用安装包方式的开发者也可以选择Docker环境进行编译 。
80
81此方式需要进行下面的步骤:
82  - [准备开发环境][pkg-prapare]
83  - [安装库和工具集][pkg-installation]
84  - [获取源码][aquire-sourcecode]
85  - [安装编译工具][install-toolchain]
86
87   > ![icon-note.gif](docs/public_sys-resources/icon-note.gif) **说明:**
88   > 详情请参考[快速入门](https://gitee.com/openharmony/docs/tree/master/zh-cn/device-dev/quick-start)
89
90[OpenHarmony docker]: https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/get-code/gettools-acquire.md
91[pkg-prapare]: https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-pkg-prepare.md
92[pkg-installation]: https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-pkg-install-package.md
93[aquire-sourcecode]: https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-pkg-sourcecode.md
94[install-toolchain]: https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-pkg-install-tool.md
95
96
97## 代码下载<a name="section119744591305"></a>
98
99Hispark_phoenix产品可在master和OpenHarmony-3.1-Release分支获取到,OpenHarmony-3.1-Release分支更稳定,建议下载OpenHarmony-3.1-Release分支。请参考[获取源码][aquire-sourcecode]配置git并下载码云repo工具。
100
101- OpenHarmony主干
102  - 方式一:通过repo + ssh下载(需注册公钥,请参考码云帮助中心)。
103
104    repo init -u git@gitee.com:openharmony/manifest.git -b master --no-repo-verify
105    repo sync -c
106    repo forall -c 'git lfs pull'
107    bash build/prebuilts_download.sh
108
109  - 方式二:通过repo + https下载。
110
111    repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify
112    repo sync -c
113    repo forall -c 'git lfs pull'
114    bash build/prebuilts_download.sh
115
116- OpenHarmony-3.1-Release分支(推荐)
117  - 方式一:通过repo + ssh下载(需注册公钥,请参考码云帮助中心)。
118
119    repo init -u git@gitee.com:openharmony/manifest.git -b OpenHarmony-3.1-Release    --no-repo-verify
120    repo sync -c
121    repo forall -c 'git lfs pull'
122    bash build/prebuilts_download.sh
123
124  - 方式二:通过repo + https下载。
125
126    repo init -u https://gitee.com/openharmony/manifest.git -b OpenHarmony-3.1-Release --no-repo-verify
127    repo sync -c
128    repo forall -c 'git lfs pull'
129    bash build/prebuilts_download.sh
130
131   > ![icon-note.gif](docs/public_sys-resources/icon-note.gif) **说明:**
132   > 在repo init时加参数--depth=1,能减少网络异常导致的下载失败,下载耗时也更短,缺点是git log信息太少,仅有最新的commit。
133
134## 编译烧录<a name="section137768191623"></a>
135
136### 编译源码
137
138* 命令行方式请参考文档[编译Hispark_phoenix](./docs/quickstart-standard-running-hi3751-build.md)。
139* IDE方式编译参考文档[IDE编译Hispark_phoenix](./docs/quickstart-ide-standard-running-hi3751-build.md)。
140
141### 烧录
142
143Hispark_phoenix提供两种烧录方式:
144
145* HiTool方式烧录
146  直接选择分区配置文件//out/hispark_phoenix/packages/phone/images/Hi3751V350-slaveboot-emmc.xml后烧录。此方法仅限于已有Hi3751V35X的HiTool。
147* [IDE烧录](./docs/quickstart-ide-standard-running-hi3751-burning.md)
148  如果镜像是使用命令行方式编译出的,则需要准备IDE开发环境,再进行同样的烧录。
149
150  > ![icon-note.gif](docs/public_sys-resources/icon-note.gif) **说明:**
151  > 3.1-Release分支的IDE烧录请参考[3.1烧录临时方案](./docs/ide_hiburn_for_3.1-release.md)。
152
153## 调试<a name="section1312121216216"></a>
154
155### hdc 工具<a name="section129654513264"></a>
156hdc工具获取和详细使用方法请参考文档[HDC-OpenHarmony设备连接器](https://gitee.com/openharmony/developtools_hdc)157需要注意的是Hi3751V35X仅支持TCP连接方式,且端口固定为34567,请依据本地网络环境配置开发版IP。
158
159    // hdc tcp链接方式:
160    ifconfig eth0 xxx.xxx.xxx.xxx netmask 255.255.xxx.xxx
161    hdc_std tconn xxx.xxx.xxx.xxx:34567
162
163### 点屏配置<a name="section864408051434"></a>
164
165持续完善中......
166
167## 相关仓<a name="section144978787332"></a>
168
169[vendor_hisilicon](https://gitee.com/openharmony/vendor_hisilicon)
170[device_board_hisilicon](https://gitee.com/openharmony/device_board_hisilicon)
171[device_soc_hisilicon](https://gitee.com/openharmony/device_soc_hisilicon)
172
173## FAQ<a name="section1371113476307"></a>
174