diff --git a/BUILD.gn b/BUILD.gn new file mode 100644 index 0000000..63dde93 --- /dev/null +++ b/BUILD.gn @@ -0,0 +1,22 @@ +# Copyright (c) 2021 Chipsea Technologies CO., LIMITED. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +if (ohos_kernel_type == "liteos_m") { + import("//kernel/liteos_m/liteos.gni") + module_name = get_path_info(rebase_path("."), "name") + print("Board chipsea ----${module_name}") + module_group(module_name) { + modules = [ + ] + } +} diff --git a/Kconfig.liteos_m.boards b/Kconfig.liteos_m.boards new file mode 100644 index 0000000..bb03b80 --- /dev/null +++ b/Kconfig.liteos_m.boards @@ -0,0 +1,15 @@ +# Copyright (c) 2021 Chipsea Technologies CO., LIMITED. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +orsource "*/Kconfig.liteos_m.board" + diff --git a/Kconfig.liteos_m.defconfig.boards b/Kconfig.liteos_m.defconfig.boards new file mode 100644 index 0000000..8f56c7c --- /dev/null +++ b/Kconfig.liteos_m.defconfig.boards @@ -0,0 +1,14 @@ +# Copyright (c) 2021 Chipsea Technologies CO., LIMITED. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +orsource "*/Kconfig.liteos_m.defconfig.board" diff --git a/Kconfig.liteos_m.shields b/Kconfig.liteos_m.shields new file mode 100644 index 0000000..10ca653 --- /dev/null +++ b/Kconfig.liteos_m.shields @@ -0,0 +1,14 @@ +# Copyright (c) 2021 Chipsea Technologies CO., LIMITED. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +orsource "shields/Kconfig.liteos_m.shields" diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..29f81d8 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/OAT.xml b/OAT.xml new file mode 100644 index 0000000..6205984 --- /dev/null +++ b/OAT.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/README.en.md b/README.en.md index 99f0c40..e69de29 100644 --- a/README.en.md +++ b/README.en.md @@ -1,36 +0,0 @@ -# device_board_chipsea - -#### Description -{**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**} - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md index 0924838..2e19462 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,148 @@ -# device_board_chipsea +# CHIPSEA cst85_wblink EVB +## 介绍 +cst85_wblink开发板是基于芯海科技CST85F01芯片,由芯海科技出品的一款高性能、多功能、高性价比AIoT SoC开发板。cst85_wblink开发板,集成双频WiFi + 双模蓝牙,支持标准的802.11 a/b/g/n/协议,支持BT/BLE 5.0协议,内建多种容量的RAM(最大992KB)和Flash(最大16MB),支持MIPI DSI及CSI,适用于快速开发物联网(IOT)及智能设备的Wi-Fi、蓝牙的应用。 -#### 介绍 -{**以下是 Gitee 平台说明,您可以替换此简介** -Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} +开发板外观图片。 -#### 软件架构 -软件架构说明 +**图 1** 开发板图片 +![](figures/开发板图片.png "开发板图片") + +底板图片。 + +**图 2** 底板图片 +![](figures/底板图片.png "底板图片") + +开发板功能框图及介绍。 + +**图 2** 开发板功能框图 +![](figures/开发板功能框图.png "开发板功能框图") + +## 开发板规格 + +| 器件类别 | 开发板| +| ---- | ---- | +| CPU | Cortex M4 (最高480MHz)| +| RAM | 984K SRAM | +| ROM | 752K ROM| +| GPIO | TODO| +| I2C | TODO| +| UART | TODO| +| PWM | TODO| +| SPI | TODO| +| Debug UART | 支持| +| ADC | TODO| +| MIPI | TODO| +| Display Engine |TODO| +| Audio | TODO| +| Camera | TODO| +| Codec | TODO| +| Touch Screen | TODO| +| Wi-Fi | WiFi4 2.4G/5G双频| +| Bluetooth | BT5.0,BT classic,LE Audio,SIG mesh| +| Infrared | TODO| +| USB Host | TODO| +| USB Device | TODO| +| TF(MicroSD)| TODO| +| PMIC | 内置| +| thermal | TODO| +| 按键 | TODO| + +## 关键特性 +| 组件名 | 能力介绍| +| ---- | ---- | +| WLAN服务 | 提供WLAN服务能力。包括:station和hotspot(正在支持中)模式的连接、断开、状态查询等。| +| BLUETOOTH 服务 | 提供蓝牙 BT BLE MESH 等功能。| +| ASR | 提供本地唤醒算力。| +| 模组外设控制 | 提供操作外设的能力。包括:I2C、I2S、ADC、UART、SPI、SDIO、GPIO、PWM、FLASH等。| +| 分布式软总线 | 在OpenHarmony分布式网络中,提供设备被发现、数据传输的能力。| +| 设备安全绑定 | 提供在设备互联场景中,数据在设备之间的安全流转的能力。| +| 基础加解密 | 提供密钥管理、加解密等能力。| +| 系统服务管理 | 系统服务管理基于面向服务的架构,提供了OpenHarmony统一化的系统服务开发框架。| +| 启动引导 | 提供系统服务的启动入口标识。在系统服务管理启动时,调用boostrap标识的入口函数,并启动系统服务。| +| 基础库 | 提供公共基础库能力。包括:文件操作、KV存储管理等。| +| XTS | 提供OpenHarmony生态认证测试套件的集合能力。| +| HDF | 提供OpenHarmony硬件配置驱动的能力。| +| Kconfig | 提供内核配置能力。| -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request +## 引脚定义 -#### 特技 +## 搭建开发环境 -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 -5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) + +### 系统要求 +系统要求基于Cortex-m4的liteos_m内核操作系统,采用arm-none-eabi-gcc 10.3版本toolchain, +提供992K内存和2MB flash系统配置。 + +OpenHarmony在基于cst85f01 的芯片的cst85_wblink模组,依赖liteos_m内核,内核依赖 cortex-m4架构配置,编译依赖arm官方的arm-none-eabi-gcc 10.3版本 +OpenHarmony需要按照官方文档介绍安装环境 https://gitee.com/openharmony/device_soc_chipsea/blob/master/README.md ,然后编译出烧录包,按照文档介绍烧录。 + + +### 工具要求 +ubuntu 18.04编译,windows10系统烧录。 + +1. Ubuntu18.04系统安装 + ``` + 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 + ``` + +2. Ubuntu18.04安装python3和pip3 + ``` + python3 -m pip install --user ohos-build + ``` + +3. Ubuntu18.04 配置tooLchain [arm-none-eabi-gcc](https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2): + + 下载[arm-none-eabi-gcc 编译工具](https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2) + 解压 [gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2](https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2) 安装包至\~/toolchain/路径下。 + + ```shell + mkdir -p ~/toolchain/ + tar -zxvf gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 -C ~/toolchain/ + ``` + 设置环境变量。 + + ``` + vim ~/.bashrc + ``` + + 将以下命令拷贝到.bashrc文件的最后一行,保存并退出。 + + ``` + export PATH=~/toolchain/gcc-arm-none-eabi-10.3-2021.10/bin:$PATH + ``` + 生效环境变量。 + + ``` + source ~/.bashrc + ``` + +4. 安装 FT2232H USB 转串口驱动程序 + +### 搭建过程 + +https://gitee.com/openharmony/device_soc_chipsea/blob/master/README.md + +## 编译调试 + +https://gitee.com/openharmony/device_soc_chipsea/blob/master/README.md + +按下开发板上开关按钮,通过串口调试工具打印串口log。 + +## 首个示例 + +代码默认有一个内置示例。 + +## 参考资源 + +https://gitee.com/openharmony/device_soc_chipsea/blob/master/README.md + +TODO:淘宝网店地址 + +## 联系 +TODO:联系地址 + + + +********** diff --git a/cst85_wblink/BUILD.gn b/cst85_wblink/BUILD.gn new file mode 100644 index 0000000..ce7d4a6 --- /dev/null +++ b/cst85_wblink/BUILD.gn @@ -0,0 +1,21 @@ +# Copyright (c) 2021 Chipsea Technologies CO., LIMITED. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +print("chipsea board btdm ------") +if (ohos_kernel_type == "liteos_m") { + import("//kernel/liteos_m/liteos.gni") + module_name = get_path_info(rebase_path("."), "name") + module_group(module_name) { + modules = [ "liteos_m" ] + } +} diff --git a/cst85_wblink/Kconfig.liteos_m.board b/cst85_wblink/Kconfig.liteos_m.board new file mode 100644 index 0000000..e2e1471 --- /dev/null +++ b/cst85_wblink/Kconfig.liteos_m.board @@ -0,0 +1,17 @@ +# Copyright (c) 2021 Chipsea Technologies CO., LIMITED. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +config BOARD_CST85_WBLINK + bool "select board cst85_wblink" + depends on SOC_CST85F01 + diff --git a/cst85_wblink/Kconfig.liteos_m.defconfig.board b/cst85_wblink/Kconfig.liteos_m.defconfig.board new file mode 100644 index 0000000..fee21e8 --- /dev/null +++ b/cst85_wblink/Kconfig.liteos_m.defconfig.board @@ -0,0 +1,21 @@ +# Copyright (c) 2021 Chipsea Technologies CO., LIMITED. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +if BOARD_CST85_WBLINK +#config FLASH_SIZE +# int +# default 16 +# help +# support flash size +endif #BOARD_BTDM + diff --git a/cst85_wblink/cst85_wblink_defconfig b/cst85_wblink/cst85_wblink_defconfig new file mode 100644 index 0000000..4eb0219 --- /dev/null +++ b/cst85_wblink/cst85_wblink_defconfig @@ -0,0 +1,17 @@ +# Copyright (c) 2021 Chipsea Technologies CO., LIMITED. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +LOSCFG_BOARD_BTDM=y +LOSCFG_SOC_SERIES_CST85=y +LOSCFG_SOC_CST85F01=y +LOSCFG_LIBC_NEWLIB_FS=n diff --git a/cst85_wblink/liteos_m/config.gni b/cst85_wblink/liteos_m/config.gni new file mode 100644 index 0000000..eb3c8a6 --- /dev/null +++ b/cst85_wblink/liteos_m/config.gni @@ -0,0 +1,170 @@ +# Copyright (c) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Kernel type, e.g. "linux", "liteos_a", "liteos_m". +kernel_type = "liteos_m" + +# Kernel version. +kernel_version = "3.0.0" + +# Board CPU type, e.g. "cortex-a7", "riscv32". +board_cpu = "cortex-m4" + +# Board arch, e.g. "armv7-a", "rv32imac". +board_arch = "" + +# Toolchain name used for system compiling. +# E.g. gcc-arm-none-eabi, arm-linux-harmonyeabi-gcc, ohos-clang, riscv32-unknown-elf. +# Note: The default toolchain is "ohos-clang". It's not mandatory if you use the default toochain. +board_toolchain = "arm-none-eabi-gcc" +#board_toolchain = "arm-linux-harmonyeabi-gcc" + +# The toolchain path instatlled, it's not mandatory if you have added toolchian path to your ~/.bashrc. +#board_toolchain_path = "/home/openharmony/gcc/gcc-arm-none-eabi-10-2020-q4-major/bin" +board_toolchain_path = "" + +# Compiler prefix. +board_toolchain_prefix = "arm-none-eabi-" + +# Compiler type, "gcc" or "clang". +board_toolchain_type = "gcc" + +# config.json parse +if (product_path != "") { + product_conf = read_file("${product_path}/config.json", "json") + product_name = product_conf.product_name +} + +# Board related common compile flags. +board_cflags = [ + "-mcpu=cortex-m4", + "-mfpu=fpv4-sp-d16", + "-mfloat-abi=softfp", + "-mthumb", + "-Og", + # "-g", + #"-Wall", + "-fdata-sections", + "-ffunction-sections", + "-D__FPU_PRESENT" , + "-DLOSCFG_DRIVERS_HDF", + "-DLOSCFG_DRIVERS_HDF_PLATFORM", + "-DCFG_HW_PLATFORM=2", + "-DCFG_RF_MODE=1", + "-DCFG_DACL_MIXER_MODE=0", + "-DCFG_DACR_MIXER_MODE=2", + #"-DCFG_APP_BLESMARTCONFIGWIFI", + "-DCFG_WIFI_STACK", + "-DCONFIG_RWNX_LWIP", + "-DCFG_RSSI_DATAPKT", + "-DCFG_BT_STACK", + "-DCFG_SOFTAP", + "-DCFG_BT_USER", + "-DCFG_AON", + "-DCFG_BLE_ONLY", + "-DCFG_BLE_STACK", + "-DCFG_SEC_CON", + "-DCFG_ALLROLES", + "-DCFG_HOST", + "-DCFG_BLE", + "-DCFG_APP", + "-DCFG_APP_SEC", + "-DCFG_APP_SMARTCONFIG", + "-DCFG_WIFI_BT_COMBO", + "-DCFG_CS1000_MIC_MATRIX=0", + "-DCFG_PMIC", + "-DCFG_DBG", + "-DCFG_FHDLR", + "-DCFG_ROM_VER=2", + "-DCFG_PRF", + "-DCFG_NB_PRF=10", + "-DCFG_PRF_SMARTCONFIGS", + "-DCFG_LITEOS", + "-DCFG_RTOS", + #"-DCFG_PING", + "-DCFG_APP_CONSOLEWIFI", + "-D__STACK_SIZE=4096", + "-DLOSCFG_BASE_CORE_HILOG", + "-Wl,--wrap=printf", +] + +if (product_name == "wblink_demo") { + board_cflags += [ + "-DCFG_CONSOLE", + "-D__HEAP_SIZE=0x20000", + ] +} else if (product_name == "display_demo") { + board_cflags += [ + "-D__HEAP_SIZE=0x500", + ] +} + +board_cxx_flags = board_cflags +board_ld_flags = [ + "-L${ohos_root_path}out/${board_name}/${product_name}/libs", +] + +if (product_name == "xts_demo") { + ## XTS libs + board_ld_flags += [ + "-Wl,--whole-archive", + "-lhctest", + "-lmodule_ActsParameterTest", + "-lmodule_ActsBootstrapTest", + "-lmodule_ActsDfxFuncTest", + "-lmodule_ActsKvStoreTest", + "-lmodule_ActsSamgrTest", + "-lmodule_ActsWifiServiceTest", + + "-lhiview_lite", + "-lhilog_lite", + "-lhievent_lite", + "-lbroadcast", + "-lbootstrap", + "-lhuks_test_common", + "-Wl,--no-whole-archive", + ] +} else { + ## WBLINK libs + board_ld_flags += [ + "-Wl,--whole-archive", + "-lexample", + "-lhiview_lite", + "-lhilog_lite", + "-lhievent_lite", + "-lbroadcast", + "-lbootstrap", + "-Wl,--no-whole-archive", + ] +} + +# Board related headfiles search path. +board_include_dirs = [ + "//kernel/liteos_m/kernel/arch/arm/cortex-m4/gcc", + "//device/soc/chipsea/cst85", + "${ohos_root_path}utils/native/lite/include", + "//drivers/framework/include/core", + "//drivers/framework/core/common/include/host", + "//drivers/framework/include/utils", + "//drivers/adapter/khdf/liteos_m/osal/include", + "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits", +] + +# Board adapter dir for OHOS components. +board_adapter_dir = "" + +# Sysroot path. +board_configed_sysroot = "" + +# Board storage type, it used for file system generation. +storage_type = "" diff --git a/cst85_wblink/ohos.build b/cst85_wblink/ohos.build new file mode 100644 index 0000000..f008568 --- /dev/null +++ b/cst85_wblink/ohos.build @@ -0,0 +1,10 @@ +{ + "parts": { + "device_btdm": { + "module_list": [ + "//device/board/chipsea/btdm:btdm" + ] + } + }, + "subsystem": "device_btdm" +} diff --git a/figures/底板图片.png b/figures/底板图片.png new file mode 100755 index 0000000..fdcf4d2 Binary files /dev/null and b/figures/底板图片.png differ diff --git a/figures/开发板功能框图.png b/figures/开发板功能框图.png new file mode 100755 index 0000000..7b10d7a Binary files /dev/null and b/figures/开发板功能框图.png differ diff --git a/figures/开发板图片.png b/figures/开发板图片.png new file mode 100755 index 0000000..1e4c2b1 Binary files /dev/null and b/figures/开发板图片.png differ