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

  1. Download the latest yotta windows installer.
  2. Run the installer.
  3. Click on Run Yotta shortcut on desktop or in start menu to run session with yotta path temporarily pre-pended to system path.

# Manual Installation

  1. 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.

    1. 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.
    2. 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).
    3. Add the directory you installed Ninja in to your path.
    4. Install the arm-none-eabi-gcc cross-compiler in order to build software to run on embedded devices.
    5. Finally, open cmd.exe and run pip install -U yotta to 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:

  1. Right click on Computer, select Properties
  2. Select Advanced System Settings
  3. Select the Advanced tab
  4. Click the Environment Variables button
  5. Find the Path variable, edit it, and append the path you want to add, preceded by a semicolon, for example: ;C:\Path\to\wherever

    NOTE: be careful not to add any spaces before or after the semicolon, this can cause commands to fail later.

  6. 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:

  1. Ensure you have virtualenv itself installed. It can be installed with:

    pip install virtualenv

    Check that your installation is succesful by running virtualenv --version.

  2. Create a directory to use for the yotta virtualenv:

    mkdir yotta-venv
    virtualenv ./yotta-venv
  3. activate the new virtualenv:

    source ./yotta-venv/bin/activate
  4. install yotta in the virtualenv:

    pip install yotta
  5. (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/yotta instead of simply yotta.

    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.

  1. 安装依赖(Dependencies)

  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的更多相关文章

  1. 安装gcc及开发环境

    安装gcc及开发环境================================> 安装gcc:     * apt-get install build-essential    * gcc ...

  2. 安装Go语言开发环境

    安装Go语言开发环境实例代码 - 详述Go语言安装所在需要的工作:安装C语言工具,安装Mercurial,更新go到新版本等操作实例. 安装go环境 1.简介 Go是一个开源项目,采用BSD授权协议. ...

  3. Windows 安装 Go语言开发环境

    Windows 安装 Go语言开发环境   下载安装包 下载地址:http://www.golangtc.com/download   32 位请选择名称中包含 windows-386 的 msi 安 ...

  4. 【转】linux和windows下安装python集成开发环境及其python包

    本系列分为两篇: 1.[转]windows和linux中搭建python集成开发环境IDE 2.[转]linux和windows下安装python集成开发环境及其python包 3.windows和l ...

  5. 安装配置PhoneGap开发环境(二)——使用Cordova取代PhoneGap创建项目

    1 Cordova是谁 PhoneGap的官方文档说的非常清楚.Cordova是PhoneGap的引擎,这两者的关系类似于WebKit与Chrome浏览器的关系.所以一些核心的基础操作对于Cordov ...

  6. Windows下安装Object C开发环境,及Hello Word(转)

    Windows下安装Object C开发环境,及Hello Word 最近想学习iphone开发,但是由于没有c基础,只有java基础.所以先从基础学习,首先是搭建环境,目前手头没有mac机子,只能先 ...

  7. 在 Windows10 系统中安装 Homestead 本地开发环境

    在 windows10 系统中安装 homestead 本地开发环境 在 windows10 环境下安装 homestead 开发环境,网上有很多相关教程其中大多都是 mac 环境,很多大神都是用户的 ...

  8. Mac安装vue.js开发环境

    Mac安装vue.js开发环境 DannyHooDanny的专栏订阅 一.vue.js开发环境 二.初始化一个vue.js项目 三.vue.js项目打包部署 本来以为在Mac上搭建vue.js的环境挺 ...

  9. Mac 安装RN android开发环境

    前言 前面介绍了MAC 安装,再来讲讲mac 安装 安卓的开发环境 首先貌似很多Mac自带安卓JDK ,你可以在终端上输入java -version 看是否已经有java开发环境. 如果没有java开 ...

随机推荐

  1. AngulerJS小知识点二

    AngularJS与其他JavaScript框架最主要的区别在于,控制器并不合适用来执行DOM操作.格式化或数据操作,以及除存储数据模型以外的状态维护操作.他只是视图和$scope之间的桥梁. 过滤器 ...

  2. leveldb 学习。

    1)大概浏览了leveldb文档的介绍.本想逐步看代码,想想还是自己先实现一个看看如何改进. 2)完成了一个非常丑陋的初版,但是还是比初初版有进步. 3)key value的数据库,不允许有key重复 ...

  3. TCP/IP协议学习(四) 基于C# Socket的Web服务器---静态资源处理

    目录 1. C# Socket通讯 2. HTTP 解析引擎 3. 资源读取和返回 4. 服务器测试和代码下载 Web服务器是Web资源的宿主,它需要处理用户端浏览器的请求,并指定对应的Web资源返回 ...

  4. json_encode 中文乱码

    用PHP的json_encode来处理中文的时候, 中文都会被编码, 变成不可读的, 类似"\u***"的格式, 还会在一定程度上增加传输的数据量. 而在PHP5.4, 这个问题终 ...

  5. zabbix3.0.4 部署之九 (zabbix3.0.4 Linux Agent安装)

    1.从官网现在源码镜像   http://nchc.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.2.1/zabbix-3. ...

  6. 理解伪元素 :Before 和 :After

    层叠样式表(CSS)的主要目的是给HTML元素添加样式,然而,在一些案例中给文档添加额外的元素是多余的或是不可能的.事实上CSS中有一个特性允许我们添加额外元素而不扰乱文档本身,这就是“伪元素”. 你 ...

  7. Linux教程:Bash技巧,让chmod只修改某个目录下文件夹或者文件的权限

    用Linux的人都知道chmod -R 可以修改一个文件夹下的所有文件和文件夹的权限,但是这也存在着一个很大的弊端,那就是修改的是所有的文件和文件夹的权限,如果我只想修改文件或文件夹的权限该怎么办呢? ...

  8. 屏蔽zencart logs文件夹下不断生成的日志文件

    在根目錄下的logs文件夾中,經常生成一些錯誤文件類似myDEBUGxxxxx.log這樣的錯誤文件(而且這樣的錯誤文件由來并非網站出現什麽嚴重不可挽救的錯誤,大部分是一些未定義變量這樣的不起眼的小錯 ...

  9. javascript学习之Function 类型

    1.函数是对象,同样也有属性和方法.由于函数是对象,因此函数名实际上也是一个指向函数对象的指针,不会与某个函数绑定. 2.使用不带圆括号的函数名是访问函数指针,而非调用函数. 3.因为ECMAScri ...

  10. python【5】-生成式,生成器

    一.条件和循环 1. if语句 if <条件判断1>: <执行1> elif <条件判断2>: <执行2> else: <执行4> 例如: ...