http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/6e0ec54d/latest/mkdocs/search_index.json ---------------------------------------------------------------------- diff --git a/latest/mkdocs/search_index.json b/latest/mkdocs/search_index.json index 7090d01..9bc34be 100644 --- a/latest/mkdocs/search_index.json +++ b/latest/mkdocs/search_index.json @@ -107,7 +107,7 @@ }, { "location": "/os/introduction/", - "text": "Introduction\n\n\nWelcome to Apache Mynewt\n\n\nApache Mynewt is an operating system that makes it easy to develop\napplications for microcontroller environments where power and cost\nare driving factors. Examples of these devices are connected locks,\nlights, and wearables.\n\n\nMicrocontroller environments have a number of characteristics that\nmakes the operating system requirements for them unique:\n\n\n\n\n\n\nLow memory footprint: memory on these systems range from\n8-16KB (on the low end) to 16MB (on the high end).\n\n\n\n\n\n\nReduced code size: code often runs out of flash, and total available code size ranges from 64-128KB to 16-32MB.\n\n\n\n\n\n\nLow processing speed: processor speeds vary from 10-12MHz to 160-200MHz. \n\n\n\n\n\n\nLow power operation: devices operate in mostly sleeping mode, in order to conserve\nbattery power and maximize power usage.\n\n\n\n\n\n\nAs more and more devices get connected, these interconnected devices perform complex tasks. To\nperform these tasks, you need low-level operational functionality built into the operating system.\nTypically, connected devices built with these microcontrollers perform a myriad of functions:\n\n\n\n\n\n\nNetworking Stacks: Bluetooth Low Energy and Thread\n\n\n\n\n\n\nPeripherals: PWM to drive motors, ADCs to measure sensor data, and RTCs\nto keep time.\n\n\n\n\n\n\nScheduled Processing: actions must happen on a calendared or periodic basis.\n\n\n\n\n\n\nApache Mynewt accomplishes all the above easily, by providing a complete\noperating system for constrained devices, including:\n\n\n\n\n\n\nA fully open-source Bluetooth Low Energy stack with both Host and\nController implementations.\n\n\n\n\n\n\nA pre-emptive, multi-tasking Real Time operating system kernel\n\n\n\n\n\n\nA Hardware Abstraction Layer (HAL) that abstracts the MCU's\nperipheral functions, allowing developers to easily write cross-platform\ncode.\n\n\n\n\n\n\n\n\nNewt\n\n\nIn order to provide all this func tionality, and operate in an\nextremely low resource environment, Mynewt provides a very fine-grained source\npackage management and build system tool, called \nnewt\n.\n\n\nYou can install \nnewt\n for \nMac OS\n or \nLinux\n.\n\n\n\n\nNewt Manager\n\n\nIn order to enable a user to communicate with remote instances of Mynewt OS and query, configure, and operate them, Mynewt provides an application tool called Newt Manager or \nnewtmgr\n.\n\n\nYou can install \nnewtmgr\n for \nMac OS\n or \nLinux\n.\n\n\n\n\nBuild your first Mynewt App with Newt\n\n\nWith the introductions out of the way, now is a good time to \nget set up and\nstarted\n with your first Mynewt application.\n\n\nHappy Hacking!", + "text": "Introduction\n\n\nWelcome to Apache Mynewt\n\n\nApache Mynewt is an operating system that makes it easy to develop\napplications for microcontroller environments where power and cost\nare driving factors. Examples of these devices are connected locks,\nlights, and wearables.\n\n\nMicrocontroller environments have a number of characteristics that\nmakes the operating system requirements for them unique:\n\n\n\n\n\n\nLow memory footprint: memory on these systems range from\n8-16KB (on the low end) to 16MB (on the high end).\n\n\n\n\n\n\nReduced code size: code often runs out of flash, and total available code size ranges from 64-128KB to 16-32MB.\n\n\n\n\n\n\nLow processing speed: processor speeds vary from 10-12MHz to 160-200MHz. \n\n\n\n\n\n\nLow power operation: devices operate in mostly sleeping mode, in order to conserve\nbattery power and maximize power usage.\n\n\n\n\n\n\nAs more and more devices get connected, these interconnected devices perform complex tasks. To\nperform these tasks, you need low-level operational functionality built into the operating system.\nTypically, connected devices built with these microcontrollers perform a myriad of functions:\n\n\n\n\n\n\nNetworking Stacks: Bluetooth Low Energy and Thread\n\n\n\n\n\n\nPeripherals: PWM to drive motors, ADCs to measure sensor data, and RTCs\nto keep time.\n\n\n\n\n\n\nScheduled Processing: actions must happen on a calendared or periodic basis.\n\n\n\n\n\n\nApache Mynewt accomplishes all the above easily, by providing a complete\noperating system for constrained devices, including:\n\n\n\n\n\n\nA fully open-source Bluetooth Low Energy stack with both Host and\nController implementations.\n\n\n\n\n\n\nA pre-emptive, multi-tasking Real Time operating system kernel\n\n\n\n\n\n\nA Hardware Abstraction Layer (HAL) that abstracts the MCU's\nperipheral functions, allowing developers to easily write cross-platform\ncode.\n\n\n\n\n\n\n\n\nNewt\n\n\nIn order to provide all this func tionality, and operate in an\nextremely low resource environment, Mynewt provides a very fine-grained source\npackage management and build system tool, called \nnewt\n.\n\n\nYou can install \nnewt\n for \nMac OS\n, \nLinux\n, or \nWindows\n.\n\n\n\n\nNewt Manager\n\n\nIn order to enable a user to communicate with remote instances of Mynewt OS and query, configure, and operate them, Mynewt provides an application tool called Newt Manager or \nnewtmgr\n.\n\n\nYou can install \nnewtmgr\n for \nMac OS\n, \nLinux\n, or \nWindows\n.\n\n\n\n\nBuild your first Mynewt App with Newt\n\n\nWith the introductions out of the way, now is a good time to \nget set up and\nstarted\n with your first Mynewt application.\n\n\nHappy Hacking!", "title": "toc" }, { @@ -122,12 +122,12 @@ }, { "location": "/os/introduction/#newt", - "text": "In order to provide all this functionality, and operate in an\nextremely low resource environment, Mynewt provides a very fine-grained source\npackage management and build system tool, called newt . You can install newt for Mac OS or Linux .", + "text": "In order to provide all this functionality, and operate in an\nextremely low resource environment, Mynewt provides a very fine-grained source\npackage management and build system tool, called newt . You can install newt for Mac OS , Linux , or Windows .", "title": "Newt" }, { "location": "/os/introduction/#newt-manager", - "text": "In order to enable a user to communicate with remote instances of Mynewt OS and query, configure, and operate them, Mynewt provides an application tool called Newt Manager or newtmgr . You can install newtmgr for Mac OS or Linux .", + "text": "In order to enable a user to communicate with remote instances of Mynewt OS and query, configure, and operate them, Mynewt provides an application tool called Newt Manager or newtmgr . You can install newtmgr for Mac OS , Linux , or Windows .", "title": "Newt Manager" }, { @@ -137,22 +137,22 @@ }, { "location": "/os/get_started/get_started/", - "text": "Quick Start\n\n\nIf you are curious about Mynewt and want to get a quick feel for the project, you've come to the right place. We have two options for you:\n\n\n\n\nOption 1 (Recommended)\n allows you to install the Newt tool, instances of the Mynewt OS (for simulated targets), and toolchains for developing embedded software (e.g. GNU toolchain) natively on your laptop or computer. We have tried to make the process easy. For example, for the Mac OS we created brew formulas. \n\n\nWe recommend this option if you are familiar with such environments or are concerned about performance on your machine. Follow the instructions to \ninstall native tools\n and \ninstall cross tools for ARM\n if you prefer this option.\n\n\n\n\nOption 2\n is an easy, self-contained way to get up and running with Mynewt - but has limitations! The Newt tool and build toolchains are all available in a single \nAll-in-one Docker Container\n that you can install on your laptop or computer.\n\ n\nHowever, this is not a long-term option since support is not likely for all features useful or critical to embedded systems development. For example, USB device mapping available in the Docker toolkit is no longer available in the new Docker releases. The Docker option is also typically slower than the native install option. \n\n\n\n\nYou can then proceed with the instructions on how to \n* \nCreate Your First Project\n - on simulated hardware.\n\n\nUpon successful start, several tutorials await your eager attention!\n\n\n\n\nSend us an email on the dev@ mailing list if you have comments or suggestions!\n If you haven't joined the mailing list, you will find the links \nhere\n.", + "text": "Quick Start\n\n\nIf you are curious about Mynewt and want to get a quick feel for the project, you've come to the right place. We have two options for you:\n\n\n\n\nOption 1 (Recommended)\n allows you to install the Newt tool, instances of the Mynewt OS (for simulated targets), and toolchains for developing embedded software (e.g. GNU toolchain) natively on your laptop or computer. We have tried to make the process easy. For example, for the Mac OS we created brew formulas. \n\n\nWe recommend this option if you are familiar with such environments or are concerned about performance on your machine. Follow the instructions in the \nNative Install Option\n if you prefer this option.\n\n\n\n\nOption 2\n is an easy, self-contained way to get up and running with Mynewt - but has limitations! The Newt tool and build toolchains are all available in a single \nAll-in-one Docker Container\n that you can install on your laptop or computer.\n\n\nHowever, this is not a long- term option since support is not likely for all features useful or critical to embedded systems development. For example, USB device mapping available in the Docker toolkit is no longer available in the new Docker releases. The Docker option is also typically slower than the native install option. \n\n\n\n\nYou can then proceed with the instructions on how to \n* \nCreate Your First Project\n - on simulated hardware.\n\n\nUpon successful start, several tutorials await your eager attention!\n\n\n\n\nSend us an email on the dev@ mailing list if you have comments or suggestions!\n If you haven't joined the mailing list, you will find the links \nhere\n.", "title": "toc" }, { "location": "/os/get_started/get_started/#quick-start", - "text": "If you are curious about Mynewt and want to get a quick feel for the project, you've come to the right place. We have two options for you: Option 1 (Recommended) allows you to install the Newt tool, instances of the Mynewt OS (for simulated targets), and toolchains for developing embedded software (e.g. GNU toolchain) natively on your laptop or computer. We have tried to make the process easy. For example, for the Mac OS we created brew formulas. We recommend this option if you are familiar with such environments or are concerned about performance on your machine. Follow the instructions to install native tools and install cross tools for ARM if you prefer this option. Option 2 is an easy, self-contained way to get up and running with Mynewt - but has limitations! The Newt tool and build toolchains are all available in a single All-in-one Docker Container that you can install on your laptop or computer. However, this is not a long-term option sinc e support is not likely for all features useful or critical to embedded systems development. For example, USB device mapping available in the Docker toolkit is no longer available in the new Docker releases. The Docker option is also typically slower than the native install option. You can then proceed with the instructions on how to \n* Create Your First Project - on simulated hardware. Upon successful start, several tutorials await your eager attention! Send us an email on the dev@ mailing list if you have comments or suggestions! If you haven't joined the mailing list, you will find the links here .", + "text": "If you are curious about Mynewt and want to get a quick feel for the project, you've come to the right place. We have two options for you: Option 1 (Recommended) allows you to install the Newt tool, instances of the Mynewt OS (for simulated targets), and toolchains for developing embedded software (e.g. GNU toolchain) natively on your laptop or computer. We have tried to make the process easy. For example, for the Mac OS we created brew formulas. We recommend this option if you are familiar with such environments or are concerned about performance on your machine. Follow the instructions in the Native Install Option if you prefer this option. Option 2 is an easy, self-contained way to get up and running with Mynewt - but has limitations! The Newt tool and build toolchains are all available in a single All-in-one Docker Container that you can install on your laptop or computer. However, this is not a long-term option since support is not likely for a ll features useful or critical to embedded systems development. For example, USB device mapping available in the Docker toolkit is no longer available in the new Docker releases. The Docker option is also typically slower than the native install option. You can then proceed with the instructions on how to \n* Create Your First Project - on simulated hardware. Upon successful start, several tutorials await your eager attention! Send us an email on the dev@ mailing list if you have comments or suggestions! If you haven't joined the mailing list, you will find the links here .", "title": "Quick Start" }, { "location": "/os/get_started/native_install_intro/", - "text": "Native Installation\n\n\nThis section shows you how to install tools on Mac OS and Linux platforms to develop, build, run, and debug Mynewt OS applications. You can build Mynewt OS applications to run as a native application on your computer or to run on your target board. These tools include:\n\n\n\n\n\n\nNewt tool - Tool to create, build, load, and debug a mynewt target.\n\n\n\n\nSee \nInstalling the Newt Tool on Mac OS\n to install on Mac OS.\n\n\nSee \nInstalling the Newt Tool on Linux\n to install on Linux.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nNative toolchain - Native toolchain to build and run Mynewt OS as a native application on your computer.\n (See \nInstalling Native Toolchain\n). \n\n\n\n\n\n\nCross toolchain for ARM - Cross toolchain for ARM to build and run a Mynewt OS application on a target board\n (See \nInstalling Cross Tools for ARMs\n).", + "text": "Native Installation\n\n\nThis section shows you how to install the tools to develop and build Mynewt OS applications on Mac OS, Linux, and Windows, and run and debug the applications on target boards. For Mac OS and Linux, you can also build Mynewt OS applications that run on Mynewt's simulated hardware. These applications run natively on Mac OS and Linux. \n\n\nThe tools you need are:\n\n\n\n\n\n\nNewt tool: Tool to create, build, load, and debug Mynewt OS applications.\n\n\n\n\nSee \nInstalling the Newt Tool on Mac OS\n to install on Mac OS.\n\n\nSee \nInstalling the Newt Tool on Linux\n to install on Linux.\n\n\nSee \nInstalling the Newt Tool on Windows\n to install on Windows. \n\n\n\n\n\n\n\n\nNative toolchain: Native toolchain to compile and build Mynewt OS applications that run on Mynewt's simulated hardware on Mac OS and Linux. \n\n\n(See \nInstalling Native Toolchain\n). \n\n\n\n\n\n\nCross tools for ARM: \n\n\n\n\nCross toolchain for ARM to comp ile and build Mynewt OS applications for target boards.\n\n\nDebuggers to load and debug applications on target boards. \n\n\n\n\n(See \nInstalling Cross Tools for ARMs\n).", "title": "toc" }, { "location": "/os/get_started/native_install_intro/#native-installation", - "text": "This section shows you how to install tools on Mac OS and Linux platforms to develop, build, run, and debug Mynewt OS applications. You can build Mynewt OS applications to run as a native application on your computer or to run on your target board. These tools include: Newt tool - Tool to create, build, load, and debug a mynewt target. See Installing the Newt Tool on Mac OS to install on Mac OS. See Installing the Newt Tool on Linux to install on Linux. Native toolchain - Native toolchain to build and run Mynewt OS as a native application on your computer.\n (See Installing Native Toolchain ). Cross toolchain for ARM - Cross toolchain for ARM to build and run a Mynewt OS application on a target board\n (See Installing Cross Tools for ARMs ).", + "text": "This section shows you how to install the tools to develop and build Mynewt OS applications on Mac OS, Linux, and Windows, and run and debug the applications on target boards. For Mac OS and Linux, you can also build Mynewt OS applications that run on Mynewt's simulated hardware. These applications run natively on Mac OS and Linux. The tools you need are: Newt tool: Tool to create, build, load, and debug Mynewt OS applications. See Installing the Newt Tool on Mac OS to install on Mac OS. See Installing the Newt Tool on Linux to install on Linux. See Installing the Newt Tool on Windows to install on Windows. Native toolchain: Native toolchain to compile and build Mynewt OS applications that run on Mynewt's simulated hardware on Mac OS and Linux. (See Installing Native Toolchain ). Cross tools for ARM: Cross toolchain for ARM to compile and build Mynewt OS applications for target boards. Debuggers to load and debug application s on target boards. (See Installing Cross Tools for ARMs ).", "title": "Native Installation" }, { @@ -187,22 +187,22 @@ }, { "location": "/newt/install/newt_linux/", - "text": "Installing Newt on Linux\n\n\nYou can install the latest stable release (1.0.0) of the newt tool from a Debian binary package (amd64) or from a Debian source package. This page shows you how to:\n\n\n\n\nSet up your computer to retrieve Debian packages from the runtimeco debian package repository.\n\n\nInstall the latest stable release version of newt from a Debian binary package. \n\n\nInstall the latest stable release version of newt from a Debian source package.\n\n\n\n\nIf you are installing on an amd64 platform, we recommend that you install from the binary package.\n\n\nNote:\n See \nSetting Up an Go Environment to Contribute to Newt and Newtmgr Tools\n if you want to: \n\n\n\n\nUse the newt tool with the latest updates from the master branch. The master branch may be unstable and we recommend that you use the latest stable release version.\n\n\nContribute to the newt tool. \n\n\n\n\n\n\nSetting Up Your Computer to Get Packages from runtimeco\n\n\nThe new t Debian packages are stored in a private repository on \nhttps://github/runtimeco/debian-mynewt\n. The following steps must be performed on your computer to retreive packages from the repository:\n\n\nNote:\n You only need to perform this setup once on your computer.\n\n\n\n\nInstall the \napt-transport-https\n package to use HTTPS to retrieve packages. \n\n\nDownload the public key for the runtimeco debian repository and import the key into the apt keychain.\n\n\nAdd the repository for the binary and source packages to the apt source list.\n\n\n\n\n\nInstall the apt-transport-https package:\n\n\n$sudo apt-get update\n$sudo apt-get install apt-transport-https\n\n\n\n\n\n\n\nDownload the public key for the runtimeco apt repo (\nNote:\n There is a \n-\n after \napt-key add\n):\n\n\nwget -qO - https://raw.githubusercontent.com/runtimeco/debian-mynewt/master/mynewt.gpg.key | sudo apt-key add -\n\n\n\n\n\n\n\nAdd the repository for the binary and source packages to the \nmynewt.list\ n apt source list file.\n\n\n$sudo -s\n[sudo] password for \nuser\n:\nroot$ cat \n /etc/apt/sources.list.d/mynewt.list \nEOF\ndeb https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest main\ndeb-src https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest main\nEOF\nroot$exit\n\n\n\n\n\nNote:\n Do not forget to exit the root shell.\n\n\n\nVerify the content of the source list file:\n\n\n$more /etc/apt/sources.list.d/mynewt.list\ndeb https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest main\ndeb-src https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest main\n\n\n\n\n\n \n\n\nInstalling the Latest Release of Newt from a Binary Package\n\n\nFor Linux amd64 platforms, you can install the latest stable version (1.0.0) of newt from the newt Debian binary package:\n\n\n$sudo apt-get update\n$sudo apt-get install newt\nReading package lists... Done\nBuilding dependency tree \nReading state information... Done\n\n ...\n\nPreparing to unpack .../newt_1.0.0-1_amd64.deb ...\nUnpacking newt (1.0.0-1) ...\nSetting up newt (1.0.0-1) ...\n\n\n\n\n\n\nSee \nChecking the Installed Version of Newt\n to verify that you are using the installed version of newt.\n\n\n\n\nInstalling the Latest Stable Release of Newt from a Source Package\n\n\nIf you are running Linux on a different architecture, you can install the Debian source package for the latest stable release (1.0.0) of newt. The installation of the source package builds the newt binary and creates a Debian binary package that you then install.\n\n\nNote\n: Newt version 1.0.0 has been tested on Linux amd64 platforms. Version 1.0.0 does not build on 32 bit platforms but have been fixed for the next release.\n\n\n\n\nInstalling Go 1.7\n\n\nYou need Go version 1.7 or higher to build Newt version 1.0.0. Currently, the latest Go version that Ubuntu installs is 1.6. Run \ngo version\n to check if you have Go 1.7 installed. \n\n\n\n\nInstall Go version 1.7:\n\n\n$sudo apt-get install golang-1.7-go\nReading package lists... Done\n ...\nUnpacking golang-1.7-go (1.7.1-2ubuntu1) ...\nSetting up golang-1.7-go (1.7.1-2ubuntu1) ...\n$\n$sudo ln -sf ../lib/go-1.7/bin/go /usr/bin/go\n$go version\ngo version go1.7.1 linux/amd64\n\n\n\n\n\nYou can also download version 1.7 from \nhttps://golang.org/dl/\n. \n\n\n\n\nInstalling from the Source Package\n\n\nCreate a directory and change into the directory, download the source package, and build a binary package from the source package:\n\n\nmkdir newt_source\n$cd newt_source\n$sudo apt-get --build source newt\n[sudo] password for \nuser\n: \nReading package lists... Done\nNeed to get 1,866 kB of source archives.\nGet:1 https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest/main newt 1.0.0-1 (dsc) [795 B]\nGet:2 https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest/main newt 1.0.0-1 (tar) [1,864 kB]\nGet:3 https://raw.githubusercontent.com/runtimeco/debian- mynewt/master latest/main newt 1.0.0-1 (diff) [2,000 B]\nFetched 1,866 kB in 1s (1,222 kB/s)\ndpkg-source: warning: extracting unsigned source package (newt_1.0.0-1.dsc)\ndpkg-source: info: extracting newt in newt-1.0.0\ndpkg-source: info: unpacking newt_1.0.0.orig.tar.gz\ndpkg-source: info: unpacking newt_1.0.0-1.debian.tar.xz\n\n ...\n\ndpkg-deb: building package \nnewt\n in \n../newt_1.0.0-1_amd64.deb\n.\n dpkg-genchanges --build=any,all \n../newt_1.0.0-1_amd64.changes\ndpkg-genchanges: info: binary-only upload (no source code included)\n dpkg-source --after-build newt-1.0.0\ndpkg-buildpackage: info: binary-only upload (no source included)\nW: Can\nt drop privileges for downloading as file \nnewt_1.0.0-1.dsc\n couldn\nt be accessed by user \n_apt\n. - pkgAcquire::Run (13: Permission denied)\n\n\n\n\n\nNote:\n You can ignore the \"Permission denied\" warning message at the end of the command.\n\n\n\nInstall the newt binary package that is created from the source package: \n\n\nNote:\n The file name for the binary package has the format: newt_1.0.0-1_\narch\n.deb, where \narch\n is a value that identifies your host architecture. \n\n\n$sudo dpkg -i newt_1.0.0-1_amd64.deb \nSelecting previously unselected package newt.\n(Reading database ... 252969 files and directories currently installed.)\nPreparing to unpack newt_1.0.0-1_amd64.deb ...\nUnpacking newt (1.0.0-1) ...\nSetting up newt (1.0.0-1) ...\n\n\n\n\n\n\n\n Checking the Installed Version of Newt\n\n\nAfter you have installed newt from either a Debian binary or source package, check that you are using the installed version of newt from \n/usr/bin\n. \n\n\nCheck the modification time of the binary and the newt tool that you are using:\n\n\n$ls -l /usr/bin/newt\n-rwxr-xr-x 1 root root 6919280 Apr 22 10:09 /usr/bin/newt\n$which newt\n/usr/bin/newt\n$newt version\nApache Newt (incubating) version: 1.0.0\n\n\n\n\n\nNote:\n If you previously built newt from source and the output of \nwhich newt\n sh ows \"$GOPATH/bin/newt\", you will need to move \"$GOPATH/bin\" after \"/usr/bin\" for your PATH environment variable and export it. \n\n\n\nGet information about newt:\n\n\n$newt\nNewt allows you to create your own embedded application based on the Mynewt\noperating system. Newt provides both build and package management in a single\ntool, which allows you to compose an embedded application, and set of\nprojects, and then build the necessary artifacts from those projects. For more\ninformation on the Mynewt operating system, please visit\nhttps://mynewt.apache.org/.\n\nPlease use the newt help command, and specify the name of the command you want\nhelp for, for help on how to use a specific command\n\nUsage:\n newt [flags]\n newt [command]\n\nExamples:\n newt\n newt help [\ncommand-name\n]\n For help on \ncommand-name\n. If not specified, print this message.\n\nAvailable Commands:\n build Build one or more targets\n clean Delete build artifacts for one or mo re targets\n create-image Add image header to target binary\n debug Open debugger session to target\n info Show project info\n install Install project dependencies\n load Load built target to board\n mfg Manufacturing flash image commands\n new Create a new project\n pkg Create and manage packages in the current workspace\n run build/create-image/download/debug \ntarget\n\n size Size of target components\n sync Synchronize project dependencies\n target Commands to create, delete, configure, and query targets\n test Executes unit tests for one or more packages\n upgrade Upgrade project dependencies\n vals Display valid values for the specified element type(s)\n version Display the Newt version number\n\nFlags:\n -h, --help Help for newt commands\n -j, --jobs int Number of concurrent build jobs (default 8)\n -l, --loglevel string Lo g level (default \nWARN\n)\n -o, --outfile string Filename to tee output to\n -q, --quiet Be quiet; only display error output\n -s, --silent Be silent; don\nt output anything\n -v, --verbose Enable verbose output when executing commands\n\nUse \nnewt [command] --help\n for more information about a command.", + "text": "Installing Newt on Linux\n\n\nYou can install the latest stable release (1.0.0) of the newt tool from a Debian binary package (amd64) or from a Debian source package. This page shows you how to:\n\n\n\n\nSet up your computer to retrieve Debian packages from the runtimeco debian package repository.\n\n\nInstall the latest stable release version of newt from a Debian binary package. \n\n\nInstall the latest stable release version of newt from a Debian source package.\n\n\n\n\nIf you are installing on an amd64 platform, we recommend that you install from the binary package.\n\n\nNote:\n We have tested the newt tool binary and apt-get install from the runtimeco Debian package repository for Ubuntu version 16. Earlier Ubuntu versions (for example: Ubuntu 14) may have incompatibility with the repository. We recommend that you upgrade Ubuntu on your computer. \n\n\nNote:\n See \nSetting Up an Go Environment to Contribute to Newt and Newtmgr Tools\n if you want to: \ n\n\n\n\nUse the newt tool with the latest updates from the master branch. The master branch may be unstable and we recommend that you use the latest stable release version.\n\n\nContribute to the newt tool. \n\n\n\n\n\n\nSetting Up Your Computer to Get Packages from runtimeco\n\n\nThe newt Debian packages are stored in a private repository on \nhttps://github/runtimeco/debian-mynewt\n. The following steps must be performed on your computer to retreive packages from the repository:\n\n\nNote:\n You only need to perform this setup once on your computer.\n\n\n\n\nInstall the \napt-transport-https\n package to use HTTPS to retrieve packages. \n\n\nDownload the public key for the runtimeco debian repository and import the key into the apt keychain.\n\n\nAdd the repository for the binary and source packages to the apt source list.\n\n\n\n\n\nInstall the apt-transport-https package:\n\n\n$sudo apt-get update\n$sudo apt-get install apt-transport-https\n\n\n\n\n\n\n\nDownload the public ke y for the runtimeco apt repo (\nNote:\n There is a \n-\n after \napt-key add\n):\n\n\nwget -qO - https://raw.githubusercontent.com/runtimeco/debian-mynewt/master/mynewt.gpg.key | sudo apt-key add -\n\n\n\n\n\n\n\nAdd the repository for the binary and source packages to the \nmynewt.list\n apt source list file.\n\n\n$sudo -s\n[sudo] password for \nuser\n:\nroot$ cat \n /etc/apt/sources.list.d/mynewt.list \nEOF\ndeb https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest main\ndeb-src https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest main\nEOF\nroot$exit\n\n\n\n\n\nNote:\n Do not forget to exit the root shell.\n\n\n\nVerify the content of the source list file:\n\n\n$more /etc/apt/sources.list.d/mynewt.list\ndeb https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest main\ndeb-src https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest main\n\n\n\n\n\n\nUpdate the available packages: \n\n\n$sudo apt-get update\n\n\ n\n\n\n\n\nNote:\n If you are not using Ubuntu version 16, you may see the following errors. We recommend that you upgrade Ubuntu. We have provided instructions on how to manually download and install the binary package if you choose not to upgrade, but you will want to upgrade Ubuntu if you are installing from source.\n\n\nW: Failed to fetch https://raw.githubusercontent.com/runtimeco/debian-mynewt/master/dists/latest/main/source/Sources HttpError404\n\nW: Failed to fetch https://raw.githubusercontent.com/runtimeco/debian-mynewt/master/dists/latest/main/binary-amd64/Packages Bad header line\n\nW: Failed to fetch https://raw.githubusercontent.com/runtimeco/debian-mynewt/master/dists/latest/main/binary-i386/Packages HttpError404\n\nE: Some index files failed to download. They have been ignored, or old ones used instead.\n\n\n\n\n\n\n\n \n\n\nInstalling the Latest Release of Newt from a Binary Package\n\n\nFor Linux amd64 platforms, you can install the latest stable version (1.0. 0) of newt from the newt Debian binary package. \n\n\n$sudo apt-get install newt\nReading package lists... Done\nBuilding dependency tree \nReading state information... Done\n\n ...\n\nPreparing to unpack .../newt_1.0.0-1_amd64.deb ...\nUnpacking newt (1.0.0-1) ...\nSetting up newt (1.0.0-1) ...\n\n\n\n\n\n\n\nNote:\nIf you are not using Ubuntu version 16 and are not able to update the runtimeco Debian package repo on your computer successfully, you can manually download and install the newt_1.0.0-1_amd64.deb binary package as follows:\n\n\n$wget https://raw.githubusercontent.com/runtimeco/debian-mynewt/master/pool/main/n/newt/newt_1.0.0-1_amd64.deb\n$sudo dpkg -i newt_1.0.0-1_amd64.deb\n\n\n\n\n\n\nSee \nChecking the Installed Version of Newt\n to verify that you are using the installed version of newt.\n\n\n\n\nInstalling the Latest Stable Release of Newt from a Source Package\n\n\nIf you are running Linux on a different architecture, you can install the Debian source p ackage for the latest stable release (1.0.0) of newt. The installation of the source package builds the newt binary and creates a Debian binary package that you then install.\n\n\nNote\n: Newt version 1.0.0 has been tested on Linux amd64 platforms. Version 1.0.0 does not build on 32 bit platforms but have been fixed for the next release.\n\n\n\n\nInstalling Go 1.7\n\n\nYou need Go version 1.7 or higher to build Newt version 1.0.0. Currently, the latest Go version that Ubuntu installs is 1.6. Run \ngo version\n to check if you have Go 1.7 installed. \n\n\n\n\nInstall Go version 1.7:\n\n\n$sudo apt-get install golang-1.7-go\nReading package lists... Done\n ...\nUnpacking golang-1.7-go (1.7.1-2ubuntu1) ...\nSetting up golang-1.7-go (1.7.1-2ubuntu1) ...\n$\n$sudo ln -sf ../lib/go-1.7/bin/go /usr/bin/go\n$go version\ngo version go1.7.1 linux/amd64\n\n\n\n\n\nYou can also download version 1.7 from \nhttps://golang.org/dl/\n. \n\n\n\n\nInstalling from the Source Package\n\n\nCreate a directory and change into the directory, download the source package, and build a binary package from the source package:\n\n\nmkdir newt_source\n$cd newt_source\n$sudo apt-get --build source newt\n[sudo] password for \nuser\n: \nReading package lists... Done\nNeed to get 1,866 kB of source archives.\nGet:1 https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest/main newt 1.0.0-1 (dsc) [795 B]\nGet:2 https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest/main newt 1.0.0-1 (tar) [1,864 kB]\nGet:3 https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest/main newt 1.0.0-1 (diff) [2,000 B]\nFetched 1,866 kB in 1s (1,222 kB/s)\ndpkg-source: warning: extracting unsigned source package (newt_1.0.0-1.dsc)\ndpkg-source: info: extracting newt in newt-1.0.0\ndpkg-source: info: unpacking newt_1.0.0.orig.tar.gz\ndpkg-source: info: unpacking newt_1.0.0-1.debian.tar.xz\n\n ...\n\ndpkg-deb: building package \nnewt\n in \n../newt_1.0.0-1_amd 64.deb\n.\n dpkg-genchanges --build=any,all \n../newt_1.0.0-1_amd64.changes\ndpkg-genchanges: info: binary-only upload (no source code included)\n dpkg-source --after-build newt-1.0.0\ndpkg-buildpackage: info: binary-only upload (no source included)\nW: Can\nt drop privileges for downloading as file \nnewt_1.0.0-1.dsc\n couldn\nt be accessed by user \n_apt\n. - pkgAcquire::Run (13: Permission denied)\n\n\n\n\n\nNote:\n You can ignore the \"Permission denied\" warning message at the end of the command.\n\n\n\nInstall the newt binary package that is created from the source package:\n\n\nNote:\n The file name for the binary package has the format: newt_1.0.0-1_\narch\n.deb, where \narch\n is a value that identifies your host architecture. \n\n\n$sudo dpkg -i newt_1.0.0-1_amd64.deb \nSelecting previously unselected package newt.\n(Reading database ... 252969 files and directories currently installed.)\nPreparing to unpack newt_1.0.0-1_amd64.deb ...\nUnpacking newt (1.0.0-1) ...\nSetti ng up newt (1.0.0-1) ...\n\n\n\n\n\n\n\n Checking the Installed Version of Newt\n\n\nAfter you have installed newt from either a Debian binary or source package, check that you are using the installed version of newt from \n/usr/bin\n. \n\n\nCheck the modification time of the binary and the newt tool that you are using:\n\n\n$ls -l /usr/bin/newt\n-rwxr-xr-x 1 root root 6919280 Apr 22 10:09 /usr/bin/newt\n$which newt\n/usr/bin/newt\n$newt version\nApache Newt (incubating) version: 1.0.0\n\n\n\n\n\nNote:\n If you previously built newt from source and the output of \nwhich newt\n shows \"$GOPATH/bin/newt\", you will need to move \"$GOPATH/bin\" after \"/usr/bin\" for your PATH environment variable and export it. \n\n\n\nGet information about newt:\n\n\n$newt\nNewt allows you to create your own embedded application based on the Mynewt\noperating system. Newt provides both build and package management in a single\ntool, which allows you to compose an embedded application, and set of\npro jects, and then build the necessary artifacts from those projects. For more\ninformation on the Mynewt operating system, please visit\nhttps://mynewt.apache.org/.\n\nPlease use the newt help command, and specify the name of the command you want\nhelp for, for help on how to use a specific command\n\nUsage:\n newt [flags]\n newt [command]\n\nExamples:\n newt\n newt help [\ncommand-name\n]\n For help on \ncommand-name\n. If not specified, print this message.\n\nAvailable Commands:\n build Build one or more targets\n clean Delete build artifacts for one or more targets\n create-image Add image header to target binary\n debug Open debugger session to target\n info Show project info\n install Install project dependencies\n load Load built target to board\n mfg Manufacturing flash image commands\n new Create a new project\n pkg Create and manage packages in the current workspace\n run build/cr eate-image/download/debug \ntarget\n\n size Size of target components\n sync Synchronize project dependencies\n target Commands to create, delete, configure, and query targets\n test Executes unit tests for one or more packages\n upgrade Upgrade project dependencies\n vals Display valid values for the specified element type(s)\n version Display the Newt version number\n\nFlags:\n -h, --help Help for newt commands\n -j, --jobs int Number of concurrent build jobs (default 8)\n -l, --loglevel string Log level (default \nWARN\n)\n -o, --outfile string Filename to tee output to\n -q, --quiet Be quiet; only display error output\n -s, --silent Be silent; don\nt output anything\n -v, --verbose Enable verbose output when executing commands\n\nUse \nnewt [command] --help\n for more information about a command.", "title": "Install Newt on Linux" }, { "location": "/newt/install/newt_linux/#installing-newt-on-linux", - "text": "You can install the latest stable release (1.0.0) of the newt tool from a Debian binary package (amd64) or from a Debian source package. This page shows you how to: Set up your computer to retrieve Debian packages from the runtimeco debian package repository. Install the latest stable release version of newt from a Debian binary package. Install the latest stable release version of newt from a Debian source package. If you are installing on an amd64 platform, we recommend that you install from the binary package. Note: See Setting Up an Go Environment to Contribute to Newt and Newtmgr Tools if you want to: Use the newt tool with the latest updates from the master branch. The master branch may be unstable and we recommend that you use the latest stable release version. Contribute to the newt tool.", + "text": "You can install the latest stable release (1.0.0) of the newt tool from a Debian binary package (amd64) or from a Debian source package. This page shows you how to: Set up your computer to retrieve Debian packages from the runtimeco debian package repository. Install the latest stable release version of newt from a Debian binary package. Install the latest stable release version of newt from a Debian source package. If you are installing on an amd64 platform, we recommend that you install from the binary package. Note: We have tested the newt tool binary and apt-get install from the runtimeco Debian package repository for Ubuntu version 16. Earlier Ubuntu versions (for example: Ubuntu 14) may have incompatibility with the repository. We recommend that you upgrade Ubuntu on your computer. Note: See Setting Up an Go Environment to Contribute to Newt and Newtmgr Tools if you want to: Use the newt tool with the latest updates from the master bran ch. The master branch may be unstable and we recommend that you use the latest stable release version. Contribute to the newt tool.", "title": "Installing Newt on Linux" }, { "location": "/newt/install/newt_linux/#setting-up-your-computer-to-get-packages-from-runtimeco", - "text": "The newt Debian packages are stored in a private repository on https://github/runtimeco/debian-mynewt . The following steps must be performed on your computer to retreive packages from the repository: Note: You only need to perform this setup once on your computer. Install the apt-transport-https package to use HTTPS to retrieve packages. Download the public key for the runtimeco debian repository and import the key into the apt keychain. Add the repository for the binary and source packages to the apt source list. \nInstall the apt-transport-https package: $sudo apt-get update\n$sudo apt-get install apt-transport-https Download the public key for the runtimeco apt repo ( Note: There is a - after apt-key add ): wget -qO - https://raw.githubusercontent.com/runtimeco/debian-mynewt/master/mynewt.gpg.key | sudo apt-key add - Add the repository for the binary and source packages to the mynewt.list apt source list file. $sudo -s\n[sudo] pas sword for user :\nroot$ cat /etc/apt/sources.list.d/mynewt.list EOF\ndeb https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest main\ndeb-src https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest main\nEOF\nroot$exit Note: Do not forget to exit the root shell. \nVerify the content of the source list file: $more /etc/apt/sources.list.d/mynewt.list\ndeb https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest main\ndeb-src https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest main", + "text": "The newt Debian packages are stored in a private repository on https://github/runtimeco/debian-mynewt . The following steps must be performed on your computer to retreive packages from the repository: Note: You only need to perform this setup once on your computer. Install the apt-transport-https package to use HTTPS to retrieve packages. Download the public key for the runtimeco debian repository and import the key into the apt keychain. Add the repository for the binary and source packages to the apt source list. \nInstall the apt-transport-https package: $sudo apt-get update\n$sudo apt-get install apt-transport-https Download the public key for the runtimeco apt repo ( Note: There is a - after apt-key add ): wget -qO - https://raw.githubusercontent.com/runtimeco/debian-mynewt/master/mynewt.gpg.key | sudo apt-key add - Add the repository for the binary and source packages to the mynewt.list apt source list file. $sudo -s\n[sudo] pas sword for user :\nroot$ cat /etc/apt/sources.list.d/mynewt.list EOF\ndeb https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest main\ndeb-src https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest main\nEOF\nroot$exit Note: Do not forget to exit the root shell. \nVerify the content of the source list file: $more /etc/apt/sources.list.d/mynewt.list\ndeb https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest main\ndeb-src https://raw.githubusercontent.com/runtimeco/debian-mynewt/master latest main \nUpdate the available packages: $sudo apt-get update Note: If you are not using Ubuntu version 16, you may see the following errors. We recommend that you upgrade Ubuntu. We have provided instructions on how to manually download and install the binary package if you choose not to upgrade, but you will want to upgrade Ubuntu if you are installing from source. W: Failed to fetch https://raw.githubusercontent.com/runtimeco/deb ian-mynewt/master/dists/latest/main/source/Sources HttpError404\n\nW: Failed to fetch https://raw.githubusercontent.com/runtimeco/debian-mynewt/master/dists/latest/main/binary-amd64/Packages Bad header line\n\nW: Failed to fetch https://raw.githubusercontent.com/runtimeco/debian-mynewt/master/dists/latest/main/binary-i386/Packages HttpError404\n\nE: Some index files failed to download. They have been ignored, or old ones used instead.", "title": "Setting Up Your Computer to Get Packages from runtimeco" }, { "location": "/newt/install/newt_linux/#installing-the-latest-release-of-newt-from-a-binary-package", - "text": "For Linux amd64 platforms, you can install the latest stable version (1.0.0) of newt from the newt Debian binary package: $sudo apt-get update\n$sudo apt-get install newt\nReading package lists... Done\nBuilding dependency tree \nReading state information... Done\n\n ...\n\nPreparing to unpack .../newt_1.0.0-1_amd64.deb ...\nUnpacking newt (1.0.0-1) ...\nSetting up newt (1.0.0-1) ... \nSee Checking the Installed Version of Newt to verify that you are using the installed version of newt.", + "text": "For Linux amd64 platforms, you can install the latest stable version (1.0.0) of newt from the newt Debian binary package. $sudo apt-get install newt\nReading package lists... Done\nBuilding dependency tree \nReading state information... Done\n\n ...\n\nPreparing to unpack .../newt_1.0.0-1_amd64.deb ...\nUnpacking newt (1.0.0-1) ...\nSetting up newt (1.0.0-1) ... Note: If you are not using Ubuntu version 16 and are not able to update the runtimeco Debian package repo on your computer successfully, you can manually download and install the newt_1.0.0-1_amd64.deb binary package as follows: $wget https://raw.githubusercontent.com/runtimeco/debian-mynewt/master/pool/main/n/newt/newt_1.0.0-1_amd64.deb\n$sudo dpkg -i newt_1.0.0-1_amd64.deb \nSee Checking the Installed Version of Newt to verify that you are using the installed version of newt.", "title": "Installing the Latest Release of Newt from a Binary Package" }, { @@ -221,39 +221,74 @@ "title": "Installing from the Source Package" }, { + "location": "/newt/install/newt_windows/", + "text": "Installing Newt on Windows\n\n\nYou can develop and build Mynewt OS applications for your target boards on the Windows platform. This page shows you how to build the newt tool from the lastest source on the master branch of the \nMynewt newt git repository\n. The tool is written in Go (golang).\n\n\nIn Windows, we use MinGW as the development environment to build and run Mynewt OS applications for target boards. MinGW runs the bash shell and provides a Unix-like environment. This provides a uniform way to build Mynewt OS applications. The Mynewt documentation and tutorials use Unix commands and you can use the same Unix commands on MinGW to follow the tutorials. The documentation will note any commands or behaviors that are specific to Windows.\n\n\nThis guide shows you how to perform the following:\n\n\n\n\nInstall MSYS2/MinGW. \n\n\nInstall Git.\n\n\nInstall Go. \n\n\nSetup the Go environment.\n\n\nDownload the source, build, and install the newt tool.\n\n\n \n\n\n\nStep 1: Installing MSYS2/MinGW\n\n\nMSYS2/MinGW provides a bash shell and tools to build applications that run on Windows. It includes three subsystems:\n\n\n\n\nMSYS2 toolchain to build POSIX applications that run on Windows. \n\n\nMinGW32 toolchains to build 32 bit native Windows applications. \n\n\nMinGW64 toolchains to build 64 bit native Windows applications. \n\n\n\n\nThe subsystems run the bash shell and provide a Unix-like environment. You can also run Windows applications from the shell. We will use the MinGW subsystem.\n\n\nTo install and setup MSYS2 and MinGW:\n\n\n\n\nDownload and run the \nMSYS2 installer\n. Select the 64 bit version if you are running on a 64 bit platform. Follow the prompts and check the \nRun MSYS2 now\n checkbox on the \nInstallation Complete\n dialog. \n\n\n\n\nIn the MSYS2 terminal, run the \npacman -Syuu\n command. If you get a message to run the update again, close the terminal and run the \npacman -Syuu\n command in a new terminal. \ n\n\nTo start a new MSYS2 terminal, select the \"MSYS2 MSYS\" application from the Windows start menu.\n\n\n\n\n\n\nAdd a new user variable named \nMSYS2_PATH_TYPE\n and set the value to \ninherit\n in your Windows environment. This enables the MSYS2 and MinGW bash to inherit your Windows user \nPath\n values. \n\n\nTo add the variable, select properties for your computer \n Advanced system settings \n Environment Variables \n New\n\n\n\n\n\n\nRun the \npacman -Su vim\n command to install the vim editor. \n\n\nNote:\nYou can also use a Windows editor. You can access your files from the \nC:\\\nmsys-install-folder\n\\home\\\nusername\n folder, where \nmsys-install-folder\n is the folder you installed MSYS2 in. For example, if you installed MSYS2 in the \nmsys64\n folder, your files are stored in \nC:\\msys64\\home\\\nusername\n\n\n\n\n\n\nYou will need to start a MinGW terminal to run the commands specified in the Mynewt documentation and tutorials. To start a MinGW terminal, sele ct the \"MSYS2 Mingw\" application from the start Menu (you can use either MinGW32 or MinGW64). \nIn Windows, we use the MingGW subsystem to build Mynewt tools and applications. \n\n\nStep 2: Installing Git for Windows\n\n\nDownload and install \nGit for Windows\n if it is not already installed.\n\n\nStep 3: Installing Go\n\n\nDownload and install the latest version of \nGo\n. Newt requires Go version 1.7 or higher.\n\n\nStep 4: Setting Up Your Go Environment\n\n\nThis section describes the Go environment and how to setup a Go workspace. Go provides an environment to compile Go code, construct Go packages, and import Go code. You will use Go commands to import the newt package repository into your local Go environment. The Go language environment dictates a specific directory structure, or workspace in Go parlance. It must contain three sibling directories with the names \nsrc\n, \npkg\n and \nbin\n: \n\n\n\n\nsrc contains Go source files organized into packages (one package per directory)\n\n\npkg contains package objects\n\n\nbin contains the Go application executables that Go builds and installs.\n\n\n\n\nThe \nGOPATH\n environment variable specifies the location of your workspace. To setup this workspace environment, create a \ndev\n directory and then a \ngo\n directory under it. Set the GOPATH environment variable to this directory where you will clone the newt repository.\n\n\nStart up a MinGW terminal and run the following commands to set up your Go workspace:\n\n\n$ cd $HOME\n$ mkdir -p dev/go \n$ cd dev/go\n$ export GOPATH=`pwd`\n\n\n\n\n\n\nAdd the following export statements to your ~/.bash_profile file and source the file:\n\n\nexport GOPATH=$HOME/dev/go\nexport PATH=$GOPATH/bin:$PATH\n\n\n\n\n\n\n\nStep 5: Downloading the Source and Installing the Newt Tool\n\n\nThe newt Go package is \nmynewt.apache.org/newt/newt\n and is stored in the \nApache Mynewt newt tool repository mirrored on github\n. We use the \ngo get\n command to download the source, build, and install the newt tool binary in the \n$GOPATH/bin\n directory. \n\n\n\nDownload the newt package source and install the tool:\n\n\n$cd $GOPATH\n$go get mynewt.apache.org/newt/newt\n$cd $GOPATH/src/mynewt.apache.org/newt\n$ls \nDISCLAIMER RELEASE_NOTES.md util\nINSTALLING.md build.sh viper\nLICENSE newt yaml\nNOTICE newtmgr\nREADME.md newtvm\n\n\n\n\n\n\nCheck that the newt tool is installed and it is in your path:\n\n\n$ls go/bin\n$ ls bin/newt\nbin/newt\n$which go\n/home/\nuser\n/dev/go/bin/newt\n$ newt version\nApache Newt (incubating) version: 1.0.0-dev\n\n\n\n\n\n\nGet information about the newt tool:\n\n\n$newt\nNewt allows you to create your own embedded application based on the Mynewt\noperating system. Newt provides both build and package management in a single\ntool, which allows you to compose an embedded application, and set of\nprojects, and then build the necessary artifacts from those project s. For more\ninformation on the Mynewt operating system, please visit\nhttps://mynewt.apache.org/.\n\nPlease use the newt help command, and specify the name of the command you want\nhelp for, for help on how to use a specific command\n\nUsage:\n newt [flags]\n newt [command]\n\nExamples:\n newt\n newt help [\ncommand-name\n]\n For help on \ncommand-name\n. If not specified, print this message.\n\nAvailable Commands:\n build Build one or more targets\n clean Delete build artifacts for one or more targets\n create-image Add image header to target binary\n debug Open debugger session to target\n info Show project info\n install Install project dependencies\n load Load built target to board\n mfg Manufacturing flash image commands\n new Create a new project\n pkg Create and manage packages in the current workspace\n run build/create-image/download/debug \ntarget\n\n size Size of tar get components\n sync Synchronize project dependencies\n target Commands to create, delete, configure, and query targets\n test Executes unit tests for one or more packages\n upgrade Upgrade project dependencies\n vals Display valid values for the specified element type(s)\n version Display the Newt version number\n\nFlags:\n -h, --help Help for newt commands\n -j, --jobs int Number of concurrent build jobs (default 4)\n -l, --loglevel string Log level (default \nWARN\n)\n -o, --outfile string Filename to tee output to\n -q, --quiet Be quiet; only display error output\n -s, --silent Be silent; don\nt output anything\n -v, --verbose Enable verbose output when executing commands\n\nUse \nnewt [command] --help\n for more information about a command.", + "title": "Install Newt on Windows" + }, + { + "location": "/newt/install/newt_windows/#installing-newt-on-windows", + "text": "You can develop and build Mynewt OS applications for your target boards on the Windows platform. This page shows you how to build the newt tool from the lastest source on the master branch of the Mynewt newt git repository . The tool is written in Go (golang). In Windows, we use MinGW as the development environment to build and run Mynewt OS applications for target boards. MinGW runs the bash shell and provides a Unix-like environment. This provides a uniform way to build Mynewt OS applications. The Mynewt documentation and tutorials use Unix commands and you can use the same Unix commands on MinGW to follow the tutorials. The documentation will note any commands or behaviors that are specific to Windows. This guide shows you how to perform the following: Install MSYS2/MinGW. Install Git. Install Go. Setup the Go environment. Download the source, build, and install the newt tool.", + "title": "Installing Newt on Windows" + }, + { + "location": "/newt/install/newt_windows/#step-1-installing-msys2mingw", + "text": "MSYS2/MinGW provides a bash shell and tools to build applications that run on Windows. It includes three subsystems: MSYS2 toolchain to build POSIX applications that run on Windows. MinGW32 toolchains to build 32 bit native Windows applications. MinGW64 toolchains to build 64 bit native Windows applications. The subsystems run the bash shell and provide a Unix-like environment. You can also run Windows applications from the shell. We will use the MinGW subsystem. To install and setup MSYS2 and MinGW: Download and run the MSYS2 installer . Select the 64 bit version if you are running on a 64 bit platform. Follow the prompts and check the Run MSYS2 now checkbox on the Installation Complete dialog. In the MSYS2 terminal, run the pacman -Syuu command. If you get a message to run the update again, close the terminal and run the pacman -Syuu command in a new terminal. To start a new MSYS2 terminal, select the \"MSYS2 MSYS\" application fro m the Windows start menu. Add a new user variable named MSYS2_PATH_TYPE and set the value to inherit in your Windows environment. This enables the MSYS2 and MinGW bash to inherit your Windows user Path values. To add the variable, select properties for your computer Advanced system settings Environment Variables New Run the pacman -Su vim command to install the vim editor. Note: You can also use a Windows editor. You can access your files from the C:\\ msys-install-folder \\home\\ username folder, where msys-install-folder is the folder you installed MSYS2 in. For example, if you installed MSYS2 in the msys64 folder, your files are stored in C:\\msys64\\home\\ username You will need to start a MinGW terminal to run the commands specified in the Mynewt documentation and tutorials. To start a MinGW terminal, select the \"MSYS2 Mingw\" application from the start Menu (you can use either MinGW32 or MinGW64). \nIn Windows, we use the MingGW subsystem to build Mynewt tools and applications.", + "title": "Step 1: Installing MSYS2/MinGW" + }, + { + "location": "/newt/install/newt_windows/#step-2-installing-git-for-windows", + "text": "Download and install Git for Windows if it is not already installed.", + "title": "Step 2: Installing Git for Windows" + }, + { + "location": "/newt/install/newt_windows/#step-3-installing-go", + "text": "Download and install the latest version of Go . Newt requires Go version 1.7 or higher.", + "title": "Step 3: Installing Go" + }, + { + "location": "/newt/install/newt_windows/#step-4-setting-up-your-go-environment", + "text": "This section describes the Go environment and how to setup a Go workspace. Go provides an environment to compile Go code, construct Go packages, and import Go code. You will use Go commands to import the newt package repository into your local Go environment. The Go language environment dictates a specific directory structure, or workspace in Go parlance. It must contain three sibling directories with the names src , pkg and bin : src contains Go source files organized into packages (one package per directory) pkg contains package objects bin contains the Go application executables that Go builds and installs. The GOPATH environment variable specifies the location of your workspace. To setup this workspace environment, create a dev directory and then a go directory under it. Set the GOPATH environment variable to this directory where you will clone the newt repository. Start up a MinGW terminal and run the following commands to set up you r Go workspace: $ cd $HOME\n$ mkdir -p dev/go \n$ cd dev/go\n$ export GOPATH=`pwd` \nAdd the following export statements to your ~/.bash_profile file and source the file: export GOPATH=$HOME/dev/go\nexport PATH=$GOPATH/bin:$PATH", + "title": "Step 4: Setting Up Your Go Environment" + }, + { + "location": "/newt/install/newt_windows/#step-5-downloading-the-source-and-installing-the-newt-tool", + "text": "The newt Go package is mynewt.apache.org/newt/newt and is stored in the Apache Mynewt newt tool repository mirrored on github . We use the go get command to download the source, build, and install the newt tool binary in the $GOPATH/bin directory. \nDownload the newt package source and install the tool: $cd $GOPATH\n$go get mynewt.apache.org/newt/newt\n$cd $GOPATH/src/mynewt.apache.org/newt\n$ls \nDISCLAIMER RELEASE_NOTES.md util\nINSTALLING.md build.sh viper\nLICENSE newt yaml\nNOTICE newtmgr\nREADME.md newtvm \nCheck that the newt tool is installed and it is in your path: $ls go/bin\n$ ls bin/newt\nbin/newt\n$which go\n/home/ user /dev/go/bin/newt\n$ newt version\nApache Newt (incubating) version: 1.0.0-dev \nGet information about the newt tool: $newt\nNewt allows you to create your own embedded application based on the Mynewt\noperating system. Newt provides both build and package managemen t in a single\ntool, which allows you to compose an embedded application, and set of\nprojects, and then build the necessary artifacts from those projects. For more\ninformation on the Mynewt operating system, please visit\nhttps://mynewt.apache.org/.\n\nPlease use the newt help command, and specify the name of the command you want\nhelp for, for help on how to use a specific command\n\nUsage:\n newt [flags]\n newt [command]\n\nExamples:\n newt\n newt help [ command-name ]\n For help on command-name . If not specified, print this message.\n\nAvailable Commands:\n build Build one or more targets\n clean Delete build artifacts for one or more targets\n create-image Add image header to target binary\n debug Open debugger session to target\n info Show project info\n install Install project dependencies\n load Load built target to board\n mfg Manufacturing flash image commands\n new Create a new project\n pkg Create and manage packages in the current workspace\n run build/create-image/download/debug target \n size Size of target components\n sync Synchronize project dependencies\n target Commands to create, delete, configure, and query targets\n test Executes unit tests for one or more packages\n upgrade Upgrade project dependencies\n vals Display valid values for the specified element type(s)\n version Display the Newt version number\n\nFlags:\n -h, --help Help for newt commands\n -j, --jobs int Number of concurrent build jobs (default 4)\n -l, --loglevel string Log level (default WARN )\n -o, --outfile string Filename to tee output to\n -q, --quiet Be quiet; only display error output\n -s, --silent Be silent; don t output anything\n -v, --verbose Enable verbose output when executing commands\n\nUse newt [command] --help for more information ab out a command.", + "title": "Step 5: Downloading the Source and Installing the Newt Tool" + }, + { "location": "/os/get_started/native_tools/", - "text": "Installing Native Mynewt Tools\n\n\nThis page shows how to install tools for native Mynewt targets (simulated targets on your laptop/computer) without using a Docker container. In other words, it allows you to run Mynewt OS as a native application on your Mac or Linux machine to simulate a target and use the Newt tool running natively on your machine to manage the simulated target. It also allows you to run the test suites for all packages not requiring HW support. You may choose to do this instead of using the build toolchain and Newt tool available in a Docker container.\n\n\nThis page provides guidance for MAC and Linux. See the relevant sections below.\n\n\n\n\nSet up toolchain for Mac\n\n\nInstall Brew\n\n\nIf you have not already installed Homebrew from the \n\nnewt\n tutorials pages\n, install it. \n\n\n\n\nInstall gcc/libc\n\n\nOS X ships with a C compiler called Clang. To build applications for the Mynewt simulator with, a different compiler is used as default: gcc.\n\n\n$ brew install gcc\n...\n...\n==\n Summary\n\ud83c\udf7a /usr/local/Cellar/gcc/5.2.0: 1353 files, 248M\n\n\n\n\n\n\n\nCheck the gcc version you have installed (either using brew or previously installed). The brew-installed version can be checked using \nbrew list gcc\n. The default compiler.yml configuration file in Mynewt expects version 5.x for Mac users, so if the installed version is 6.x and you wish to continue with this newer version, modify the \nmynewt-src-directory\n/repos/apache-mynewt-core/compiler/sim/compiler.yml\n file to change the default \ngcc-5\n defined there to \ngcc-6\n. In other words, replace the lines shown highlighted below:\n\n\n# OS X.\n\ncompiler.path.cc.DARWIN.OVERWRITE: \ngcc-5\n\n\ncompiler.path.as.DARWIN.OVERWRITE: \ngcc-5\n\n\ncompiler.path.objdump.DARWIN.OVERWRITE: \ngobjdump\n\ncompiler.path.objsize.DARWIN.OVERWRITE: \nobjsize\n\ncompiler.path.objcopy.DARWIN.OVERWRITE: \ngobjcopy\n\n\n\n\n\n\nwith the following:\n\n\ncompiler.p ath.cc.DARWIN.OVERWRITE: \ngcc-6\n\ncompiler.path.as.DARWIN.OVERWRITE: \ngcc-6\u201d\n\n\n\n\n\n\n\nIn case you wish to use Clang, you can change your \nmynewt-src-directory\n/repos/apache-mynewt-core/compiler/sim/compiler.yml\n to use Clang. Delete the gcc-5 DARWIN.OVERWRITE lines highlighted below.\n\n\n# OS X.\n\ncompiler.path.cc.DARWIN.OVERWRITE: \ngcc-5\n\n\ncompiler.path.as.DARWIN.OVERWRITE: \ngcc-5\n\n\ncompiler.path.objdump.DARWIN.OVERWRITE: \ngobjdump\n\ncompiler.path.objsize.DARWIN.OVERWRITE: \nobjsize\n\ncompiler.path.objcopy.DARWIN.OVERWRITE: \ngobjcopy\n\n\n\n\n\n\n\n\nNOTE:\n Both the newer gcc 6.x and Clang report a few warnings but they can be ignored.\n\n\n\n\nFURTHER NOTE:\n Mynewt developers mostly use gcc 5.x for sim builds; so it may take a little while to fix issues reported by the newer compiler. One option is to \ndisable warnings\n. To do that, remove the \n-Werror\n flag as an option for the compiler in the \nmynewt-src-directory\n/repos/apache-mynewt-core /compiler/sim/compiler.yml\n file as shown below. \n\n\ncompiler.flags.base: \n\n\n -m32 -Wall -ggdb\n\n\n\n\n\nYou may alternatively choose to \nspecify the precise warnings to ignore\n depending on the error thrown by the compiler. For example, if you see a \n[-Werror=misleading-indentation]\n error while building the sim image, add \n-Wno-misleading-indentation]\n as a compiler flag in the same line from the \nmynewt-src-directory\n/repos/apache-mynewt-core/compiler/sim/compiler.yml\n file.\n\n\ncompiler.flags.base: \n\n\n -m32 -Wall -Werror -ggdb -Wno-misleading-indentation\n\n\n\n\n\nA third option is to simply \ndowngrade to gcc 5.x\n.\n\n\n\n\nInstall gdb\n\n\n$ brew install gdb\n...\n...\n==\n Summary\n\ud83c\udf7a /usr/local/Cellar/gdb/7.10.1: XXX files,YYM\n\n\n\n\n\n\n\nNOTE:\n When running a program with gdb, you may need to sign your gdb\nexecutable. \nThis page\n\nshows a recipe for gdb signing. Alternately you can skip this step and\ncontinue without the abili ty to debug your mynewt application on your PC.*\n\n\n\n\nSet up toolchain for Linux\n\n\nThe below procedure can be used to set up a Debian-based Linux system (e.g.,\nUbuntu). If you are running a different Linux distribution, you will need to\nsubstitute invocations of \napt-get\n in the below steps with the package manager\nthat your distro uses.\n\n\n\n\nInstall gcc/libc that will produce 32-bit executables:\n\n\n$ sudo apt-get install gcc-multilib libc6-i386\n\n\n\n\n\n\n\nInstall gdb\n\n\n$ sudo apt-get install gdb\n\nReading package lists... Done\nBuilding dependency tree \nReading state information... Done\nSuggested packages:\n gdb-doc gdbserver\nThe following NEW packages will be installed:\n gdb\n...\nProcessing triggers for man-db (2.6.7.1-1ubuntu1) ...\nSetting up gdb (7.7.1-0ubuntu5~14.04.2) ...\n\n\n\n\n\n\n\nAt this point you have installed all the necessary software to build and run your first project on a simluator on your Mac OS or Linux computer. You may proceed to the \nCreate Your First Project\n section or continue to the next section and install the cross tools for ARM.", + "text": "Installing Native Toolchain\n\n\nThis page shows you how to install the toolchain to build Mynewt OS applications that run native on Mac OS and Linux. The applications run on Mynewt's simulated hardware. It also allows you to run the test suites for all packages that do not require HW support. \n\n\nNote:\n This is not supported on Windows.\n\n\n\n\nSetting Up the Toolchain for Mac\n\n\nInstalling Brew\n\n\nIf you have not already installed Homebrew from the \nnewt\n tutorials pages\n, install it. \n\n\n\n\nInstalling gcc/libc\n\n\nOS X ships with a C compiler called Clang. To build applications for the Mynewt simulator with, a different compiler is used as default: gcc.\n\n\n$ brew install gcc\n...\n...\n==\n Summary\n\ud83c\udf7a /usr/local/Cellar/gcc/5.2.0: 1353 files, 248M\n\n\n\n\n\n\n\nCheck the gcc version you have installed (either using brew or previously installed). The brew-installed version can be checked using \nbrew list gcc\n. The default comp iler.yml configuration file in Mynewt expects version 5.x for Mac users, so if the installed version is 6.x and you wish to continue with this newer version, modify the \nmynewt-src-directory\n/repos/apache-mynewt-core/compiler/sim/compiler.yml\n file to change the default \ngcc-5\n defined there to \ngcc-6\n. In other words, replace the lines shown highlighted below:\n\n\n# OS X.\n\ncompiler.path.cc.DARWIN.OVERWRITE: \ngcc-5\n\n\ncompiler.path.as.DARWIN.OVERWRITE: \ngcc-5\n\n\ncompiler.path.objdump.DARWIN.OVERWRITE: \ngobjdump\n\ncompiler.path.objsize.DARWIN.OVERWRITE: \nobjsize\n\ncompiler.path.objcopy.DARWIN.OVERWRITE: \ngobjcopy\n\n\n\n\n\n\nwith the following:\n\n\ncompiler.path.cc.DARWIN.OVERWRITE: \ngcc-6\n\ncompiler.path.as.DARWIN.OVERWRITE: \ngcc-6\u201d\n\n\n\n\n\n\n\nIn case you wish to use Clang, you can change your \nmynewt-src-directory\n/repos/apache-mynewt-core/compiler/sim/compiler.yml\n to use Clang. Delete the gcc-5 DARWIN.OVERWRITE lines highlighted below.\n\n\n# OS X.\n\ncompiler.path.cc.DARWIN.OVERWRITE: \ngcc-5\n\n\ncompiler.path.as.DARWIN.OVERWRITE: \ngcc-5\n\n\ncompiler.path.objdump.DARWIN.OVERWRITE: \ngobjdump\n\ncompiler.path.objsize.DARWIN.OVERWRITE: \nobjsize\n\ncompiler.path.objcopy.DARWIN.OVERWRITE: \ngobjcopy\n\n\n\n\n\n\n\n\nNOTE:\n Both the newer gcc 6.x and Clang report a few warnings but they can be ignored.\n\n\n\n\nFURTHER NOTE:\n Mynewt developers mostly use gcc 5.x for sim builds; so it may take a little while to fix issues reported by the newer compiler. One option is to \ndisable warnings\n. To do that, remove the \n-Werror\n flag as an option for the compiler in the \nmynewt-src-directory\n/repos/apache-mynewt-core/compiler/sim/compiler.yml\n file as shown below. \n\n\ncompiler.flags.base: \n\n\n -m32 -Wall -ggdb\n\n\n\n\n\nYou may alternatively choose to \nspecify the precise warnings to ignore\n depending on the error thrown by the compiler. For example, if you see a \n[-Werror=misleading-indentation]\n error wh ile building the sim image, add \n-Wno-misleading-indentation]\n as a compiler flag in the same line from the \nmynewt-src-directory\n/repos/apache-mynewt-core/compiler/sim/compiler.yml\n file.\n\n\ncompiler.flags.base: \n\n\n -m32 -Wall -Werror -ggdb -Wno-misleading-indentation\n\n\n\n\n\nA third option is to simply \ndowngrade to gcc 5.x\n.\n\n\n\n\nInstalling gdb\n\n\n$ brew install gdb\n...\n...\n==\n Summary\n\ud83c\udf7a /usr/local/Cellar/gdb/7.10.1: XXX files,YYM\n\n\n\n\n\n\n\nNOTE:\n When running a program with gdb, you may need to sign your gdb\nexecutable. \nThis page\n\nshows a recipe for gdb signing. Alternately you can skip this step and\ncontinue without the ability to debug your mynewt application on your PC.*\n\n\n\n\nSetting Up the Toolchain for Linux\n\n\nThe below procedure can be used to set up a Debian-based Linux system (e.g.,\nUbuntu). If you are running a different Linux distribution, you will need to\nsubstitute invocations of \napt-get\n in the below steps with the package manager\nthat your distro uses.\n\n\n\n\nInstall gcc/libc that will produce 32-bit executables:\n\n\n$ sudo apt-get install gcc-multilib libc6-i386\n\n\n\n\n\n\n\nInstall gdb\n\n\n$ sudo apt-get install gdb\n\nReading package lists... Done\nBuilding dependency tree \nReading state information... Done\nSuggested packages:\n gdb-doc gdbserver\nThe following NEW packages will be installed:\n gdb\n...\nProcessing triggers for man-db (2.6.7.1-1ubuntu1) ...\nSetting up gdb (7.7.1-0ubuntu5~14.04.2) ...\n\n\n\n\n\n\n\nAt this point you have installed all the necessary software to build and run your first project on a simluator on your Mac OS or Linux computer. You may proceed to the \nCreate Your First Project\n section or continue to the next section and install the cross tools for ARM.", "title": "Install Native Toolchain" }, { - "location": "/os/get_started/native_tools/#installing-native-mynewt-tools", - "text": "This page shows how to install tools for native Mynewt targets (simulated targets on your laptop/computer) without using a Docker container. In other words, it allows you to run Mynewt OS as a native application on your Mac or Linux machine to simulate a target and use the Newt tool running natively on your machine to manage the simulated target. It also allows you to run the test suites for all packages not requiring HW support. You may choose to do this instead of using the build toolchain and Newt tool available in a Docker container. This page provides guidance for MAC and Linux. See the relevant sections below.", - "title": "Installing Native Mynewt Tools" + "location": "/os/get_started/native_tools/#installing-native-toolchain", + "text": "This page shows you how to install the toolchain to build Mynewt OS applications that run native on Mac OS and Linux. The applications run on Mynewt's simulated hardware. It also allows you to run the test suites for all packages that do not require HW support. Note: This is not supported on Windows.", + "title": "Installing Native Toolchain" }, { - "location": "/os/get_started/native_tools/#set-up-toolchain-for-mac", + "location": "/os/get_started/native_tools/#setting-up-the-toolchain-for-mac", "text": "", - "title": "Set up toolchain for Mac" + "title": "Setting Up the Toolchain for Mac" }, { - "location": "/os/get_started/native_tools/#install-brew", + "location": "/os/get_started/native_tools/#installing-brew", "text": "If you have not already installed Homebrew from the newt tutorials pages , install it.", - "title": "Install Brew" + "title": "Installing Brew" }, { - "location": "/os/get_started/native_tools/#install-gcclibc", + "location": "/os/get_started/native_tools/#installing-gcclibc", "text": "OS X ships with a C compiler called Clang. To build applications for the Mynewt simulator with, a different compiler is used as default: gcc. $ brew install gcc\n...\n...\n== Summary\n\ud83c\udf7a /usr/local/Cellar/gcc/5.2.0: 1353 files, 248M Check the gcc version you have installed (either using brew or previously installed). The brew-installed version can be checked using brew list gcc . The default compiler.yml configuration file in Mynewt expects version 5.x for Mac users, so if the installed version is 6.x and you wish to continue with this newer version, modify the mynewt-src-directory /repos/apache-mynewt-core/compiler/sim/compiler.yml file to change the default gcc-5 defined there to gcc-6 . In other words, replace the lines shown highlighted below: # OS X. compiler.path.cc.DARWIN.OVERWRITE: gcc-5 compiler.path.as.DARWIN.OVERWRITE: gcc-5 compiler.path.objdump.DARWIN.OVERWRITE: gobjdump \ncompiler.path.objsize.DARWIN.OVERWRITE: objsize \ncompiler.path.objcopy.DARWIN.OVERWRITE: gobjcopy with the following: compiler.path.cc.DARWIN.OVERWRITE: gcc-6 \ncompiler.path.as.DARWIN.OVERWRITE: gcc-6\u201d In case you wish to use Clang, you can change your mynewt-src-directory /repos/apache-mynewt-core/compiler/sim/compiler.yml to use Clang. Delete the gcc-5 DARWIN.OVERWRITE lines highlighted below. # OS X. compiler.path.cc.DARWIN.OVERWRITE: gcc-5 compiler.path.as.DARWIN.OVERWRITE: gcc-5 compiler.path.objdump.DARWIN.OVERWRITE: gobjdump \ncompiler.path.objsize.DARWIN.OVERWRITE: objsize \ncompiler.path.objcopy.DARWIN.OVERWRITE: gobjcopy NOTE: Both the newer gcc 6.x and Clang report a few warnings but they can be ignored. FURTHER NOTE: Mynewt developers mostly use gcc 5.x for sim builds; so it may take a little while to fix issues reported by the newer compiler. One option is to disable warnings . To do that, remove the -Werror flag as an option for the compiler in the mynewt-src-directory /repos/apa che-mynewt-core/compiler/sim/compiler.yml file as shown below. compiler.flags.base: -m32 -Wall -ggdb You may alternatively choose to specify the precise warnings to ignore depending on the error thrown by the compiler. For example, if you see a [-Werror=misleading-indentation] error while building the sim image, add -Wno-misleading-indentation] as a compiler flag in the same line from the mynewt-src-directory /repos/apache-mynewt-core/compiler/sim/compiler.yml file. compiler.flags.base: -m32 -Wall -Werror -ggdb -Wno-misleading-indentation A third option is to simply downgrade to gcc 5.x .", - "title": "Install gcc/libc" + "title": "Installing gcc/libc" }, { - "location": "/os/get_started/native_tools/#install-gdb", + "location": "/os/get_started/native_tools/#installing-gdb", "text": "$ brew install gdb\n...\n...\n== Summary\n\ud83c\udf7a /usr/local/Cellar/gdb/7.10.1: XXX files,YYM NOTE: When running a program with gdb, you may need to sign your gdb\nexecutable. This page \nshows a recipe for gdb signing. Alternately you can skip this step and\ncontinue without the ability to debug your mynewt application on your PC.*", - "title": "Install gdb" + "title": "Installing gdb" }, { - "location": "/os/get_started/native_tools/#set-up-toolchain-for-linux", + "location": "/os/get_started/native_tools/#setting-up-the-toolchain-for-linux", "text": "The below procedure can be used to set up a Debian-based Linux system (e.g.,\nUbuntu). If you are running a different Linux distribution, you will need to\nsubstitute invocations of apt-get in the below steps with the package manager\nthat your distro uses.", - "title": "Set up toolchain for Linux" + "title": "Setting Up the Toolchain for Linux" }, { "location": "/os/get_started/native_tools/#install-gcclibc-that-will-produce-32-bit-executables", @@ -261,59 +296,69 @@ "title": "Install gcc/libc that will produce 32-bit executables:" }, { - "location": "/os/get_started/native_tools/#install-gdb_1", + "location": "/os/get_started/native_tools/#install-gdb", "text": "$ sudo apt-get install gdb\n\nReading package lists... Done\nBuilding dependency tree \nReading state information... Done\nSuggested packages:\n gdb-doc gdbserver\nThe following NEW packages will be installed:\n gdb\n...\nProcessing triggers for man-db (2.6.7.1-1ubuntu1) ...\nSetting up gdb (7.7.1-0ubuntu5~14.04.2) ... At this point you have installed all the necessary software to build and run your first project on a simluator on your Mac OS or Linux computer. You may proceed to the Create Your First Project section or continue to the next section and install the cross tools for ARM.", "title": "Install gdb" }, { "location": "/os/get_started/cross_tools/", - "text": "Installing Cross Tools for ARM\n\n\nThis page shows how to install tools on your laptop/computer to use for direct communication (e.g. for debugging) with some ARM based HW platforms running Apache Mynewt. It shows you how to install the following tools for Mac OS X and Linux:\n\n\n\n\nARM Cross toolchain\n\n\nDebugger to load and debug your device\n\n\n\n\n\n\nInstall ARM Cross Toolchain\n\n\nInstall ARM Toolchain For Mac OS X\n\n\nInstall the PX4 Toolchain and check the version installed. ARM maintains a\npre-built GNU toolchain with a GCC source branch targeted at Embedded ARM\nProcessors, namely Cortex-R/Cortex-M processor families. After installing,\nensure that the symbolic link installed by Homebrew points to the correct\nversion of the debugger.\n\n\n$ brew tap PX4/homebrew-px4\n$ brew update\n$ brew install gcc-arm-none-eabi-49\n$ arm-none-eabi-gcc --version \narm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20150529 (release) [ARM/embe dded-4_9-branch revision 224288]\nCopyright (C) 2014 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions. There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n$ ls -al /usr/local/bin/arm-none-eabi-gdb\nlrwxr-xr-x 1 aditihilbert admin 69 Sep 22 17:16 /usr/local/bin/arm-none-eabi-gdb -\n /usr/local/Cellar/gcc-arm-none-eabi-49/20150609/bin/arm-none-eabi-gdb\n\n\n\n\n\nNote:\n If no version is specified, brew will install the latest version\navailable. Mynewt OS will eventually work with multiple versions available,\nincluding the latest releases. However, at present we have tested only with\nthis version and recommend it for getting started. \n\n\n\n\nInstall ARM Toolchain For Linux\n\n\nOn a Debian-based Linux distribution, gcc 4.9.3 for ARM can be installed with\napt-get as documented below. The steps are explained in depth at\n\nhttps://launchpad.net/~team-gcc-arm-embedded/+archive/ubuntu/ppa\n.\n\n\n$ sudo apt-get remove binutils-arm-none-eabi gcc-arm-none-eabi \n$ sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa\n$ sudo apt-get update \n$ sudo apt-get install gcc-arm-none-eabi\n$ sudo apt-get install gdb-arm-none-eabi\n\n\n\n\n\n\n\nInstall Debugger\n\n\nMynewt uses, depending on the board, either the OpenOCD or SEGGER J-Link debugger. \n\n\nInstall OpenOCD\n\n\nOpenOCD (Open On-Chip Debugger) is open-source software that allows your\ncomputer to interface with the JTAG debug connector on a variety of boards. A\nJTAG connection lets you debug and test embedded target devices. For more on\nOpenOCD go to \nhttp://openocd.org\n.\n\n\nOpenOCD version 0.10.0 with nrf52 support is required. A binary for this version is available to download for Mac OS and Linux.\n\n\n\n\nInstall OpenOCD on Mac OS\n\n\nStep 1: Download the \nbinary tarball for Mac OS\n.\n\n\nStep 2: Change to the root directory: \n\n\n$cd / \n\n\n\n\n\n\nStep 3: Untar the tarball and install into \n /usr/local/ bin\n. You will need to replace \n ~/Downloads \n with the directory that the tarball is downloaded to. \n\n\nsudo tar -xf ~/Downloads/openocd-bin-0.10.0-MacOS.tgz ` \n\n\n\n\n\n\nStep 4: Check the OpenOCD version you are using: \n\n\n$which openocd\n/usr/local/bin/openocd\n$openocd -v\nOpen On-Chip Debugger 0.10.0\nLicensed under GNU GPL v2\nFor bug reports, read\nhttp://openocd.org/doc/doxygen/bugs.html\n\n\n\n\n\nYou should see version: \n0.10.0\n. \n\n\n\n\nInstall OpenOCD on Linux\n\n\nStep 1: Download the \nbinary tarball for Linux\n\n\nStep 2: Change to the root directory: \n\n\n$cd / \n\n\n\n\n\n\nStep 3: Untar the tarball and install into \n /usr/local/bin\n. You will need to replace \n ~/Downloads \n with the directory that the tarball is downloaded to. \n\n\n Note:\n You must specify the -p option for the tar command.\n\n\n$sudo tar -xpf ~/Downloads/openocd-bin-0.10.0-Linux.tgz\n\n\n\n\n\n\nStep 4: Check the OpenOCD version you are using: \n\n\n$which openocd\n/usr/lo cal/bin/openocd\n$openocd -v\nOpen On-Chip Debugger 0.10.0\nLicensed under GNU GPL v2\nFor bug reports, read\nhttp://openocd.org/doc/doxygen/bugs.html\n\n\n\n\n\nYou should see version: \n0.10.0\n. \n\n\nIf you see any of these error messages:\n\n\n\n\n\n\nopenocd: error while loading shared libraries: libhidapi-hidraw.so.0: cannot open shared object file: No such file or directory\n\n\n\n\n\n\nopenocd: error while loading shared libraries: libusb-1.0.so.0: cannot open shared object file: No such file or directory \n\n\n\n\n\n\nrun the following command to install the libraries: \n\n\n$sudo apt-get install libhidapi-dev:i386\n\n\n\n\n\n\n\nInstall SEGGAR J-Link\n\n\nYou can download and install Segger J-LINK Software and documentation pack from \nSEGGER\n.", + "text": "Installing the Cross Tools for ARM\n\n\nThis page shows you how to install the tools to build, run, and debug Mynewt OS applications that run on supported ARM target boards. It shows you how to install the following tools on Mac OS, Linux and Windows:\n\n\n\n\nARM cross toolchain to compile and build Mynewt applications for the target boards.\n\n\nDebuggers to load and debug applications on the target boards.\n\n\n\n\n\n\nInstalling the ARM Cross Toolchain\n\n\nARM maintains a pre-built GNU toolchain with gcc and gdb targeted at Embedded ARM Processors, namely Cortex-R/Cortex-M processor families. Mynewt OS has been tested with version 4.9 of the toolchain and we recommend you install this version to get started. Mynewt OS will eventually work with multiple versions available, including the latest releases. \n\n\nInstalling the ARM Toolchain For Mac OS X\n\n\nAdd the \nPX4/homebrew-px4\n homebrew tap and install version 4.9 of the toolchain. After installing, check that the symbolic link that homebrew created points to the correct version of the debugger.\n\n\n$ brew tap PX4/homebrew-px4\n$ brew update\n$ brew install gcc-arm-none-eabi-49\n$ arm-none-eabi-gcc --version \narm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 224288]\nCopyright (C) 2014 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions. There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n$ ls -al /usr/local/bin/arm-none-eabi-gdb\nlrwxr-xr-x 1 aditihilbert admin 69 Sep 22 17:16 /usr/local/bin/arm-none-eabi-gdb -\n /usr/local/Cellar/gcc-arm-none-eabi-49/20150609/bin/arm-none-eabi-gdb\n\n\n\n\n\nNote:\n If no version is specified, brew will install the latest version available. \n\n\n\n\nInstalling the ARM Toolchain For Linux\n\n\nOn a Debian-based Linux distribution, gcc 4.9.3 for ARM can be installed with\napt-get as documented below. The steps are explained in depth at\n\nhttps://launchpad.net/~team-gcc-arm-embedded/+archive/ubuntu/ppa\n.\n\n\n$ sudo apt-get remove binutils-arm-none-eabi gcc-arm-none-eabi \n$ sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa\n$ sudo apt-get update \n$ sudo apt-get install gcc-arm-none-eabi\n$ sudo apt-get install gdb-arm-none-eabi\n\n\n\n\n\n\n\nInstalling the ARM Toolchain for Windows\n\n\nStep 1: Download and run the \ninstaller\n to install arm-none-eabi-gcc and arm-none-eabi-gdb. Select the default destination folder: \nC:\\Program Files (x86)\\GNU Tools ARM Embedded\\4.9 2015q2\n. \n\n\nNote:\n You may select a different folder but the installation instructions use the default values.\n\n\nStep 2: Add the path:\n C:\\Program Files (x86)\\GNU Tools ARM Embedded\\4.9 2015q2\\bin\n to your Windows \nPath\n environment variable. Note: You must add \nbin\n to the path.\n\n\nStep 3: Check that you are using the installed versions arm-none-eabi-gcc and arm-none-eabi-g db. Open a MinGW terminal and run the \nwhich\n commands. \n\n\nNote:\n You must start a new MinGW terminal to inherit the new \nPath\n values.\n\n\n$ which arm-none-eabi-gcc\n/c/Program Files (x86)/GNU Tools ARM Embedded/4.9 2015q2/bin/arm-none-eabi-gcc\n$which arm-none-eabi-gdb\n/c/Program Files (x86)/GNU Tools ARM Embedded/4.9 2015q2/bin/arm-none-eabi-gdb\n\n\n\n\n\nInstalling the Debuggers\n\n\nMynewt uses, depending on the board, either the OpenOCD or SEGGER J-Link debuggers. \n\n\n\nInstalling the OpenOCD Debugger\n\n\nOpenOCD (Open On-Chip Debugger) is open-source software that allows your\ncomputer to interface with the JTAG debug connector on a variety of boards. A\nJTAG connection lets you debug and test embedded target devices. For more on\nOpenOCD go to \nhttp://openocd.org\n.\n\n\nOpenOCD version 0.10.0 with nrf52 support is required. A binary for this version is available to download for Mac OS, Linux, and Windows.\n\n\n\n\nInstalling OpenOCD on Mac OS\n\n\nStep 1: Download the \nbinary tarball for Mac OS\n.\n\n\nStep 2: Change to the root directory: \n\n\n$cd / \n\n\n\n\n\n\nStep 3: Untar the tarball and in
<TRUNCATED>
