
本帖最后由 watershade 于 2015-9-23 21:34 编辑 本意外mbed os会在八月中旬发布,作为一个喜欢新鲜的人,自然焦灼等待。结果等到九月初,也没发现mbed os beta的发布。可是上周无意发现mbed os发布了,而且官网首页也换了。网址由mbed.org更换成mbed.com。之前不支持中文,现在由中英文两个版本,(心里欢喜,这次终于被公平对待了)。 首页提供一个入门教程的链接。现在将要素写下来。 首先要说明mbed os只是mbed生态系统很小的一环,mbed还包含mbed客户端,mbed服务器(由mbed提供),mbed tls和其它工具。当然还包含硬件和硬件平台。 大致的树形关系应该是这样(自己的理解): mbed服务器(云端) ______________________|______________________ | | | | | mbed客户端 ...其他客户端... mbed客户端 ______________|____________ | | | mbed os设备 mbed os设备 _________|_________ | | | | 传感器 执行器 指示与显示设备等 【可能错了】 工具用于设置和编译等,LTS是安全通讯,也就是设备之间通讯互联的基础。在不同设备之间支持多种通讯协议。由许多协议一个外行还从没听过。 step 1: 安装yotta yotta就是上述所谓的工具中对mbed os最重要的工具,相当于ide和项目和模块管理系统。官方叫做软件模块系统。 http://www.mbed.com/zh-cn/development/software/tools/yotta/ 这个是全新的体验,可以在三个主流系统上使用。在windows上听麻烦,我安装了一下,但是不知道是那个地方配置的问题,没有build成功。而且windows上不支持native编译,只能交叉编译。不过无所谓吧。之后慢慢解决出现的问题(目前遇到的问题是ninja error,环境变量应该配置没有问题,用yotta clean也没解决)。 安装请参考http://yottadocs.mbed.com/#installing 我最终实在linux上用的,没办法木有mac。 step 2: 点灯-初始mbed os 在还没有对mbed os有一个清晰的认识之前,只能照葫芦画瓢。 官方网址: http://docs.mbed.com/docs/gettin ... FirstProjectmbedOS/ 需要说明的有两点。一点是在yotta target (你的平台,比如stm32f429i-disco-gcc)。之后接着yotta target是没有设备的,提示missing。 需要执行玩install mbed-drivers之后,在执行就有了设备。 另外一点是,支持的设备目前不限于官方提供的几个。search到的设备都应该可以。没有的设备需要自己修改和添加。 当前支持的有: test-target-dep 0.0.2: Test Target Test Dependencies frdm-k64f-gcc 0.0.24: Official mbed build target for the mbed frdm-k64f development board. frdm-k64f-armcc 0.0.16: Official mbed build target for the mbed frdm-k64f development board, using the armcc toolchain. bbc-microbit-classic-gcc 0.1.3: Official mbed build target for the mbed nrf51822 development board, using the armgcc toolchain. st-nucleo-f401re-gcc 0.1.0: Official mbed build target for the mbed st-nucleo-f401re development board. bbc-microbit-classic-armcc 0.1.0: Official mbed build target for the microbit, using the armcc toolchain. stm32f429i-disco-gcc 0.0.5: Official mbed build target for the mbed st-nucleo-f429zi development board. nordic-nrf51822-16k-gcc 0.0.9: Official mbed build target for the mbed nrf51822 development board, using the armgcc toolchain. nordic-nrf51822-32k-gcc 0.0.6: Official mbed build target for the nrf51822 32KB chip. st-stm32f439zi-gcc 0.0.3: Official mbed build target for the st stm32f439zi microcontroller. nordic-nrf51822-16k-armcc 0.0.8: Official mbed build target for the mbed nrf51822 development board, using the armcc toolchain. stm32f411re-nucleo-gcc 0.0.1: Official mbed build target for the mbed st-nucleo-f411re development board. bbc-microbit-classic-gcc-nosd 0.1.2: Official mbed build target for the BBC micro:bit, using the armgcc toolchain, without Softdevice. nordic-nrf51822-32k-armcc 0.0.8: Official mbed build target for the mbed nrf51822 development board, using the armcc toolchain. bbc-microbit-classic-armcc-nosd 0.1.0: Official mbed build target for the microbit, using the armcc toolchain, without soft device. x86-linux-native 0.0.6: Build target for programs compiled natively for Linux x86-osx-native 0.0.7: Build target for programs compiled natively for OS X mbed-gcc 0.0.14: base mbed build target for gcc toolchain mbed-armcc 0.0.16: Official mbed base target description for compiling with the ARMCC compiler libc 0.0.3: libc shim module: pulls in the platform libc when compiling for nostdlib targets ublox-odin-w2-gcc 0.0.3: Official mbed build target for the ublox odin-w2 module. ublox-odin-w2-evk-gcc 0.0.0: Official mbed build target for the mbed ublox c029 evkelopment board. seeedtinyble-gcc 0.0.2: Official mbed build target for the nrf51822 16KB chip. mkit-gcc 0.0.1: Official mbed build target for the nrf51822 16KB chip. ublox-c029-gcc 0.0.0: Official mbed build target for the mbed ublox c029 development board. mkit-classic-armcc 0.0.1: mbed classic build target for nrf51822 mkit. lex-test-gcc 0.0.1: lex's first target to test 此外这一段还提供了一段简单的代码,代码是cpp编写的。有一个域名空间minar很重要。之后要关注一下。语法和之前的mbed差不多。openocd还没用过。目前准备参照http://github.com/texane/stlink ... torial/tutorial.pdf来执行stlink的驱动。 此外还需要在linux上安装串口终端,不放试试minicom,ubuntu上安装方便:sudo apt-get install minicom 在编译成功之后,需要讲代码复制到mbed上去,但是问题是stlink又有原生的linux驱动,这是一个大问题。在后续后详细介绍。但是,一种讨巧的办法是装虚拟机。这样就可以方便编译了。 ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 2015.09.23 ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 今天再补充一下mbed os的文件结构,这个是很重要的。 官方的文档:http://www.mbed.com/zh-cn/development/software/tools/yotta/ 文档结构,用下图: yotta 模块或应用程序的结构 应用程序和可重用的 yotta 模块均有类似的结构:
建议mbed的开发,要了解这个基础知识。 目前只做到这里,后续希望慢慢更新 |
需要说明的是我对mbed客户端的理解可能错误了,因为官方介绍的有些看不懂。官方的意思应该是说mbed客户端是和mbed os是同一级别的,是为了方便设备制造上考虑的。总之我前面的描述有问题。
http://www.mbed.com/zh-cn/development/software/mbed-client/
今年iot系统不是几大厂商在推吗,尝尝鲜。看看到底对开发有什么帮助。
现在只有推出可裁剪的桌面系统(非操作系统)才有大量用户。
尝试了一下,感觉还是有些难度。桌面系统,这个我还真没有概念,这是什么?阁下赐教。
其实,就看看,架构我呀还没理顺。慢慢了解。一起学习交流呀。话说现在支持的板子不多。
可以請樓主分享一下yt build之後的完整log嗎?
小弟下載了http://github.com/ARMmbed/helloyotta
然後試著yt build
info: generate for target: frdm-k64f-gcc 0.1.3 at /tmp/aaa/helloyotta/yotta_targets/frdm-k64f-gcc
GCC version is: 4.8.3
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/aaa/helloyotta/build/frdm-k64f-gcc
log: warning: no configuration file specified, using default values
log: ninja version 0.1.3 initializing
log: magic group: gid=0 (root)
log: entering main loop
log: generating initial pid array..
log: now monitoring process activity
就卡在上面這行不會動了
請教一下這是什麼問題呢?----
更新一下最新進度
先執行yt clean之後就build的出來了
應該是測試時把環境搞亂了
在此建議大家build之前先執行一次yt clean
发现官方search出来的F401和411都编译不成功,不论linux还是windows上。但是F429可以