安装 mbed os 开发环境yotta
feature:
- 采用Python编写,
- Pip 包管理
- CMake, the build system that yotta usesa
- compiler, to actually compile the code into working programs
- compiling with different compilers by specifying different targets for the compilation
Note:
If you have a complex python setup on your system, you may want to consider installing yotta in a virtualenv, in order to separate its dependencies from other python programs on your system.
To upgrade an existing installation to a new version, see upgrading (the same for all systems).
If you have a restrictive firewall setup, then for yotta to be fully functional you may also need to ensure that it can access the required domains.
# Installing on Windows
To install yotta on windows you can either use the one shot windows installer or install all the dependencies and yotta manually.
# yotta Windows Installer
- Download the latest yotta windows installer.
- Run the installer.
- Click on
Run Yottashortcut on desktop or in start menu to run session with yotta path temporarily pre-pended to system path.
# Manual Installation
Install python. You must install python 2.7.9 or later for yotta to work on windows. Select either the x86-64 installer if you use 64-bit windows, or the x86 installer if you use 32-bit windows.
During installation, be sure to select the "add to path" option. This will let you run python easily from a command prompt.
- Install CMake. yotta uses CMake to generate makefiles that control the build. Select the latest available version, currently 3.2.1 The 32-bit version will work on all versions of windows. Be sure to check the "add cmake to the path for current user" option during installation.
- Install Ninja, the small and extremely fast build system that yotta uses. Download the release archive from the releases page, and extract it to a directory (for example
C:\ninja). - Add the directory you installed Ninja in to your path.
- Install the arm-none-eabi-gcc cross-compiler in order to build software to run on embedded devices.
- Finally, open cmd.exe and run
pip install -U yottato install yotta itself.
# Cross-compiling from Windows
To use yotta to cross-compile binaries to run on embedded hardware, you need to first install the arm-none-eabi-gcc compiler. At the time of writing this, the latest version used for cross-compiling with yotta is gcc 4.9. Download and install it, then add the bin/ subdirectory of the installation directory to your path. After you do that, you should be able to open cmd.exe and run arm-none-eabi-gcc from the command prompt. If that doesn't work, make sure that your path is properly set.
To use this compiler, you'll need to select a supported cross-compilation target, such as frdm-k64f-gcc, by running yotta target frdm-k64f-gcc before building.
# Building programs natively to run on windows
yotta does not yet allow compiling programs to run on windows. If you are adventurous and get it working, submit a pull request to update these docs.
# Solving Common Windows Installation Problems
error: command ['ninja'] failed
If you get an error when running yotta build which looks something like this:
':' is not recognized as an internal or external command,
operable program or batch file.
...
ninja: build stopped: subcommand failed.
error: command ['ninja'] failed
This is caused by re-trying a yotta build after fixing a missing cross-compiler installation. After completing the installation of the compiler, you'll need to run yotta clean before running build again.
# Adding things to your PATH in windows
Your PATH environment variable holds the location of programs that can be easily executed by other programs. If yotta fails to find one of its dependencies (such as cmake.exe) the first thing to check is that you have added the directory that contains the dependencies executable to the PATH. To add things to your path:
- Right click on Computer, select
Properties - Select
Advanced System Settings - Select the
Advancedtab - Click the
Environment Variablesbutton Find the
Pathvariable, edit it, and append the path you want to add, preceded by a semicolon, for example:;C:\Path\to\whereverNOTE: be careful not to add any spaces before or after the semicolon, this can cause commands to fail later.
finally, close then re-open any open cmd.exe windows
# Installing in a Virtualenv
Virtualenv is a way of separating different python programs installed on the same system from each other. If you have a complex python environment on your system it's recommended that you install yotta inside a virtualenv. To do this, first install the non-python dependencies following the normal instructions for your platform, then:
Ensure you have virtualenv itself installed. It can be installed with:
pip install virtualenv
Check that your installation is succesful by running
virtualenv --version.Create a directory to use for the yotta virtualenv:
mkdir yotta-venv
virtualenv ./yotta-venv
activate the new virtualenv:
source ./yotta-venv/bin/activate
install yotta in the virtualenv:
pip install yotta
(optional) add the binary directory of your virtualenv to your PATH: (if you omit this step, you will need to run yotta as
../path/to/yotta-venv/bin/yottainstead of simplyyotta.export PATH="/path/to/yotta-venv/bin:$PATH"
Now yotta should work as normal. You will need to activate the virtualenv any time you want to run yotta commands (you can deactivate it afterwards, by simply running deactivate).
# Upgrading yotta (all platforms)
To update yotta itself, run:
pip install -U --no-deps yotta
pip install yotta
This will update yotta to the latest available version, and then install any missing dependencies required by the new version.
You can also run:
pip install -U yotta
This will also attempt to update all of yotta's dependencies to their latest versions.
On Linux and OS X you may have to run these commands as sudo pip ...., if permission is denied.
- 安装依赖(Dependencies)
- Python 2.7. Python 3 support is experimental.
pip.
2. Manual installation instructions
- 安装虚拟环境,virtualenv。
mkdir yotta-venv
virtualenv ./yotta-venv
- 激活activate the new virtualenv:
source ./yotta-venv/bin/activate
- install yotta in the virtualenv:
安装 mbed os 开发环境yotta的更多相关文章
- 安装gcc及开发环境
安装gcc及开发环境================================> 安装gcc: * apt-get install build-essential * gcc ...
- 安装Go语言开发环境
安装Go语言开发环境实例代码 - 详述Go语言安装所在需要的工作:安装C语言工具,安装Mercurial,更新go到新版本等操作实例. 安装go环境 1.简介 Go是一个开源项目,采用BSD授权协议. ...
- Windows 安装 Go语言开发环境
Windows 安装 Go语言开发环境 下载安装包 下载地址:http://www.golangtc.com/download 32 位请选择名称中包含 windows-386 的 msi 安 ...
- 【转】linux和windows下安装python集成开发环境及其python包
本系列分为两篇: 1.[转]windows和linux中搭建python集成开发环境IDE 2.[转]linux和windows下安装python集成开发环境及其python包 3.windows和l ...
- 安装配置PhoneGap开发环境(二)——使用Cordova取代PhoneGap创建项目
1 Cordova是谁 PhoneGap的官方文档说的非常清楚.Cordova是PhoneGap的引擎,这两者的关系类似于WebKit与Chrome浏览器的关系.所以一些核心的基础操作对于Cordov ...
- Windows下安装Object C开发环境,及Hello Word(转)
Windows下安装Object C开发环境,及Hello Word 最近想学习iphone开发,但是由于没有c基础,只有java基础.所以先从基础学习,首先是搭建环境,目前手头没有mac机子,只能先 ...
- 在 Windows10 系统中安装 Homestead 本地开发环境
在 windows10 系统中安装 homestead 本地开发环境 在 windows10 环境下安装 homestead 开发环境,网上有很多相关教程其中大多都是 mac 环境,很多大神都是用户的 ...
- Mac安装vue.js开发环境
Mac安装vue.js开发环境 DannyHooDanny的专栏订阅 一.vue.js开发环境 二.初始化一个vue.js项目 三.vue.js项目打包部署 本来以为在Mac上搭建vue.js的环境挺 ...
- Mac 安装RN android开发环境
前言 前面介绍了MAC 安装,再来讲讲mac 安装 安卓的开发环境 首先貌似很多Mac自带安卓JDK ,你可以在终端上输入java -version 看是否已经有java开发环境. 如果没有java开 ...
随机推荐
- logback 配置详解(一)——logger、root
1.根节点<configuration>包含的属性 scan: 当此属性设置为true时,配置文件如果发生改变,将会被重新加载,默认值为true. scanPeriod: 设置监测配置文件 ...
- [linux] 指令记录
1> 查看linux版本号 lsb_release -a cat /etc/redhat-release
- 让PHP开发者事半功倍的十大技巧
如果你使用一面大镜子作为冲浪板会发生什么?或许你会在较短的时间内征服海浪,但是你肯定从内心深处明白,这不是冲浪的正确选择.同样的道理也适用于PHP编程,尽管这样的类比听起来有一些古怪.我们经常听到有人 ...
- static 作用
静态,定义静态变量或者静态函数的时候使用该关键字. 被定义为static的函数,可以不需要new一个新类别而直接调用 比如Math类里有一个,public static sub()方法,那么你可以直接 ...
- iOS 开发之SVN提交问题解决
1.Commit failed (details follow): '/Users/dev_lzz/Desktop/cjh_ios(16)/cjh/iamgge/iconfont_arrow@3x.p ...
- Redis教程(四):Hashes数据类型
转自:http://www.jb51.net/article/65240.htm 一.概述: 我们可以将Redis中的Hashes类型看成具有String Key和String Value的map容器 ...
- hadoop启动是常见小问题
1.先su进入root账户,然后 service iptables stop //关闭防火墙 start-all.sh //启动 2.启动是会显示,如果出错日志保存路径!!!基本所有问题都要去这些日志 ...
- 转-阿里云CentOS Linux服务器上用postfix搭建邮件服务器
http://www.cnblogs.com/dudu/archive/2012/12/12/linux-postfix-mailserver.html 注:本文的邮件服务器只用于发送邮件,也就是ST ...
- 利用Github Pages生成一个快速访问的网址,展示自己的项目
利用Github Pages展示自己的项目 写了个小项目,想要分享出去,一直在用Github管理项目,了解到Github还有Github Pages功能,然后惊喜的发现Github pages可以搭建 ...
- IOC理解
控制反转(反转控制):谁控制了谁? 就是交换控制权1.A a =new A(); 要使用这个A 必须你去new他.控制权在a2.由第三方来进行创造这个A,你用的时候直接用就是.控制权在第三方. 3 ...