mbed-integration

Integrate mbed development into Atom

wendlers

830

2

0.1.4

MIT

GitHub

This package consumes the following services:

Mbed Development with Atom

This package tries to add as much features as possible to Atom to help you with mbed development.

Basically the following is available after installing this package:

If you use Atom on a supported system (currently only Linux x64), this package will offer to install a complete mbed toolchain, including mbed-cli, pyOCD and the GCC compiler for ARM.

The ultimate goal is, that the only thing you need to install to start programming for Mbed is installing this package.


NOTE

Please note, that this package is in a very early alpha stage, and the mbed toolchain installer only works on Linux x64 (but if you install the toolchain by hand, the rest should work, see section below).


screenshot

screenshot

Atom Packages Installed by this Package

In detail, the following packages will be installed as dependencies by this package:

Python Modules Installed by this Package

Upon installation, a virtual environment for Python is created under $ATOM_HOME/packages/mbed-integration/resources/mbed-toolchain. The following modules are added to this environment:

Binary Packages Installed by this Package

Prerequisites

A working Python 2.7 is needed (mbed-cli only works on Python 2.7). Also git must be installed on your system. If unsure, run the following commands:

sudo apt install python
sudo apt install git

If you are going to use stlink, make sure you installed the st-flash and st-info binaries on your system. See here on how to get the binaries. Everything else will be installed by the installer (mbed-cli, pyocd, gcc for ARM, etc.).

However, if you run into problems with the installer getting errors like mbed-installer: No suitable virtualenv. or mbed-installer: Unable to bootstrap virtualenv, try installing virtualenv by hand (some distributions use a tailored version of this module):

sudo apt install python-virtualenv

Install

To install this package from the package repository:

apm install mbed-integration

To install from git:

cd $HOME/.atom/packages
git clone https://github.com/wendlers/atom-mbed-integration mbed-integration
cd mbed-integration
apm install

Usage

When installing this package, it will first install the above listed Atom package dependencies. Next, if your system supports it, the mbed toolchain will be installed (if not, see the section about installing the toolchain by hand). After this steps, the mbed-integration toolbar should be shown on the top of your editor. By clicking on the rocket symbol, the project creation dialog will be shown.

E.g. to create a new mbed project for the Nordic NRF52 DK, use the following settings:

screenshot

To create a project for the BBC:microbit:

screenshot

Or the ReadBaerLabs BLNANO2:

screenshot

For more details on how to setup and use the components for mebd development see:

Installing the Mbed Toolchain by Hand

If your system does not support automatic installation of the mbed toolchain (e.g. because you are using a Mac), you could install the toolchain by hand. After all, only the following things are relevant to to make it work with Atom:

  1. mbed / mbed-cli binaries need to be in the PATH
  1. pyocd-flashtool binary needs to be in the PATH
  1. arm-none-eabi-* binaries need to be in the PATH
  1. disable toolchain check in mbed-integration package