Skip to content

Commit

Permalink
增加初步的example模板文档和example文档说明
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaowenxia1 committed Jul 6, 2018
1 parent 5250204 commit 9a3028a
Show file tree
Hide file tree
Showing 6 changed files with 179 additions and 35 deletions.
65 changes: 47 additions & 18 deletions board/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,49 @@
### Supported Boards

<table>
<tr>
<td>Architecture</td>
<td>CPU</td>
<td>Board</td>
</tr>
<tr>
<td rowspan="10">
ARM
</td>
<td>rtl8710bn</td>
<td>amebaz_dev</td>
</tr>
<tr>
<td>rtl8710bn</td>
<td>amebaz_dev</td>
</tr>
</table>
* ARM
* Cortex-M0
* [eml3047](./eml3047/README.md)
* [frdmkl27z](./frdmkl27z/README.md)
* Cortex-M3
* [mk1101](./mk1101/README.md)
* Cortex-M4
* [amebaz_dev](./amebaz_dev/README.md)
* [atsame54-xpro](./atsame54-xpro/README.md)
* [b_l475e](./b_l475e/README.md)
* [cy8ckit-062](./cy8ckit-062/README.md)
* [cy8ckit-149](./cy8ckit-149/README.md)
* [developerkit](./developerkit/README.md)
* [gd32f4xx](./gd32f4xx/README.md)
* [lpcxpresso54102](./lpcxpresso54102/README.md)
* [lpcxpresso54608](./lpcxpresso54608/README.md)
* [mk3080](./mk3080/README.md)
* [mk3165](./mk3165/README.md)
* [mk3166](./mk3166/README.md)
* [mk3239](./mk3239/README.md)
* [pca10040](./pca10040/README.md)
* [pca10056](./pca10056/README.md)
* [starterkit](./starterkit/README.md)
* [stm32f429zi-nucleo](./stm32f429zi-nucleo/README.md)
* [stm32l432kc-nucleo](./stm32l432kc-nucleo/README.md)
* [stm32l433rc-nucleo](./stm32l433rc-nucleo/README.md)
* [stm32l476rg-nucleo](./stm32l476rg-nucleo/README.md)
* [stm32l496g-discovery](./stm32l496g-discovery/README.md)
* [uno-91h](./uno-91h/README.md)
* [xr871evb](./xr871evb/README.md)
* Cortex-M7
* [stm32f769i-discovery](./stm32f769i-discovery/README.md)
* ARM968E-S
* [bk7231devkitc](./bk7231devkitc/README.md)
* [bk7231udevkitc](./bk7231udevkitc/README.md)
* [mk3060](./mk3060/README.md)
*
* xtensa
* [esp32devkitc](./esp32devkitc/README.md)
* [esp8266](./esp8266/README.md)
* MIPS
* MIPS-I
* [rda8955](./rda8955/README.md)
* C-Sky
* CK802
* [cb2210](./cb2210/README.md)
*
16 changes: 8 additions & 8 deletions doc/template/board_template-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[EN](./board_template.md) | 中文

you can check sample template [developerkit](../../../board/developerkit/README.md).
you can check sample template [developerkit](../../board/developerkit/README.md).
### 规范

#### 语言规范
Expand All @@ -13,13 +13,13 @@ you can check sample template [developerkit](../../../board/developerkit/README.

#### 图片规范

文档中涉及到的图片都保存到`AliOS-Things/doc/assets/`里面,通过相对路径引入图片,比如`board/stm32f429zi-nucleo/README.md`文件中可以这样引入图片:
文档中涉及到的图片为了防止仓库过大,**请尽量使用外部链接**,当然,如果涉及到的图片需要保存到AliOS Things仓库里的,请统一保存到`AliOS-Things/doc/assets/`里面,通过相对路径引入图片,比如`board/developerkit/README.md`文件中可以这样引入图片:

`![](../../doc/assets/board_stm32f429zi-nucleo_1.jpg)`
`![](../../doc/assets/board_developerkit_1.jpg)`

图片类型不做要求,图片名称请按照如下格式命名:`board_<board_name>_<idx>`,比如:

* `board_stm32f429zi-nucleo_1.jpg`
* `board_developerkit_1.jpg`
* `board_linuxhost_10.gif`

#### 文档内容规范
Expand All @@ -39,11 +39,11 @@ board的文档按照以下几种部分依次编写:

`[其他](#其他)`

如果**标题中包含空格**的话,`#`后面的目录标题需要使用`-`替代空格,比如[AliOS Things 支持的硬件资源](#AliOS-Things-支持的硬件资源):
如果**标题中包含空格**的话,`#`后面的目录标题需要使用`-`替代空格比如[AliOS Things 支持的硬件资源](#AliOS-Things-支持的硬件资源):

`[AliOS Things 支持的硬件资源](#AliOS-Things-支持的硬件资源)`

如果**标题中包含括号**的话,括号中需要把括号删掉,比如[开发板介绍(Overview)](#开发板介绍overview):
如果**标题中包含括号**的话括号中需要把括号删掉比如[开发板介绍(Overview)](#开发板介绍overview):

`* [开发板介绍(Overview)](#开发板介绍overview)`

Expand All @@ -67,7 +67,7 @@ board的文档按照以下几种部分依次编写:

### 开发板硬件资源格式说明

请详细列出开发板的板级硬件资源,包括cpu型号,cpu架构,cpu主频,flash大小,ram大小等,建议按照如下示例编写:
请详细列出开发板的板级硬件资源,包括cpu型号,cpu架构cpu主频flash大小ram大小等建议按照如下示例编写:

* cpu: STM32L496AGI6
* arch: Cortex-M4 with FPU
Expand Down Expand Up @@ -117,7 +117,7 @@ board的文档按照以下几种部分依次编写:

### 烧录和调试格式说明

主要说明调试接口,调试方式,固件下载方式,运行效果图片等.
主要说明调试接口调试方式固件下载方式运行效果图片等.

### 其他
* 官网
Expand Down
18 changes: 9 additions & 9 deletions doc/template/board_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ board README.md的模板可以参考[developerkit](../../board/developerkit/READ

#### 图片规范

文档中涉及到的图片为了防止仓库过大,**请尽量使用外部链接**.当然,如果涉及到的图片需要保存到AliOS Things仓库里的,请统一保存到`AliOS-Things/doc/assets/`里面,通过相对路径引入图片,比如`board/stm32f429zi-nucleo/README.md`文件中可以这样引入图片:
文档中涉及到的图片为了防止仓库过大**请尽量使用外部链接**,当然,如果涉及到的图片需要保存到AliOS Things仓库里的请统一保存到`AliOS-Things/doc/assets/`里面,通过相对路径引入图片,比如`board/developerkit/README.md`文件中可以这样引入图片:

`![](../../doc/assets/board_stm32f429zi-nucleo_1.jpg)`
`![](../../doc/assets/board_developerkit_1.jpg)`

图片类型不做要求,图片名称请按照如下格式命名:`board_<board_name>_<idx>`,比如:

* `board_stm32f429zi-nucleo_1.jpg`
* `board_developerkit_1.jpg`
* `board_linuxhost_10.gif`

#### 文档内容规范

board的文档按照以下几种部分依次编写
board的README文档按照以下几种部分依次编写

* 目录
* 开发板介绍(Overview)
Expand All @@ -35,15 +35,15 @@ board的文档按照以下几种部分依次编写:

### 目录规范

目录的链接直接使用`[<目录>](#目录)`的方式链接,比如[其他](#其他):
目录的链接直接使用`[<目录>](#目录)`的方式链接比如[其他](#其他):

`[其他](#其他)`

如果**标题中包含空格**的话,`#`后面的目录标题需要使用`-`替代空格,比如[AliOS Things 支持的硬件资源](#AliOS-Things-支持的硬件资源):
如果**标题中包含空格**的话,`#`后面的目录标题需要使用`-`替代空格比如[AliOS Things 支持的硬件资源](#AliOS-Things-支持的硬件资源):

`[AliOS Things 支持的硬件资源](#AliOS-Things-支持的硬件资源)`

如果**标题中包含括号**的话,括号中需要把括号删掉,比如[开发板介绍(Overview)](#开发板介绍overview):
如果**标题中包含括号**的话括号中需要把括号删掉比如[开发板介绍(Overview)](#开发板介绍overview):

`* [开发板介绍(Overview)](#开发板介绍overview)`

Expand All @@ -67,7 +67,7 @@ board的文档按照以下几种部分依次编写:

### 开发板硬件资源格式说明

请详细列出开发板的板级硬件资源,包括cpu型号,cpu架构,cpu主频,flash大小,ram大小等,建议按照如下示例编写:
请详细列出开发板的板级硬件资源,包括cpu型号,cpu架构cpu主频flash大小ram大小等建议按照如下示例编写:

* cpu: STM32L496AGI6
* arch: Cortex-M4 with FPU
Expand Down Expand Up @@ -117,7 +117,7 @@ board的文档按照以下几种部分依次编写:

### 烧录和调试格式说明

主要说明调试接口,调试方式,固件下载方式,运行效果图片等.
主要说明调试接口调试方式固件下载方式运行效果图片等.

### 其他
* 官网
Expand Down
Empty file.
52 changes: 52 additions & 0 deletions doc/template/example_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
## example README.md模板

EN | [中文](./example_template-zh.md)

example README.md的模板可以参考[linkkitapp](../../example/linkkitapp/README.md).
### 规范

#### 语言规范

文档默认使用英文编写,当然也可以中英文都支持,中文的文档名称为`README-zh.md`,跟英文文档`README.md`同一个目录,文档中按照如下方式建立中英文索引:

[EN](README.md) | [中文](README-zh.md)

#### 图片规范

文档中涉及到的图片为了防止仓库过大,**请尽量使用外部链接**,当然,如果涉及到的图片需要保存到AliOS Things仓库里的,请统一保存到`AliOS-Things/doc/assets/`里面,通过相对路径引入图片,比如`example/linkkitapp/README.md`文件中可以这样引入图片:

`![](../../doc/assets/example_linkkitapp_1.jpg)`

图片类型不做要求,图片名称请按照如下格式命名:`example_<example_name>_<idx>`,比如:

* `example_helloworld_1.jpg`
* `example_linkkitapp_10.gif`

#### 文档内容规范

example的README文档按照以下几种部分依次编写:

* 目录
* 介绍(Overview)
* 需要条件
* 编译和运行(Building and Running)
* 运行效果或输出(effect or Output)

### example介绍

**example介绍**不做过多要求,建议按照如下几个部分介绍:
* 功能
* 依赖的组件
* 补充说明

### 需要条件

**需要条件**主要说明一下运行该example需要具备哪些条件,比如是否需要wifi联网,需要智能生活开发平台的账号和三元组等.

### 编译和运行

* 编译
* 运行

### 运行效果或输出
按照实际的效果来展示,最好能够有图片展示,或者动图展示.
63 changes: 63 additions & 0 deletions example/linkkitapp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
## linkkitapp

### Content
- [linkkitapp](#linkkitapp)
- [Content](#content)
- [Overview](#overview)
- [Requirements](#requirements)
- [Build and Run](#build-and-run)
- [Running effect](#running-effect)

### Overview

linkkitapp example will connect Alibaba's [Living Link](https://living.aliyun.com/#/). Living Link is platform service which provides customers with a smart devices developerment management platform, especially for smart life area.

The service includes online device definition, device debugging,device encryption, cloud API, APP development SDK kits, operation management and data analytics, coving the whole lifecycle from smart device development, app development, cloud development and operation management.

The platform provides services on domestic sites and global sites,to improve device performance of connectivity worldwide.

linkkitapp support some usefull service such as **fota**, **device online**, **device control**, **ywss**.

For more linkkitapp details please refer to [AliOS Things Linkkit Application.zh](https://github.com/alibaba/AliOS-Things/wiki/AliOS-Things-Linkkit-Application.zh)

### Requirements

* register an account on [Living Link](https://living.aliyun.com/#/), create an product, and create an device.

* get TSL string, refer to [TSL](https://living.aliyun.com/doc#mvtil0.html).
* get `product secret`, `product name`, `device name`, `device secret`, refer to [Device activation code](https://living.aliyun.com/doc#mvtil0.html).
* install the [Demo app](https://living.aliyun.com/doc#muti-app.html) on you phone(android or ios).

### Build and Run
before build linkkitapp, you need to modify file: `framework/protocol/linkkit/iotkit/sdk-encap/imports/iot_import_product.h` to your `product secret`, `product name`, `device name`, `device secret`:

```c
#define PRODUCT_KEY "a1BDCKKSpdu"
#define PRODUCT_SECRET "Rp0aCxyRnd2ecrCX"
#define DEVICE_NAME "MVwo1x7hB2pyEbXlLkzE"
#define DEVICE_SECRET "OKHWuIaMzwtJAjUzPRLG1rcYxFo43akU"
```

and modify file: `example/linkkitapp/linkkit_app.c` to your `TSL string`:

```c
const char TSL_STRING[] = "......"
```
then build linkkitapp:

```sh
aos make linkkitapp@mk3060
```

download `out/linkkitapp@mk3060/binary/[email protected]` and power on board.

### Running effect

device online:

![](https://i.imgur.com/1e9kOBU.png)

device console display:
![](https://i.imgur.com/bKbt6I8.png)

For more linkkitapp details please refer to [AliOS Things Linkkit Application.zh](https://github.com/alibaba/AliOS-Things/wiki/AliOS-Things-Linkkit-Application.zh)

0 comments on commit 9a3028a

Please sign in to comment.