Coder Social home page Coder Social logo

docker-mbed-cli's Introduction

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-mbed-cli's People

Contributors

macrat avatar

Watchers

 avatar  avatar  avatar

docker-mbed-cli's Issues

Change command execution UID

mbed-cli command in a container are execute with root UID.
it's no secure because will have to use root in the host too.

make user(UID=1000) in the Dockerfile and use it for execute mbed-cli. maybe can enhance security with that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.