Native Installation (Win)

Mynewt relies on two command line utilities (newt and newtmgr), both of which are described elsewhere in this learning guide, as well as the presence of an ARM cross-compiling toolchain (arm-none-eabi-gcc, etc.).

Both of these need to be installed and available on your system to work with Mynewt projects.

NOTE: The official Mynewt documention for setting devices up on Windows is available here: https://mynewt.apache.org/latest/newt/install/newt_windows/

Cut auto-reset trace

Windows serial has a somewhat annoying thing it does where it toggles the DTR/RTS lines when you open a serial port. This will make debugging impossible since you keep resetting the board. Before you continue you must cut the trace-jumper on the bottom of the board:

Setup Go Path

$ cd $HOME
$ mkdir -p dev/go  
$ cd dev/go
$ export GOPATH=`pwd`

Add the following export statements to your ~/.bash_profile file and source the file:

export GOPATH=$HOME/dev/go
export PATH=$GOPATH/bin:$PATH

Download the newt package source and install the tool:

$cd $GOPATH
$go get mynewt.apache.org/newt/newt
$cd $GOPATH/src/mynewt.apache.org/newt
$ls 
DISCLAIMER      RELEASE_NOTES.md    util
INSTALLING.md       build.sh        viper
LICENSE         newt            yaml
NOTICE          newtmgr
README.md       newtvm

Check that the newt tool is installed and it is in your path:

$ls $GOPATH/bin/newt
~/dev/go/bin/newt
$which newt
~/dev/go/bin/newt
$ newt version
Apache Newt (incubating) version: 1.0.0-dev (this version # may be different)

Install newtmgr Binaries

Binary versions of the command-line tools are available from Apache. You can follow their installation guide here.

Download the latest binaries from
https://raw.githubusercontent.com/runtimeco/binary-releases/master/mynewt-newt-tools_1.1.0/newtmgr_1_1_0_windows_amd64.tar.gz

Uncompess and put it into your $GOPATH - ~/dev/go

You can test it by running newtmgr from the shell

ARM Cross-Compiler

You will also need an cross-compiling toolchain for the ARM architecture, specifically GCC 4.9, since newt will call arm-none-eabi-gcc from the command line.

For details on installing this see the official Mynewt documentation here: https://mynewt.apache.org/latest/os/get_started/cross_tools/

NOTE: arm-none-eabi-gcc also needs to be available in the system PATH variable to work with newt!
Last updated on 2017-08-18 at 03.50.57 PM Published on 2017-08-18 at 03.37.04 PM