--作者:燕十三(flyingcys)
-- blog:http://blog.csdn.net/flyingcys
--QQ:294102238
文件夹名称 | 内容描述 |
board | 评估板(如STM32L496G-Discovery) |
build | 编译框架 |
device | 连接MCU/SoC的外设,比如支持使用AT命令的WiFi系列模组 |
example | 代码示例,通过了完备测试的应用程序(比如Alink) |
framework | IoT 通用组件 |
include | 系统头文件 |
kernel | 包括Rhino和协议栈 |
platform | 芯片架构支持的相关文件 |
security | 包括TLS,TFS, TEE在内的安全组件 |
tools | 命令行界面(CLI)和用于建立远程设备中心的testbed工具 |
utility | IoT通用软件库,比如 cJSON |
test | UT测试用例 |
sudo apt-get install -y python gcc-multilib libssl-dev libssl-dev:i386 libncurses5-dev libncurses5-dev:i386 libreadline-dev libreadline-dev:i386 python-pip minicom2.安装aos-cube,用python包管理器pip安装aos-cube和相关依赖包
pip install setuptools wheel aos-cube请确认pip环境是基于python 2.7的,如果遇到权限问题,可能需要sudo来执行
git clone https://github.com/alibaba/AliOS-Things.gitAlios Things仓库比较大,下载需要一些时间。
usage: aos [-h] [--version] ...Code management tool for aos - https://code.aliyun.com/aos/aosversion 0.2.42Use 'aos <command> -h|--help' for detailed help.Online manual and guide available at https://code.aliyun.com/aos/aos-cubeoptional arguments: -h, --help show this help message and exit --version print version number and exitCommands: new Create new aos program or component ls List cube info, default components info import Import program from URL add Add component from AOS_SDK_PATH or URL rm Remove component deploy Find and add missing components and source codes codes Import the optional component from the remote repository publish Publish program or component update Update to branch, tag, revision or latest sync Synchronize aos component references status Show version control status make Make aos program/component scons Make aos program/component by scons makelib Compile static library config Tool configuration upload Upload aos image monitor Serial port monitor upgrade Upgrade aos-cube to latest help This help screen
Usage: make <target> [download] [run | debug] [JTAG=xxx] [total] [VERBOSE=1] [BINS=app/framework/kernel] make run <target> One each of the following mandatory [and optional] components separated by '@' * Application (apps in example) * Board (cy8ckit-149 mk1101 gd32f4xx mk3080 mk3060 mk3239 stm32f429zi-nucleo xr871evb r5f565ne frdmkl27z stm32f769i-discovery lpcxpresso54102 rda8955 linuxhost uno-91h r5f100lea stm32l496g-discovery starterkit mk3165 atsame54-xpro eml3047 developerkit stm32l432kc-nucleo pca10056 esp32devkitc bk7231devkitc mk3166 esp8266 stm32l073rz-nucleo b_l475e rk1108 cb2201 amebaz_dev pca10040 bk7231udevkitc stm32l476rg-nucleo stm32l433rc-nucleo dh5021a_evb cy8ckit-062) * [debug | release] Building for debug or release configurations [download] Download firmware image to target platform [run] Reset and run an application on the target hardware [total] Build all targets related to this application and board [JTAG=xxx] JTAG interface configuration file from the tools/OpenOCD dirctory Default option is jlink_swd [VERBOSE=1] Shows the commands as they are being executed [BINS=app/framework/kernel] Build bins: app or framework or kernel Notes * Component names are case sensitive * 'rhino' and 'debug' are reserved component names * Component names MUST NOT include space or '@' characters * Building for debug is assumed unless '@release' is appended to the target Example Usage Build for Debug make helloworld@mk3060 Build, Download and Run using the default USB-JTAG programming interface make helloworld@mk3060 download run Build for Release make helloworld@mk3060@release Reset and run an application on the target hardware make run Clean output directory make clean. Stop.
执行aos make helloworld@linuxhost,目标文件在根目录out目录下对应目录下out/helloworld@linuxhost/binary。
vcall init auto_componentkernel_version:AOS-R-1.3.1app_version:app-1.0.0-20180615.0148app_version:app-1.0.0-20180615.0148kernel_version:AOS-R-1.3.1Build AOS NowTOOLCHAIN_PATH=/home/share/samba/application/AliOS-Things/build/compiler/gcc-arm-none-eabi/Linux64/bin/Compiling alicryptoCompiling board_amebaz_devCompiling auto_componentCompiling cliCompiling digest_algorithmCompiling frameworkCompiling halCompiling kernel_initCompiling vfs_deviceCompiling newlib_stubCompiling logCompiling kvCompiling netmgrCompiling netmgrappCompiling armv7mCompiling rtl8710bnCompiling rtl8710bn_Peripheral_DriversCompiling rtl8710bn_SDKCompiling netCompiling rhinoCompiling vcallCompiling vfsCompiling yloopMaking out/netmgrapp@amebaz_dev/libraries/alicrypto.aMaking out/netmgrapp@amebaz_dev/libraries/board_amebaz_dev.aMaking out/netmgrapp@amebaz_dev/libraries/auto_component.aMaking out/netmgrapp@amebaz_dev/libraries/cli.aMaking out/netmgrapp@amebaz_dev/libraries/digest_algorithm.aMaking out/netmgrapp@amebaz_dev/libraries/framework.aMaking out/netmgrapp@amebaz_dev/libraries/hal.aMaking out/netmgrapp@amebaz_dev/libraries/kernel_init.aMaking out/netmgrapp@amebaz_dev/libraries/vfs_device.aMaking out/netmgrapp@amebaz_dev/libraries/newlib_stub.aMaking out/netmgrapp@amebaz_dev/libraries/log.aMaking out/netmgrapp@amebaz_dev/libraries/kv.aMaking out/netmgrapp@amebaz_dev/libraries/netmgr.aMaking out/netmgrapp@amebaz_dev/libraries/netmgrapp.aMaking out/netmgrapp@amebaz_dev/libraries/armv7m.aMaking out/netmgrapp@amebaz_dev/libraries/rtl8710bn.aMaking out/netmgrapp@amebaz_dev/libraries/rtl8710bn_Peripheral_Drivers.aMaking out/netmgrapp@amebaz_dev/libraries/rtl8710bn_SDK.aMaking out/netmgrapp@amebaz_dev/libraries/net.aMaking out/netmgrapp@amebaz_dev/libraries/rhino.aMaking out/netmgrapp@amebaz_dev/libraries/vfs.aMaking out/netmgrapp@amebaz_dev/libraries/yloop.aMaking out/netmgrapp@amebaz_dev/libraries/vcall.aMaking netmgrapp@amebaz_dev.elfMaking netmgrapp@amebaz_dev.xip2.elfMaking netmgrapp@amebaz_dev.hexMaking netmgrapp@amebaz_dev.binCan't parse memory configure, memory info get fail!Making netmgrapp@amebaz_dev.xip2.binLinux64 /home/share/samba/application/AliOS-Things netmgrapp amebaz_dev /home/share/samba/application/AliOS-Things/build/compiler/gcc-arm-none-eabi/Linux64/bin/Generate Standard Flash Images: out/netmgrapp@amebaz_dev/binary/netmgrapp@amebaz_dev.all.binBuild completeMaking .gdbinit由上可见,默认编译显示编译信息较精简,可通过执行aos make VERBOSE=1 netmgrapp@amebaz_dev 来查看详细的编译过程。
void main(void){ aos_init(); krhino_task_dyn_create(&g_aos_init, "aos-init", 0, AOS_DEFAULT_APP_PRI , 0, AOS_START_STACK, (task_entry_t)sys_init_func, 1); SysTick_Config(SystemCoreClock/RHINO_CONFIG_TICKS_PER_SECOND); aos_start(); return;}
联系客服