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.
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:
Install newt & newtmgr Binaries
The official Mynewt documention for setting devices up on Windows is available here newt & newtmgr.
- Firstly you need to install MSYS2/MinGW and Git, Our guide on Mingw and git installation may be useful!
- Add a new user variable named
MSYS2_PATH_TYPEand set the value toinheritin your Windows environment. This enables the MSYS2 and MinGW bash to inherit your Windows user Path values. - Add the MinGW bin path to your Windows Path. For example: if you install MSYS2/MinGW in the C:\msys64 directory, add
C:\msys64\usr\binto your Windows Path. Note: If you are using Windows 10 WSL, ensure that you use the C:\msys64\usr\bin\base.exe and not the Windows 10 WSL bash. - Download the latest newt & newtmgr binaries from http://www.apache.org/dyn/closer.lua/mynewt/ (click on suggested hosting mirrors), currently the latest version is apache-mynewt-1.5.0. You should now have both
apache-mynewt-newt-bin-windows-1.5.0.tgzandapache-mynewt-newtmgr-bin-windows-1.5.0.tgzon your PC. - Extract them and copy
newt.exeandnewtmgr.exeto yourC:\msys64\usr\binand you are good to
You can test it by running newt and newtmgr from the shell
$ newt version Apache Newt version: 1.5.0 $ newtmgr version Apache Newtmgr 1.5.0
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/get_started/native_install/cross_tools.html
Page last edited March 08, 2024
Text editor powered by tinymce.