Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
asr582x/ | 12-May-2024 | - | 45,397 | 24,957 | ||
tools/figure/ | 12-May-2024 | - | ||||
.gitignore | D | 12-May-2024 | 4 | 1 | 1 | |
BUILD.gn | D | 12-May-2024 | 828 | 21 | 19 | |
Kconfig.liteos_m.defconfig | D | 12-May-2024 | 674 | 14 | 13 | |
Kconfig.liteos_m.series | D | 12-May-2024 | 665 | 15 | 13 | |
Kconfig.liteos_m.soc | D | 12-May-2024 | 795 | 22 | 19 | |
LICENSE | D | 12-May-2024 | 9.9 KiB | 177 | 150 | |
NOTICE | D | 12-May-2024 | 54.7 KiB | 948 | 790 | |
OAT.xml | D | 12-May-2024 | 4.5 KiB | 62 | 43 | |
README.md | D | 12-May-2024 | 958 | 36 | 25 | |
README_ZH.md | D | 12-May-2024 | 7.2 KiB | 222 | 164 |
README.md
1# device_asrmicro 2 3#### Description 4{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} 5 6#### Software Architecture 7Software architecture description 8 9#### Installation 10 111. xxxx 122. xxxx 133. xxxx 14 15#### Instructions 16 171. xxxx 182. xxxx 193. xxxx 20 21#### Contribution 22 231. Fork the repository 242. Create Feat_xxx branch 253. Commit your code 264. Create Pull Request 27 28 29#### Gitee Feature 30 311. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md 322. Gitee blog [blog.gitee.com](https://blog.gitee.com) 333. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) 344. The most valuable open source project [GVP](https://gitee.com/gvp) 355. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) 366. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
README_ZH.md
1# device asrmicro 2## 介绍 3 4本仓库托管翱捷科技开发的样例代码,包含hal模块、wifi库文件、ble库文件等。内容共分为如下几部分: 5* 目录结构 6* 编译环境搭建 7* 编译流程 8* 烧录流程 9* 相关仓库 10* 常见错误与处理 11 12## 代码目录 13``` 14device/soc/asrmicro 15├── asr582x # ASR芯片名称 16│ ├── liteos_m # 基于liteos_m的bsp适配目录 17│ │ ├── components # 组件服务层代码目录 18│ │ └── sdk # sdk模块的目录 19│ └── ... 20├── asr5xxx # ASR芯片名称 21│ 22├── Kconfig.liteos_m.defconfig # kconfig 默认配置宏 23├── Kconfig.liteos_m.series # 系列soc配置宏 24├── Kconfig.liteos_m.soc # soc kconfig配置宏 25└── tools # 烧录工具文档目录 26``` 27## 编译环境搭建 28 29系统要求: [Ubuntu18.04 64位系统版本](https://releases.ubuntu.com/18.04/)。 30 31编译环境搭建包含如下几步: 32 33* 安装库和工具 34* 安装repo 35* 获取源码 36* 安装python3 37* 安装hb 38* 安装arm-none-eabi-gcc 39 40### 安装库和工具 41 42使用如下apt-get命令安装编译所需的库和工具: 43``` 44sudo apt-get update && sudo apt-get install build-essential gcc g++ make zlib* libffi-dev e2fsprogs pkg-config flex bison perl bc openssl libssl-dev libelf-dev libc6-dev-amd64 binutils binutils-dev libdwarf-dev u-boot-tools mtd-utils gcc-arm-linux-gnueabi cpio device-tree-compiler git git-lfs 45``` 46### 安装repo 471. 配置git用户信息: 48 49 ``` 50 git config --global user.name "yourname" 51 git config --global user.email "your-email-address" 52 git config --global credential.helper store 53 ``` 54 552. 安装码云repo工具: 56 57 ``` 58 curl -s https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > /usr/local/bin/repo #如果没有权限,可下载至其他目录,并将其配置到环境变量中 59 chmod a+x /usr/local/bin/repo 60 pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests 61 ``` 62 63### 获取源码 64 65```shell 66mkdir openharmony 67 68cd openharmony 69 70repo init -u https://gitee.com/openharmony/manifest.git -m default.xml --no-repo-verify 71 72repo sync -c 73 74repo forall -c 'git lfs pull' 75``` 76 77### 安装Python3 78 791. 打开Linux编译服务器终端,输入如下命令,查看python版本号: 80 81 ``` 82 python3 --version 83 ``` 84 85 如果低于python3.7版本,不建议直接升级,请按照如下步骤重新安装。 86 872. 运行如下命令安装python 3.8。 88 89 ``` 90 sudo apt-get install python3.8 91 ``` 923. 设置python和python3软链接为python3.8。 93 ``` 94 sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1 95 sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1 96 ``` 974. 安装并升级Python包管理工具(pip3): 98 99 ``` 100 sudo apt-get install python3-setuptools python3-pip -y 101 sudo pip3 install --upgrade pip 102 ``` 103 104### 安装hb 105 1061. 运行如下命令安装hb: 107 108 ``` 109 pip3 install build/lite 110 ``` 1112. 设置环境变量: 112 113 ``` 114 vim ~/.bashrc 115 ``` 116 117 将以下命令拷贝到.bashrc文件的最后一行,保存并退出。 118 119 ``` 120 export PATH=~/.local/bin:$PATH 121 ``` 122 123 执行如下命令更新环境变量。 124 125 ``` 126 source ~/.bashrc 127 ``` 1283. 执行"hb -h",有打印以下信息即表示安装成功: 129 130 ``` 131 usage: hb 132 133 OHOS build system 134 135 positional arguments: 136 {build,set,env,clean} 137 build Build source code 138 set OHOS build settings 139 env Show OHOS build env 140 clean Clean output 141 142 optional arguments: 143 -h, --help show this help message and exit 144 ``` 145 146### 安装arm-none-eabi-gcc 147 1481. 打开Linux编译服务器终端。 1492. 下载[arm-none-eabi-gcc 编译工具下载](https://armkeil.blob.core.windows.net/developer//sitecore/shell/-/media/Files/downloads/gnu-rm/5_4-2016q3/gcc-arm-none-eabi-5_4-2016q3-20160926-linux,-d-,tar.bz2)。 150 151 1523. 解压 [gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2](https://armkeil.blob.core.windows.net/developer//sitecore/shell/-/media/Files/downloads/gnu-rm/5_4-2016q3/gcc-arm-none-eabi-5_4-2016q3-20160926-linux,-d-,tar.bz2) 安装包至 /tmp/asr 路径下。 153 154 ``` 155 /tmp/asr/gcc-arm-none-eabi-5_4-2016q3 156 ├── bin 157 ├── lib 158 ├── share 159 └── arm-none-eabi 160 ``` 161 然后添加gcc路径到环境变量: 162 ``` 163 echo 'export PATH=/tmp/asr/gcc-arm-none-eabi-5_4-2016q3/bin:$PATH' >> ~/.bashrc 164 source ~/.bashrc 165 ``` 166 167## 编译流程 168 169[编译构建使用指南](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/subsystems/subsys-build-mini-lite.md) 170 171在OpenHarmony代码根目录执行以下命令: 172```shell 173hb set 174使用键盘方向键进行板卡demo选择: 175asrmicro 176 > wifi_demo 177 > xts_demo 178 179如果选择: wifi_demo,则执行以下编译命令: 180 181hb build -f 182 183如果选择: xts_demo,则执行以下编译命令: 184 185hb build -f --gn-args build_xts=true 186``` 187 188## 烧录流程 189 1901. 下载 [DOGO_VP2.0.3.7Z](https://gitee.com/lango-tech_0/tools/blob/master/DOGO_VP2.0.3.7z) 到windows 环境下解压,并双击 DOGO_VP2.0.3.exe。 1912. 串口连接 PC 和 demo board,开发板接通电源后,点击“检测串口”按键,在串口选择一栏选择对应的端口号并点击 “打开串口”。 1923. 选择 “ChipType ”类型为 582X。 1934. 点击“路径设置”,待弹出小窗口后点击 bootload 对应的“browser”进入目录选择待烧录的image 文件,bootloader的bin文件位于device/soc/asrmicro/asrxx/liteos_m/sdk/tools目录,app的bin文件位于out/dev_wifi_a/xx_demo目录。 194 195**图 1** Dogo选择 196 197 1985. 点击“确认”关闭小窗口,bootloader烧录一次即可,再次烧录可勾选“only image”只烧录app文件。 1996. 将 ASR582X 设置为 Uart boot 模式。 200[朗国开发板设置为"Uart boot"模式 操作参考](https://gitee.com/openharmony/device_board_lango#3-%E8%BF%9B%E5%85%A5%E7%83%A7%E5%BD%95%E6%A8%A1%E5%BC%8F-uart-boot-%E6%A8%A1%E5%BC%8F) 2017. Demo 板接通电源后,按下复位键,待出现“1F2E3D00”后点击“烧录”。 202 203**图 2** Dogo烧录 204 205 2068. 烧录完成后, 将 ASR582X 设置为 Flash boot 模式,按下复位键,DOGO 串口接收窗口中即可以看到程序正常运行。 207[朗国开发板设置"Flash boot"模式 操作参考](https://gitee.com/openharmony/device_board_lango#5-%E9%80%80%E5%87%BA%E7%83%A7%E5%BD%95%E6%A8%A1%E5%BC%8F-%E8%BF%9B%E5%85%A5flash-boot-%E6%A8%A1%E5%BC%8F) 208 209## 相关仓库 210 211* [device/soc/asrmicro](https://gitee.com/openharmony/device_soc_asrmicro) 212* [device/board/lango](https://gitee.com/openharmony/device_board_lango) 213 214## 常见错误与处理 215### 1. Ubuntu 20.04.3 LTS 下编译报错 216 编译出现如错误: 217 ```-bash: ./arm-none-eabi-gcc: No such file or directory``` 218  219 解决方案:执行 ```sudo apt-get install gcc-multilib``` 220  221 222