开发者社区> 问答> 正文

AliOS Things 在命令行中使用 aos-cube 工具?

AliOS Things 在命令行中使用 aos-cube 工具?

展开
收起
剑曼红尘 2020-03-26 21:23:30 1392 0
1 条回答
写回答
取消 提交回答
  • 安装 aos-cube

    首先,用 python 包管理器 pip 来安装 aos-cube。推荐在虚拟 Python 环境中进行,如 Conda, virtualenv。

    $ pip install aos-cube

    说明 请确认 pip 环境是基于 Python 2.7 的。如果遇安装问题,请添加 --user 参数。具体请参考 pip install 用法。

    下载代码并编译烧录运行

    此处使用 Developer Kit

    AliOS Things版本在2.1.0之前,运行指令如下。

    git clone https://github.com/alibaba/AliOS-Things.git -b <release_branch_name> cd AliOS-Things aos make helloworld@developerkit # 编译构建 (... 编译过程) aos upload helloworld@developerkit # 固件烧录 (... 烧录过程)

    AliOS Things版本在2.1.0之后,运行指令如下。

    gitclone https://github.com/alibaba/AliOS-Things.git -b <release_branch_name> cd AliOS-Thingsaosmakelinkkitpp@developerkit -c config #先配置好板子和app

    aos make #编译构建(...编译过程) aos upload #固件烧录(...烧录过程)

    说明 -b <release_branch_name>请用具体的版本号代替,可以参考获取方法 如果没有-b <release_branch_name>,默认下载最新版本。

    串口log显示

    连接串口并重启开发板,可以看见 app_delayed_action 在1秒时启动,每5秒触发一次。AliOS Things 3.0.0版本的log如下所示。

             Welcome to AliOS Things
    

    nano entry here! hello world! count 0 hello world! count 1 hello world! count 2 hello world! count 3 hello world! count 4 hello world! count 5 hello world! count 6 hello world! count 7 hello world! count 8 ……

    说明 因AliOS Things版本的不同,log日志也会有所差别。

    更多示例代码请参考如下

    • blink
    • mqttapp
    • linkkitapp
    2020-03-26 21:25:28
    赞同 展开评论 打赏
问答分类:
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
AliOS Things 电源管理框架 立即下载
AliOS Things快速开发指南 立即下载
ST+AliOS > Smart IoT ! 立即下载