12fe4e5f8Sopenharmony_ci# HiSpark_Phoenix开发指引<a name="ZH-CN_TOPIC_0000001142448981"></a> 22fe4e5f8Sopenharmony_ci 32fe4e5f8Sopenharmony_ci- [简介](#section11660541593) 42fe4e5f8Sopenharmony_ci- [目录](#section835037926256) 52fe4e5f8Sopenharmony_ci- [开发环境搭建](#section161941989596) 62fe4e5f8Sopenharmony_ci - [系统要求](#section149127526335) 72fe4e5f8Sopenharmony_ci - [IDE方式](#section724948309150) 82fe4e5f8Sopenharmony_ci - [安装包方式](#section204672979943) 92fe4e5f8Sopenharmony_ci 102fe4e5f8Sopenharmony_ci- [代码下载](#section119744591305) 112fe4e5f8Sopenharmony_ci- [编译烧录](#section137768191623) 122fe4e5f8Sopenharmony_ci- [调试说明](#section1312121216216) 132fe4e5f8Sopenharmony_ci - [hdc工具](#section129654513264) 142fe4e5f8Sopenharmony_ci - [点屏配置](#section864408051434) 152fe4e5f8Sopenharmony_ci 162fe4e5f8Sopenharmony_ci- [相关仓](#section144978787332) 172fe4e5f8Sopenharmony_ci- [FAQ](#section1371113476307) 182fe4e5f8Sopenharmony_ci 192fe4e5f8Sopenharmony_ci## 简介<a name="section11660541593"></a> 202fe4e5f8Sopenharmony_ci 212fe4e5f8Sopenharmony_ciHiSpark-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屏。 222fe4e5f8Sopenharmony_ci 232fe4e5f8Sopenharmony_ci**图 1** HiSpark_Phoenix单板正面外观图<a name="fig4460722185514"></a> 242fe4e5f8Sopenharmony_ci 252fe4e5f8Sopenharmony_ci 262fe4e5f8Sopenharmony_ci 272fe4e5f8Sopenharmony_ci## 目录<a name="section835037926256"></a> 282fe4e5f8Sopenharmony_ci``` 292fe4e5f8Sopenharmony_ci. 302fe4e5f8Sopenharmony_ci├── docs // hispark_phoenix资料文档 312fe4e5f8Sopenharmony_ci│ ├── figures 322fe4e5f8Sopenharmony_ci│ └── public_sys-resources 332fe4e5f8Sopenharmony_ci├── linux 342fe4e5f8Sopenharmony_ci│ ├── boot // 预编译镜像分区文件 352fe4e5f8Sopenharmony_ci│ ├── system // 系统资源和配置 362fe4e5f8Sopenharmony_ci│ │ └── cfg 372fe4e5f8Sopenharmony_ci│ └── updater // 升级子系统配置 382fe4e5f8Sopenharmony_ci│ └── cfg 392fe4e5f8Sopenharmony_ci└── peripherals 402fe4e5f8Sopenharmony_ci └── bluetooth // 蓝牙适配 412fe4e5f8Sopenharmony_ci └── rtkbt 422fe4e5f8Sopenharmony_ci 432fe4e5f8Sopenharmony_ci``` 442fe4e5f8Sopenharmony_ci 452fe4e5f8Sopenharmony_ci## 开发环境搭建<a name="section161941989596"></a> 462fe4e5f8Sopenharmony_ci 472fe4e5f8Sopenharmony_ci在嵌入式开发中,很多开发者习惯于使用Windows进行代码的编辑,比如使用Windows的Visual Studio Code进行OpenHarmony代码的开发。但当前阶段,大部分的开发板源码还不支持在Windows环境下进行编译,如Hi3861、Hi3516系列开发板。因此,建议使用Ubuntu的编译环境对源码进行编译。 482fe4e5f8Sopenharmony_ci 492fe4e5f8Sopenharmony_ci在以上的设备开发场景中,可以搭建一套Windows+Ubuntu混合开发的环境,其中使用Windows平台的DevEco Device Tool可视化界面进行相关操作,通过远程连接的方式对接Ubuntu下的DevEco Device Tool(可以不安装Visual Studio Code),然后对Ubuntu下的源码进行开发、编译、烧录等操作。 502fe4e5f8Sopenharmony_ci 512fe4e5f8Sopenharmony_ci针对Hispark_phoenix开发板,建议搭建IDE开发环境,方便后面使用IDE烧录。 522fe4e5f8Sopenharmony_ci### 系统要求<a name = "section149127526335"></a> 532fe4e5f8Sopenharmony_ci 542fe4e5f8Sopenharmony_ci- Windows系统要求:Windows10 64位系统。 552fe4e5f8Sopenharmony_ci- Ubuntu系统要求:Ubuntu18.04~21.10版本,内存推荐16 GB及以上,python版本要求3.7以上。 562fe4e5f8Sopenharmony_ci- Windows系统和Ubuntu系统的用户名不能包含中文字符。 572fe4e5f8Sopenharmony_ci 582fe4e5f8Sopenharmony_ci### 基于IDE(DevEco Device Tool)的环境<a name = "section724948309150"></a> 592fe4e5f8Sopenharmony_ci 602fe4e5f8Sopenharmony_ciIDE方式完全采用DevEco Device Tool进行一站式开发,编译依赖工具的<b>安装</b>及<b>编译</b>、<b>烧录</b>、<b>运行</b>都通过IDE可视化操作, 这种方式需要在Windows和Ubuntu系统上安装的DevEco Device Tool 3.0 Release版本以上。 612fe4e5f8Sopenharmony_ci 622fe4e5f8Sopenharmony_ci此方式需要进行下面的步骤: 632fe4e5f8Sopenharmony_ci - [搭建Windows环境][ide_envsetup_windows] 642fe4e5f8Sopenharmony_ci - [搭建Ubuntu环境][ide_envsetup_ubuntu] 652fe4e5f8Sopenharmony_ci - [配置远程访问环境][ide_envsetup_remote] 662fe4e5f8Sopenharmony_ci - [创建工程并获取源码][ide_envsetup_import_project] 672fe4e5f8Sopenharmony_ci 682fe4e5f8Sopenharmony_ci[ide_envsetup_windows]: https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-ide-env-win.md 692fe4e5f8Sopenharmony_ci[ide_envsetup_ubuntu]: https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-ide-env-ubuntu.md 702fe4e5f8Sopenharmony_ci[ide_envsetup_remote]: https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-ide-env-remote.md 712fe4e5f8Sopenharmony_ci[ide_envsetup_import_project]: https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-ide-import-project.md 722fe4e5f8Sopenharmony_ci 732fe4e5f8Sopenharmony_ci 742fe4e5f8Sopenharmony_ci >  **说明:** 752fe4e5f8Sopenharmony_ci > 详情请参考[快速入门](https://gitee.com/openharmony/docs/tree/master/zh-cn/device-dev/quick-start) 762fe4e5f8Sopenharmony_ci 772fe4e5f8Sopenharmony_ci### 基于命令行的环境<a name = "section204672979943"></a> 782fe4e5f8Sopenharmony_ci 792fe4e5f8Sopenharmony_ci安装包方式直接在Ubuntu环境下执行命令来安装依赖工具,下载源码,编译构建,然后通过HiTool/IDE工具进行烧录。同时OpenHarmony还为开发者提供了[Docker][OpenHarmony docker]环境,在很大程度上简化了编译前的环境配置,习惯使用安装包方式的开发者也可以选择Docker环境进行编译 。 802fe4e5f8Sopenharmony_ci 812fe4e5f8Sopenharmony_ci此方式需要进行下面的步骤: 822fe4e5f8Sopenharmony_ci - [准备开发环境][pkg-prapare] 832fe4e5f8Sopenharmony_ci - [安装库和工具集][pkg-installation] 842fe4e5f8Sopenharmony_ci - [获取源码][aquire-sourcecode] 852fe4e5f8Sopenharmony_ci - [安装编译工具][install-toolchain] 862fe4e5f8Sopenharmony_ci 872fe4e5f8Sopenharmony_ci >  **说明:** 882fe4e5f8Sopenharmony_ci > 详情请参考[快速入门](https://gitee.com/openharmony/docs/tree/master/zh-cn/device-dev/quick-start) 892fe4e5f8Sopenharmony_ci 902fe4e5f8Sopenharmony_ci[OpenHarmony docker]: https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/get-code/gettools-acquire.md 912fe4e5f8Sopenharmony_ci[pkg-prapare]: https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-pkg-prepare.md 922fe4e5f8Sopenharmony_ci[pkg-installation]: https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-pkg-install-package.md 932fe4e5f8Sopenharmony_ci[aquire-sourcecode]: https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-pkg-sourcecode.md 942fe4e5f8Sopenharmony_ci[install-toolchain]: https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-pkg-install-tool.md 952fe4e5f8Sopenharmony_ci 962fe4e5f8Sopenharmony_ci 972fe4e5f8Sopenharmony_ci## 代码下载<a name="section119744591305"></a> 982fe4e5f8Sopenharmony_ci 992fe4e5f8Sopenharmony_ciHispark_phoenix产品可在master和OpenHarmony-3.1-Release分支获取到,OpenHarmony-3.1-Release分支更稳定,建议下载OpenHarmony-3.1-Release分支。请参考[获取源码][aquire-sourcecode]配置git并下载码云repo工具。 1002fe4e5f8Sopenharmony_ci 1012fe4e5f8Sopenharmony_ci- OpenHarmony主干 1022fe4e5f8Sopenharmony_ci - 方式一:通过repo + ssh下载(需注册公钥,请参考码云帮助中心)。 1032fe4e5f8Sopenharmony_ci 1042fe4e5f8Sopenharmony_ci repo init -u git@gitee.com:openharmony/manifest.git -b master --no-repo-verify 1052fe4e5f8Sopenharmony_ci repo sync -c 1062fe4e5f8Sopenharmony_ci repo forall -c 'git lfs pull' 1072fe4e5f8Sopenharmony_ci bash build/prebuilts_download.sh 1082fe4e5f8Sopenharmony_ci 1092fe4e5f8Sopenharmony_ci - 方式二:通过repo + https下载。 1102fe4e5f8Sopenharmony_ci 1112fe4e5f8Sopenharmony_ci repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify 1122fe4e5f8Sopenharmony_ci repo sync -c 1132fe4e5f8Sopenharmony_ci repo forall -c 'git lfs pull' 1142fe4e5f8Sopenharmony_ci bash build/prebuilts_download.sh 1152fe4e5f8Sopenharmony_ci 1162fe4e5f8Sopenharmony_ci- OpenHarmony-3.1-Release分支(推荐) 1172fe4e5f8Sopenharmony_ci - 方式一:通过repo + ssh下载(需注册公钥,请参考码云帮助中心)。 1182fe4e5f8Sopenharmony_ci 1192fe4e5f8Sopenharmony_ci repo init -u git@gitee.com:openharmony/manifest.git -b OpenHarmony-3.1-Release --no-repo-verify 1202fe4e5f8Sopenharmony_ci repo sync -c 1212fe4e5f8Sopenharmony_ci repo forall -c 'git lfs pull' 1222fe4e5f8Sopenharmony_ci bash build/prebuilts_download.sh 1232fe4e5f8Sopenharmony_ci 1242fe4e5f8Sopenharmony_ci - 方式二:通过repo + https下载。 1252fe4e5f8Sopenharmony_ci 1262fe4e5f8Sopenharmony_ci repo init -u https://gitee.com/openharmony/manifest.git -b OpenHarmony-3.1-Release --no-repo-verify 1272fe4e5f8Sopenharmony_ci repo sync -c 1282fe4e5f8Sopenharmony_ci repo forall -c 'git lfs pull' 1292fe4e5f8Sopenharmony_ci bash build/prebuilts_download.sh 1302fe4e5f8Sopenharmony_ci 1312fe4e5f8Sopenharmony_ci >  **说明:** 1322fe4e5f8Sopenharmony_ci > 在repo init时加参数--depth=1,能减少网络异常导致的下载失败,下载耗时也更短,缺点是git log信息太少,仅有最新的commit。 1332fe4e5f8Sopenharmony_ci 1342fe4e5f8Sopenharmony_ci## 编译烧录<a name="section137768191623"></a> 1352fe4e5f8Sopenharmony_ci 1362fe4e5f8Sopenharmony_ci### 编译源码 1372fe4e5f8Sopenharmony_ci 1382fe4e5f8Sopenharmony_ci* 命令行方式请参考文档[编译Hispark_phoenix](./docs/quickstart-standard-running-hi3751-build.md)。 1392fe4e5f8Sopenharmony_ci* IDE方式编译参考文档[IDE编译Hispark_phoenix](./docs/quickstart-ide-standard-running-hi3751-build.md)。 1402fe4e5f8Sopenharmony_ci 1412fe4e5f8Sopenharmony_ci### 烧录 1422fe4e5f8Sopenharmony_ci 1432fe4e5f8Sopenharmony_ciHispark_phoenix提供两种烧录方式: 1442fe4e5f8Sopenharmony_ci 1452fe4e5f8Sopenharmony_ci* HiTool方式烧录 1462fe4e5f8Sopenharmony_ci 直接选择分区配置文件//out/hispark_phoenix/packages/phone/images/Hi3751V350-slaveboot-emmc.xml后烧录。此方法仅限于已有Hi3751V35X的HiTool。 1472fe4e5f8Sopenharmony_ci* [IDE烧录](./docs/quickstart-ide-standard-running-hi3751-burning.md) 1482fe4e5f8Sopenharmony_ci 如果镜像是使用命令行方式编译出的,则需要准备IDE开发环境,再进行同样的烧录。 1492fe4e5f8Sopenharmony_ci 1502fe4e5f8Sopenharmony_ci >  **说明:** 1512fe4e5f8Sopenharmony_ci > 3.1-Release分支的IDE烧录请参考[3.1烧录临时方案](./docs/ide_hiburn_for_3.1-release.md)。 1522fe4e5f8Sopenharmony_ci 1532fe4e5f8Sopenharmony_ci## 调试<a name="section1312121216216"></a> 1542fe4e5f8Sopenharmony_ci 1552fe4e5f8Sopenharmony_ci### hdc 工具<a name="section129654513264"></a> 1562fe4e5f8Sopenharmony_cihdc工具获取和详细使用方法请参考文档[HDC-OpenHarmony设备连接器](https://gitee.com/openharmony/developtools_hdc)。 1572fe4e5f8Sopenharmony_ci需要注意的是Hi3751V35X仅支持TCP连接方式,且端口固定为34567,请依据本地网络环境配置开发版IP。 1582fe4e5f8Sopenharmony_ci 1592fe4e5f8Sopenharmony_ci // hdc tcp链接方式: 1602fe4e5f8Sopenharmony_ci ifconfig eth0 xxx.xxx.xxx.xxx netmask 255.255.xxx.xxx 1612fe4e5f8Sopenharmony_ci hdc_std tconn xxx.xxx.xxx.xxx:34567 1622fe4e5f8Sopenharmony_ci 1632fe4e5f8Sopenharmony_ci### 点屏配置<a name="section864408051434"></a> 1642fe4e5f8Sopenharmony_ci 1652fe4e5f8Sopenharmony_ci持续完善中...... 1662fe4e5f8Sopenharmony_ci 1672fe4e5f8Sopenharmony_ci## 相关仓<a name="section144978787332"></a> 1682fe4e5f8Sopenharmony_ci 1692fe4e5f8Sopenharmony_ci[vendor_hisilicon](https://gitee.com/openharmony/vendor_hisilicon) 1702fe4e5f8Sopenharmony_ci[device_board_hisilicon](https://gitee.com/openharmony/device_board_hisilicon) 1712fe4e5f8Sopenharmony_ci[device_soc_hisilicon](https://gitee.com/openharmony/device_soc_hisilicon) 1722fe4e5f8Sopenharmony_ci 1732fe4e5f8Sopenharmony_ci## FAQ<a name="section1371113476307"></a> 174