Public | Automated Build

Last pushed: a year ago
Short Description
A local compiler for mbed(micro-computer) on the docker.
Full Description

mbed-cli on the docker

installation

$ docker pull macrat/docker-mbed-cli

usage

make mbed project

$ docker run --rm -v `pwd`:/src macrat/docker-mbed-cli new project-name
$ cd project-name
$ ls

develop

$ cat main.cpp
#include <mbed.h>

int main() {
    DigitalOut led(LED_GREEN);

    while(true){
        led = !led;
        delay(100);
    }
}

compile

    $ docker run --rm -v `pwd`:/src macrat/docker-mbed-cli compile -m BOARD_NAME

Please replace BOARD_NAME with your board model name.

Compiled file will create into BUILD/{BOARD_NAME}/GCC_ARM/.

helper command

The helper command is command for use docker-mbed-cli like a local command.

installation

$ git clone github.com:macrat/docker-mbed-cli.git
$ cd docker-mbed-cli/bin/
$ cp * /usr/local/bin/

usage

You can use all subcommand of mbed-cli.

Make project.

$ mkdir PROJECT_NAME
$ cd PROJECT_NAME
$ mbed new .

Write program, and compile.

$ mbed compile -m TARGET_NAME

manage container

The helper command will start container, and reuse it.
It won't stopping container without your command.
If you want stop container, can you it by mbed-container command.

Command will make container for each project directory.
Please be careful if you make multiple projects.

$ mbed-container status
not found

$ mbed-container start
$ mbed-container status
running

$ mbed-container stop
$ mbed-container status
not found
Docker Pull Command
Owner
macrat
Source Repository

Comments (0)