This closes #58. nRF52 tutorial updated with new newt commands. Link in Arduino Zero to first project fixed. Link to Sim blinky fixed
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/commit/09ce71d2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/tree/09ce71d2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/diff/09ce71d2 Branch: refs/heads/asf-site Commit: 09ce71d28dbc5e189986c29b5d184e26949970c2 Parents: 1415e6b Author: aditihilbert <[email protected]> Authored: Thu Mar 17 13:56:21 2016 -0700 Committer: aditihilbert <[email protected]> Committed: Thu Mar 17 13:56:21 2016 -0700 ---------------------------------------------------------------------- mkdocs/search_index.json | 62 ++++-- os/get_started/project_create/index.html | 37 ++-- os/tutorials/arduino_zero/index.html | 14 +- os/tutorials/nRF52/index.html | 283 +++++--------------------- 4 files changed, 125 insertions(+), 271 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/09ce71d2/mkdocs/search_index.json ---------------------------------------------------------------------- diff --git a/mkdocs/search_index.json b/mkdocs/search_index.json index 6079c99..2100189 100644 --- a/mkdocs/search_index.json +++ b/mkdocs/search_index.json @@ -142,27 +142,27 @@ }, { "location": "/os/get_started/project_create/", - "text": "Creating a Mynewt Project\n\n\nThis page shows how to create a Mynewt Project using \nnewt\n\n\nPre-Requisites\n\n\n\n\nEnsure you have installed \nnewt\n and that the \nnewt command is in your system path.\n\n\nYou must have Internet connectivity to fetch remote Mynewt components\n\n\nYou must \ninstall the compiler tools\n to \nsupport native compiling to build the project this tutorial creates. \n\n\n\n\nNewt New\n\n\nChose a project name. For this tutorial we will call this project \nmyproj\n.\nEnter the \nnewt new myproj\n command. Your put\n\n\n $ newt new myproj\n Downloading project skeleton from apache/incubator-mynewt-blinky...\n Installing skeleton in myproj...\n Project myproj successfully created.\n\n\n\n\n\nThe \nnewt\n tool has created a project directory structure like the one below:\n\n\n \u2500\u2500\u2500 myproj\n \u251c\u2500\u2500 DISCLAIMER\n \u251c\u2500\u2500 LICENSE\n \u251c\u2500\u2500 NOTICE\n \u251c\u2500\u2500 README.md\n \u251c\u2500\u2500 apps\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 blinky\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 main.c\n \u251c\u2500\u2500 project.yml\n \u2514\u2500\u2500 targets\n \u251c\u2500\u2500 my_blinky_sim\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 target.yml\n \u2514\u2500\u2500 unittest\n \u251c\u2500\u2500 pkg.yml\n \u2514\u2500\u2500 target.yml\n\n\n\n\n\nnewt\n has installed the base files for a project comprising the following.\n\n\n\n\nfile \nproject.yml\n contains the repository list that the project uses to fetch\nits packages. Your project is a collection of repositories. In this case, the project just\ncomprises the core mynewt repository. Later you will add more repositories\nto include other mynewt components.\n\n\nthe file \napps/blinky/pkg.yml\n contains the description of your application\nand its package dependencies.\n\n\nA target directory containing \nmy_blinky_sim\n, a target descriptor used to\nbuild a version of myproj. Use \nnewt target show\n to see available build \ntargets.\n\n\nA non-build-able target called \nunittest\n. This is used\ninternally by \nnewt\n and is not a formal build target.\n\n\n\n\nNOTE: the actual code and package files are not installed \n(except the template for \nmain.c\n. See the next step for installing \nthe packages.\n\n\nNewt Install\n\n\nchange into the \nmyproj\n directory. Then ask newt to install all the \nproject package dependencies using \nnewt install\n\n\n $ newt install -v \n apache-mynewt-core\n Downloading repository description for apache-mynewt-core... success!\n Downloading repository incubator-mynewt-core (branch: master; commit: mynewt_0_8_0_b2_tag) at https: //github.com/apache/incubator-mynewt-core.git\n Cloning into \n/var/folders/7l/7b3w9m4n2mg3sqmgw2q1b9p80000gn/T/newt-repo969988348\n...\n remote: Counting objects: 17935, done.\n remote: Compressing objects: 100% (234/234), done.\n remote: Total 17935 (delta 101), reused 0 (delta 0), pack-reused 17686\n Receiving objects: 100% (17935/17935), 6.18 MiB | 315.00 KiB/s, done.\n Resolving deltas: 100% (10541/10541), done.\n Checking connectivity... done.\n apache-mynewt-core successfully installed version 0.7.9-none\n $ \n\n\n\n\n\nNow you will have installed packages required to build your project. Note in \nthe package you now have dependent packages stored in the \nrepos\n directory\nunder the specific repository you have included in the base project. \n\n\n .\n \u251c\u2500\u2500 apps\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 blinky\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n \u251c\u2500\u2500 repos\n \u2502\u00a0\u00a0 \u2514\u2500\ u2500 apache-mynewt-core\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 apps\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 compiler\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 fs\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 hw\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 libs\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 net\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 scripts\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 sys\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 targets\n \u2514\u2500\u2500 targets\n \u251c\u2500\u2500 my_blinky_sim\n \u2514\u2500\u2500 unittest\n\n\n\n\n\nWithin each of these directories are the packages required to build your\nproject for the various targets.\n\n\nTesting the Project\n\n\nTo validate, you can also run all the units test through simulation.\n\n\n $ newt test all\n ...lots of compiling and testing...\n ...about 2 minutes later ...\n Archiving bootutil.a\n Linking test_bootutil\n Executing test : /myproj/bin/unittest/libs/bootutil/test_bootutil\n Passed tests: [net/nimble/host fs/nffs libs/os hw/hal libs/mbedtls libs/util sys/config libs/bootutil]\n All tests passed\n\n\n\n\n\nBuilding the Project\n\n\nTo build the project you can use \nnewt build\n using the target \n\n\n $ newt build my_blinky_sim\n App successfully built: /bin/my_blinky_sim/apps/blinky/blinky.elf\n\n\n\n\n\nYou can run the simulated version of your project and see the simulated LED\nblink\n\n\n ./bin/my_blinky_sim/apps/blinky/blinky.elf\n hal_gpio set pin 1 to 0\n\n\n\n\n\nJust do \nctrl-c\n to exit.\n\n\nComplete\n\n\nCongratulations, you have created your first project. This project contains \nthe core OS, a simple application to blink an LED and all of the dependencies\nrequired.", + "text": "Create Your First Mynewt Project\n\n\nThis page shows how to create a Mynewt Project using the \nnewt\n command-line tool.\n\n\nPre-Requisites\n\n\n\n\nEnsure you have installed \nnewt\n and that the \nnewt command is in your system path. \n\n\nYou must have Internet connectivity to fetch remote Mynewt components\n\n\nYou must \ninstall the compiler tools\n to \nsupport native compiling to build the project this tutorial creates. \n\n\n\n\n\n\nNewt New\n\n\nChoose a project name. For this tutorial we will call this project \nmyproj\n.\nEnter the \nnewt new myproj\n command. \n\n\n $ newt new myproj\n Downloading project skeleton from apache/incubator-mynewt-blinky...\n Installing skeleton in myproj...\n Project myproj successfully created.\n\n\n\n\n\n\n\nThe \nnewt\n tool has created a project directory structure like the one below:\n\n\n \u2500\u2500\u2500 myproj\n \u251c\u2500\u2500 DISCLAIMER\n \u251c\u2500\u2500 LICENSE\n \u251c\u2500\u2500 NOTICE\n \u251c\u2500\u2500 README.md\n \u251c\u2500\u2500 apps\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 blinky\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 main.c\n \u251c\u2500\u2500 project.yml\n \u2514\u2500\u2500 targets\n \u251c\u2500\u2500 my_blinky_sim\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 target.yml\n \u2514\u2500\u2500 unittest\n \u251c\u2500\u2500 pkg.yml\n \u2514\u2500\u2500 target.yml\n\n\n\n\n\n\n\nnewt\n has installed the base files for a project comprising the following.\n\n\n\n\nfile \nproject.yml\n contains the repository list that the project uses to fetch\nits packages. Your project is a collection of repositories. In this case, the project just\ncomprises the core mynewt repository. Later you will add more repositories\nto include other mynewt components.\n\n\nthe file \napps/blinky/pkg.yml\n contains the description of your application\nand its package dependencies.\n\n\nA target directory containing \nmy_blinky_sim\n, a target descriptor used to\nbuild a version of myproj. Use \nnewt target show\n to see available build \ntargets.\n\n\nA non-build-able target called \nunittest\n. This is used\ninternally by \nnewt\n and is not a formal build target.\n\n\n\n\nNOTE:\n the actual code and package files are not installed \n(except the template for \nmain.c\n). See the next step for installing the packages.\n\n\n\n\nNewt Install\n\n\nChange into the \nmyproj\n directory. Then ask newt to install all the \nproject package dependencies using \nnewt install\n.\n\n\n $ newt install -v \n apache-mynewt-core\n Downloading repository description for apache-mynewt-core... success!\n Downloading repository incubator-mynewt-core (branch: master; commit: mynewt_0_8_0_b2_tag) at https://github.com/apache/incubator-mynewt-core.git\n Cloning into \n/var/folders/7l/7b3w9m4n2mg3sqmgw2q1b9p80000gn/T/newt-repo969988348\n...\n remote: Counting objects: 17935, done.\n remote: Compressing objects: 100% (234/234), done.\n remote: Total 17935 (delta 101), reused 0 (delta 0), pack-reused 17686\n Receiving objects: 100% (17935/17935), 6.18 MiB | 315.00 KiB/s, done.\n Resolving deltas: 100% (10541/10541), done.\n Checking connectivity... done.\n apache-mynewt-core successfully installed version 0.7.9-none\n $ \n\n\n\n\n\nNow you will have installed packages required to build your project. Note in \nthe package you now have dependent packages stored in the \nrepos\n directory\nunder the specific repository you have included in the base project. \n\n\n .\n \u251c\u2500\u2500 apps\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 blinky\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n \u251c\u2500\u25 00 repos\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 apache-mynewt-core\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 apps\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 compiler\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 fs\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 hw\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 libs\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 net\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 scripts\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 sys\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 targets\n \u2514\u2500\u2500 targets\n \u251c\u2500\u2500 my_blinky_sim\n \u2514\u2500\u2500 unittest\n\n\n\n\n\nWithin each of these directories are the packages required to build your\nproject for the various targets.\n\n\n\n\nTesting the Project\n\n\nTo validate, you can also run all the units test through simulation.\n\n\n $ newt test all\n ...lots of compiling and testing...\n ...about 2 minutes later ...\n Archiving bootuti l.a\n Linking test_bootutil\n Executing test: /myproj/bin/unittest/libs/bootutil/test_bootutil\n Passed tests: [net/nimble/host fs/nffs libs/os hw/hal libs/mbedtls libs/util sys/config libs/bootutil]\n All tests passed\n\n\n\n\n\n\n\nBuilding the Project\n\n\nTo build the project you can use \nnewt build\n using the target \n\n\n $ newt build my_blinky_sim\n App successfully built: /bin/my_blinky_sim/apps/blinky/blinky.elf\n\n\n\n\n\n\n\nYou can run the simulated version of your project and see the simulated LED\nblink\n\n\n ./bin/my_blinky_sim/apps/blinky/blinky.elf\n hal_gpio set pin 1 to 0\n\n\n\n\n\nJust do \nctrl-c\n to exit.\n\n\n\n\nComplete\n\n\nCongratulations, you have created your first project! This project contains \nthe core OS, a simple application to blink an LED and all of the dependencies\nrequired.", "title": "Creating Your First Project" }, { - "location": "/os/get_started/project_create/#creating-a-mynewt-project", - "text": "This page shows how to create a Mynewt Project using newt", - "title": "Creating a Mynewt Project" + "location": "/os/get_started/project_create/#create-your-first-mynewt-project", + "text": "This page shows how to create a Mynewt Project using the newt command-line tool.", + "title": "Create Your First Mynewt Project" }, { "location": "/os/get_started/project_create/#pre-requisites", - "text": "Ensure you have installed newt and that the \nnewt command is in your system path. You must have Internet connectivity to fetch remote Mynewt components You must install the compiler tools to \nsupport native compiling to build the project this tutorial creates.", + "text": "Ensure you have installed newt and that the \nnewt command is in your system path. You must have Internet connectivity to fetch remote Mynewt components You must install the compiler tools to \nsupport native compiling to build the project this tutorial creates.", "title": "Pre-Requisites" }, { "location": "/os/get_started/project_create/#newt-new", - "text": "Chose a project name. For this tutorial we will call this project myproj .\nEnter the newt new myproj command. Your put $ newt new myproj\n Downloading project skeleton from apache/incubator-mynewt-blinky...\n Installing skeleton in myproj...\n Project myproj successfully created. The newt tool has created a project directory structure like the one below: \u2500\u2500\u2500 myproj\n \u251c\u2500\u2500 DISCLAIMER\n \u251c\u2500\u2500 LICENSE\n \u251c\u2500\u2500 NOTICE\n \u251c\u2500\u2500 README.md\n \u251c\u2500\u2500 apps\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 blinky\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 main.c\n \u251c\u2500\u2500 project.yml\n \u2514\u2500\u2500 targets\n \u251c\u2500\u2500 my_blinky_sim\n \u2502\u00a0\u00a0 \u 251c\u2500\u2500 pkg.yml\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 target.yml\n \u2514\u2500\u2500 unittest\n \u251c\u2500\u2500 pkg.yml\n \u2514\u2500\u2500 target.yml newt has installed the base files for a project comprising the following. file project.yml contains the repository list that the project uses to fetch\nits packages. Your project is a collection of repositories. In this case, the project just\ncomprises the core mynewt repository. Later you will add more repositories\nto include other mynewt components. the file apps/blinky/pkg.yml contains the description of your application\nand its package dependencies. A target directory containing my_blinky_sim , a target descriptor used to\nbuild a version of myproj. Use newt target show to see available build \ntargets. A non-build-able target called unittest . This is used\ninternally by newt and is not a formal build target. NOTE: the actual code and pa ckage files are not installed \n(except the template for main.c . See the next step for installing \nthe packages.", + "text": "Choose a project name. For this tutorial we will call this project myproj .\nEnter the newt new myproj command. $ newt new myproj\n Downloading project skeleton from apache/incubator-mynewt-blinky...\n Installing skeleton in myproj...\n Project myproj successfully created. The newt tool has created a project directory structure like the one below: \u2500\u2500\u2500 myproj\n \u251c\u2500\u2500 DISCLAIMER\n \u251c\u2500\u2500 LICENSE\n \u251c\u2500\u2500 NOTICE\n \u251c\u2500\u2500 README.md\n \u251c\u2500\u2500 apps\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 blinky\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 pkg.yml\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 main.c\n \u251c\u2500\u2500 project.yml\n \u2514\u2500\u2500 targets\n \u251c\u2500\u2500 my_blinky_sim\n \u2502\u00a0\u00a0 \u251c\u 2500\u2500 pkg.yml\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 target.yml\n \u2514\u2500\u2500 unittest\n \u251c\u2500\u2500 pkg.yml\n \u2514\u2500\u2500 target.yml newt has installed the base files for a project comprising the following. file project.yml contains the repository list that the project uses to fetch\nits packages. Your project is a collection of repositories. In this case, the project just\ncomprises the core mynewt repository. Later you will add more repositories\nto include other mynewt components. the file apps/blinky/pkg.yml contains the description of your application\nand its package dependencies. A target directory containing my_blinky_sim , a target descriptor used to\nbuild a version of myproj. Use newt target show to see available build \ntargets. A non-build-able target called unittest . This is used\ninternally by newt and is not a formal build target. NOTE: the actual code and packag e files are not installed \n(except the template for main.c ). See the next step for installing the packages.", "title": "Newt New" }, { "location": "/os/get_started/project_create/#newt-install", - "text": "change into the myproj directory. Then ask newt to install all the \nproject package dependencies using newt install $ newt install -v \n apache-mynewt-core\n Downloading repository description for apache-mynewt-core... success!\n Downloading repository incubator-mynewt-core (branch: master; commit: mynewt_0_8_0_b2_tag) at https://github.com/apache/incubator-mynewt-core.git\n Cloning into /var/folders/7l/7b3w9m4n2mg3sqmgw2q1b9p80000gn/T/newt-repo969988348 ...\n remote: Counting objects: 17935, done.\n remote: Compressing objects: 100% (234/234), done.\n remote: Total 17935 (delta 101), reused 0 (delta 0), pack-reused 17686\n Receiving objects: 100% (17935/17935), 6.18 MiB | 315.00 KiB/s, done.\n Resolving deltas: 100% (10541/10541), done.\n Checking connectivity... done.\n apache-mynewt-core successfully installed version 0.7.9-none\n $ Now you will have installed packages required to build your project. Note in \n the package you now have dependent packages stored in the repos directory\nunder the specific repository you have included in the base project. .\n \u251c\u2500\u2500 apps\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 blinky\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n \u251c\u2500\u2500 repos\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 apache-mynewt-core\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 apps\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 compiler\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 fs\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 hw\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 libs\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 net\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 scripts\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 sys\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 targets\n \u2514\u2500\u2500 targets\n \u251c\u2500\u2500 my_blinky_sim\n \u2514\u2500\u2500 unittest Within each of these directories are the packages required to build your\nproject for the various targets.", + "text": "Change into the myproj directory. Then ask newt to install all the \nproject package dependencies using newt install . $ newt install -v \n apache-mynewt-core\n Downloading repository description for apache-mynewt-core... success!\n Downloading repository incubator-mynewt-core (branch: master; commit: mynewt_0_8_0_b2_tag) at https://github.com/apache/incubator-mynewt-core.git\n Cloning into /var/folders/7l/7b3w9m4n2mg3sqmgw2q1b9p80000gn/T/newt-repo969988348 ...\n remote: Counting objects: 17935, done.\n remote: Compressing objects: 100% (234/234), done.\n remote: Total 17935 (delta 101), reused 0 (delta 0), pack-reused 17686\n Receiving objects: 100% (17935/17935), 6.18 MiB | 315.00 KiB/s, done.\n Resolving deltas: 100% (10541/10541), done.\n Checking connectivity... done.\n apache-mynewt-core successfully installed version 0.7.9-none\n $ Now you will have installed packages required to build your project. Note in \nthe package you now have dependent packages stored in the repos directory\nunder the specific repository you have included in the base project. .\n \u251c\u2500\u2500 apps\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 blinky\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 src\n \u251c\u2500\u2500 repos\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 apache-mynewt-core\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 apps\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 compiler\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 fs\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 hw\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 libs\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 net\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 scripts\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 sys\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 targets\n \u2514\u2500\u2500 targets\n \u251c\u2500\u2500 my_blinky_sim\n \u2514\u2500\u2500 unittest Within each of these directories a re the packages required to build your\nproject for the various targets.", "title": "Newt Install" }, { @@ -172,12 +172,12 @@ }, { "location": "/os/get_started/project_create/#building-the-project", - "text": "To build the project you can use newt build using the target $ newt build my_blinky_sim\n App successfully built: /bin/my_blinky_sim/apps/blinky/blinky.elf You can run the simulated version of your project and see the simulated LED\nblink ./bin/my_blinky_sim/apps/blinky/blinky.elf\n hal_gpio set pin 1 to 0 Just do ctrl-c to exit.", + "text": "To build the project you can use newt build using the target $ newt build my_blinky_sim\n App successfully built: /bin/my_blinky_sim/apps/blinky/blinky.elf You can run the simulated version of your project and see the simulated LED\nblink ./bin/my_blinky_sim/apps/blinky/blinky.elf\n hal_gpio set pin 1 to 0 Just do ctrl-c to exit.", "title": "Building the Project" }, { "location": "/os/get_started/project_create/#complete", - "text": "Congratulations, you have created your first project. This project contains \nthe core OS, a simple application to blink an LED and all of the dependencies\nrequired.", + "text": "Congratulations, you have created your first project! This project contains \nthe core OS, a simple application to blink an LED and all of the dependencies\nrequired.", "title": "Complete" }, { @@ -337,7 +337,7 @@ }, { "location": "/os/tutorials/nRF52/", - "text": "Blinky on nRF52 board\n\n\nObjective\n\n\nDownload a generic firmware skeleton (\"bootstrap image\") that applies to any hardware and then throw in additional applicable pkgs to generate a build for a specific board, namely the\nnRF52 Series chip from Nordic Semiconductors.\n\n\nHardware needed\n\n\n\n\nnRF52 Development Kit\n\n\nLaptop running Mac OS\n\n\n\n\nStep by Step Instructions to build image\n\n\n\n\nThe first step is to download the generic skeleton of the project. The eggs installed are not hardware architecture specific.\n\n\n\n\n []\nuser@~/dev\n]\n$\n \nnewt\n \nnest\n \ncreate\n \nnordic_blinky\n\n \nDownloading\n \nnest\n \nskeleton\n \nfrom\n \nhttps\n:\n//www.github.com/mynewt/tadpole... ok!\n\n \nNest\n \nnordic_blinky\n \nsuccessfully\n \ncreated\n \nin\n \n~dev/nordic_blinky\n\n\n \nuser@~/dev$\n \ncd\n \nnordic_blinky/\n\n\n\n\n\n\n\n\nThen, the clutch of eggs named larva is added from the nest (also named larva) on the github. This step simply downloads the clutch description file and does not actually install the eggs that constitute the clutch. The clutch description file (\nclutch.yml\n) will be used to check dependencies during the egg install to ensure completeness. It serves as a reference for all the eggs in the clutch that one can choose from and install.\n\n\n\n\n []\nuser@~/dev/nordic_blinky\n]\n$\n \nnewt\n \nnest\n \nadd-clutch\n \nlarva\n \nhttps\n:\n//github.com/mynewt/larva\n\n \nDownloading\n \nclutch\n.\nyml\n \nfrom\n \nhttps\n:\n//github.com/mynewt/larva/master... ok!\n\n \nVerifying\n \nclutch\n.\nyml\n \nformat\n...\nok!\n\n \nClutch\n \nlarva\n \nsuccessfully\n \ninstalled\n \nto\n \nNest\n.\n\n\n\n\n\n\n\nThe next step is to install relevant eggs from the larva nest on github. The instructions assume that you know what application or project you are interested in (the blinky application, in this case), what hardware you are using (STM32F3D ISCOVERY board, in this case) and hence, what board support package you need. \n\n\n\n\n [\nuser@~/dev/nordic_blinky\n]\n$\n \nnewt\n \negg\n \ninstall\n \nproject/blinky\n \n \nDownloading\n \nlarva\n \nfrom\n \nhttps\n:\n//github.com/mynewt/larva//master... ok!\n\n \nInstalling\n \nproject/blinky\n\n \nInstallation\n \nwas\n \na\n \nsuccess!\n\n\n\n [\nuser@~/dev/nordic_blinky\n]\n$\n \nnewt\n \negg\n \ninstall\n \nhw/bsp/nrf52pdk\n\n \nDownloading\n \nlarva\n \nfrom\n \nhttps\n:\n//github.com/mynewt/larva//master... ok!\n\n \nInstalling\n \nhw/bsp/nrf52pdk\n\n \nInstalling\n \nhw/mcu/nordic/nrf52xxx\n\n \nInstalling\n \nlibs/cmsis-core\n\n \nInstalling\n \ncompiler/arm-none-eabi-m4\n\n \nInstallation\n \nwas\n \na\n \nsuccess!\n\n\n\n\n\n\n\n\nIt's time to create a target for the project and define the target attributes. \n\n\n\n\n [\nuser@~/dev/nordic_blinky\n]\n$\n \nnewt\n \ntarget\n \ncreate\n \nblink_nordic\n\n \nCreating\n \ntarget\n \nblink_nordic\n\n \nTarget\n \nblink_nordic\n \nsuccessfully\n \ncreated!\n\n [\nuser@~/dev/nordic_blinky\n]\n$\n \nnewt\n \ntarget\n \nset\n \nblink_nordic\n \nproject=blinky\n\n \nTarget\n \nblink_nordic\n \nsuccessfully\n \nset\n \nproject\n \nto\n \nblinky\n\n [\nuser@~/dev/nordic_blinky\n]\n$\n \nnewt\n \ntarget\n \nset\n \nblink_nordic\n \nbsp=hw/bsp/nrf52pdk\n\n \nTarget\n \nblink_nordic\n \nsuccessfully\n \nset\n \nbsp\n \nto\n \nhw/bsp/nrf52pdk\n\n [\nuser@~/dev/nordic_blinky\n]\n$\n \nnewt\n \ntarget\n \nset\n \nblink_nordic\n \ncompiler_def=debug\n\n \nTarget\n \nblink_nordic\n \nsuccessfully\n \nset\n \ncompiler_def\n \nto\n \ndebug\n\n [\nuser@~/dev/nordic_blinky\n]\n$\n \nnewt\n \ntarget\n \nset\n \nblink_nordic\n \ncompiler=arm-none-eabi-m4\n\n \nTarget\n \nblink_nordic\n \nsuccessfully\n \nset\n \ncompiler\n \nto\n \narm-none-eabi-m4\n\n [\nuser@~ /dev/nordic_blinky\n]\n$\n \nnewt\n \ntarget\n \nset\n \nblink_nordic\n \narch=cortex_m4\n\n \nTarget\n \nblink_nordic\n \nsuccessfully\n \nset\n \narch\n \nto\n \ncortex_m4\n\n [\nuser@~/dev/nordic_blinky\n]\n$\n \nnewt\n \ntarget\n \nshow\n\n \nblink_nordic\n\n \ncompiler\n: \narm-none-eabi-m4\n\n \nname\n: \nblink_nordic\n\n \narch\n: \ncortex_m4\n\n \nproject\n: \nblinky\n\n \nbsp\n: \nhw/bsp/nrf52pdk\n\n \ncompiler_def\n: \ndebug\n\n\n\n\n\n\n\n\nFinally, you get to build the target and generate an executable that can now be uploaded to the board via the on-board SEGGER J-Link debugger. \n\n\n\n\n [\nuser@~/dev/nordic_blinky\n]\n$\n \nnewt\n \ntarget\n \nbuild\n \nblink_nordic\n\n \nBuilding\n \ntarget\n \nblink_nordic\n (\nproject\n \n=\n \nblinky\n)\n \nCompiling\n \ncase\n.\nc\n\n \nCompiling\n \nsuite\n.\nc\n\n \nCompiling\n \ntestutil\n.\nc\n\n \ nCompiling\n \ntestutil_arch_arm\n.\nc\n\n \nArchiving\n \nlibtestutil\n.\na\n\n \nCompiling\n \nos\n.\nc\n\n \nCompiling\n \nos_callout\n.\nc\n\n \nCompiling\n \nos_eventq\n.\nc\n\n \nCompiling\n \nos_heap\n.\nc\n\n \nCompiling\n \nos_mbuf\n.\nc\n\n \nCompiling\n \nos_mempool\n.\nc\n\n \nCompiling\n \nos_mutex\n.\nc\n\n \nCompiling\n \nos_sanity\n.\nc\n\n \nCompiling\n \nos_sched\n.\nc\n\n \nCompiling\n \nos_sem\n.\nc\n\n \nCompiling\n \nos_task\n.\nc\n\n \nCompiling\n \nos_time\n.\nc\n\n \nCompiling\n \nos_arch_arm\n.\nc\n\n \nAssembling\n \nHAL_CM4\n.\ns\n\n \nAssembling\n \nSVC_Table\n.\ns\n\n \nArchiving\n \nlibos\n.\na\n\n \nCompiling\n \nhal_cputime\n.\nc\n\n \nCompiling\n \nhal_gpio\n.\nc\n\n \nCompiling\n \nhal_uart\n.\nc\n\n \nArchiving\n \nlibnrf52xxx\n.\na\n\n \nCompiling\n \ncmsis_nvic\n.\nc\n\n \nCompiling\n \n hal_bsp\n.\nc\n\n \nCompiling\n \nlibc_stubs\n.\nc\n\n \nCompiling\n \nos_bsp\n.\nc\n\n \nCompiling\n \nsbrk\n.\nc\n\n \nCompiling\n \nsystem_nrf52\n.\nc\n\n \nAssembling\n \ngcc_startup_nrf52\n.\ns\n\n \nArchiving\n \nlibnrf52pdk\n.\na\n\n \nCompiling\n \nmain\n.\nc\n\n \nBuilding\n \nproject\n \nblinky\n\n \nLinking\n \nblinky\n.\nelf\n\n \nSuccessfully\n \nrun!\n\n\n\n\n\n\n\n\n\n\nIn order to be able to communicate with the SEGGER J-Link debugger on the dev board, you have to download and install the J-Link GDB Server software on to your laptop. You may download the \"Software and documentation pack for Mac OS X\" from \nhttps://www.segger.com/jlink-software.html\n. The command line version of the server is used in the steps below. \n\n\n\n\n\n\nOpen a new terminal and start a J-Link session.\n\n\n\n\n\n\n [\nuser@~/dev/nordic_blinky/project/blinky/bin\n]\n$\n \nwhich\n \nJLinkGDBServer\n\n \n/us r/local/bin/JLinkGDBServer\n\n [\nuser@~/dev/nordic_blinky/project/blinky/bin\n]\n$\n \nJLinkGDBServer\n \n-\nif\n \nSWD\n\n \nSEGGER\n \nJ-Link\n \nGDB\n \nServer\n \nV5\n.02f\n \nCommand\n \nLine\n \nVersion\n\n\n \nJLinkARM\n.\ndll\n \nV5\n.02f\n (\nDLL\n \ncompiled\n \nOct\n \n2\n \n2015\n \n20\n:\n55\n:\n03\n)\n\n \n-----GDB\n \nServer\n \nstart\n \nsettings-----\n\n \nGDBInit\n \nfile\n: \nnone\n\n \nGDB\n \nServer\n \nListening\n \nport\n: \n2331\n\n \nSWO\n \nraw\n \noutput\n \nlistening\n \nport\n: \n2332\n\n \nTerminal\n \nI/O\n \nport\n: \n2333\n\n \nAccept\n \nremote\n \nconnection\n: \nyes\n\n \nGenerate\n \nlogfile\n: \noff\n\n \nVerify\n \ndownload\n: \noff\n\n \nInit\n \nregs\n \non\n \nstart\n: \noff\n\n \nSilent\n \nmode\n: \noff\n\n \nSingle\n \nrun\n \nmode\n: \noff\n\n \nTarget\n \nconnection\n \ntimeout\n: \n0\n \nms\n\n \n------J-Link\n \nrelated\n \nsettings------\n\n \nJ-Link\n \nHost\n \ninterface\n: \nUSB\n\n \nJ-Link\n \nscript\n: \nnone\n\n \nJ-Link\n \nsettings\n \nfile\n: \nnone\n\n \n------Target\n \nrelated\n \nsettings------\n\n \nTarget\n \ndevice\n: \nunspecified\n\n \nTarget\n \ninterface\n: \nSWD\n\n \nTarget\n \ninterface\n \nspeed\n: \n1000\nkHz\n\n \nTarget\n \nendian\n: \nlittle\n\n\n \nConnecting\n \nto\n \nJ-Link\n...\n \nJ-Link\n \nis\n \nconnected\n.\n \nFirmware\n: \nJ-Link\n \nOB-SAM3U128-V2-NordicSemi\n \ncompiled\n \nAug\n \n28\n \n2015\n \n19\n:\n26\n:\n24\n\n \nHardware\n: \nV1\n.00\n\n \nS/N\n: \n682371959\n\n \nChecking\n \ntarget\n \nvoltage\n...\n \nTarget\n \nvoltage\n: \n3.30\n \nV\n\n \nL istening\n \non\n \nTCP/IP\n \nport\n \n2331\n\n \nConnecting\n \nto\n \ntarget\n...\nConnected\n \nto\n \ntarget\n\n \nWaiting\n \nfor\n \nGDB\n \nconnection\n...\nConnected\n \nto\n \n127.0.0.1\n\n\n\n\n\n\n\n\nYou need a configuration file for the GDB session to be opened correctly and the image (\"blinky.elf\") you built for this target downloaded to flash. A sample config script is given below. Alternatively, you could choose to type each command at the gdb prompt.\n\n\n\n\n [\nuser@~/dev/nordic_blinky/project/blinky/bin/blink_nordic\n]\n$\n \ncat\n \njlink-gdb\n.\ncfg\n \n \necho\n \n***Setting\n \nup\n \nthe\n \nenvironment\n \nfor\n \ndebugging\n \ngdb\n.\n***\\n\n\n \nset\n \ncomplaints\n \n1\n\n \nset\n \nprompt\n (\ngdb\n) \n \nset\n \nendian\n \nlittle\n\n \necho\n \n\\n***\n \nSet\n \ntarget\n \ncharset\n \nASCII\\n\n\n \nset\n \ntarget-charset\n \nASCII\n\n \necho\n \n\\n***\n \nConnecting\n \nover\n \nport\n \n#\n2331\n \n***\\n\n\n \ntarget\n \nremote\n \nlocalhost\n:\n2331\n\n \necho\n \n\\n***\n \nEnable\n \nflash\n \nwrite\n \nand\n \nset\n \ndevice\n \nto\n \nnrf52\n \n***\\n\n\n \nmonitor\n \nflash\n \ndownload=\n1\n\n \nmonitor\n \nflash\n \ndevice=nRF52\n\n \necho\n \n\\n***\n \nloading\n \nblinky\n.\nelf\n \n***\\n\n\n \nload\n \n~/dev/nordic_blinky/project/blinky/bin/blink_nordic/blinky\n.\nelf\n \n \nsymbol-file\n \n~/dev/nordic_blinky/project/blinky/bin/blink_nordic/blinky\n.\nelf\n\n \necho\n \n\\n***\n \nResetting\n \ntarget\n \n***\\n\n\n \nmonitor\n \nreset\n\n \necho\n \n\\n***\n \nHalting\n \ntarget\n \n***\\n\n\n \nmonitor\n \nhalt\n\n\n\n\n\n\n\n\nStart the gdb session and monitor that it loads the image, resets the target, and halts for a command to continue. \n\n\n\n\n [\nuser@~/dev/nordic_blinky/project/blinky/bin/blink_nordic\n]\n$\n \narm-none-eabi-gd b\n \n-x\n \n~/dev/nordic_blinky/project/blinky/bin/blink_nordic/jlink-gdb\n.\ncfg\n\n\n \nGNU\n \ngdb\n (\nGNU\n \nTools\n \nfor\n \nARM\n \nEmbedded\n \nProcessors\n) \n7.8.0.20150604\n-cvs\n\n \nCopyright\n (\nC\n) \n2014\n \nFree\n \nSoftware\n \nFoundation\n, \nInc\n.\n \nLicense\n \nGPLv3+:\n \nGNU\n \nGPL\n \nversion\n \n3\n \nor\n \nlater\n \nhttp\n:\n//gnu.org/licenses/gpl.html\n\n \nThis\n \nis\n \nfree\n \nsoftware\n: \nyou\n \nare\n \nfree\n \nto\n \nchange\n \nand\n \nredistribute\n \nit\n.\n \nThere\n \nis\n \nNO\n \nWARRANTY\n, \nto\n \nthe\n \nextent\n \npermitted\n \nby\n \nlaw\n. \nType\n \nshow copying\n\n \nand\n \nshow warranty\n \nfor\n \ndetails\n.\n \nThis\n \nGDB\n \nwas\n \nconfigured\n \nas\n \n--host=x86_64-apple-darwin10 --target=arm-none-eabi\n.\n \nType\n \nshow configuration\n \nfor\n \nconfiguration\n \ndetails\n.\n \nFor\n \nbug\n \nreporting\n \ninstructions\n, \nplease\n \nsee\n:\n \nhttp\n:\n//www.gnu.org/software/gdb/bugs/\n.\n\n \nFind\n \nthe\n \nGDB\n \nmanual\n \nand\n \nother\n \ndocumentation\n \nresources\n \nonline\n \nat\n:\n \nhttp\n:\n//www.gnu.org/software/gdb/documentation/\n.\n\n \nFor\n \nhelp\n, \ntype\n \nhelp\n.\n \nType\n \napropos word\n \nto\n \nsearch\n \nfor\n \ncommands\n \nrelated\n \nto\n \nword\n.\n\n \n***Setting\n \nup\n \nthe\n \nenvironment\n \nfor\n \ndebugging\n \ngdb\n.\n***\n\n \nThe\n \ntarget\n \nis\n \nassumed\n \nto\n \nbe\n \nlittle\n \nendian\n\n\n \n***\n \nSet\n \ntarget\n \ncharset\n \nASCII\n\n\n \n***\n \nConnecting\n \nover\n \nport\n \n#\n2331\n \n***\n\n \n0x00003c34\n \nin\n \n??\n ()\n\n \n***\n \nEnable\n \nflash\n \nwrite\n \nand\n \nset\n \ndevice\n \nto\n \nnrf52\n \n***\n\n \nFlash\n \ndownload\n \nenabled\n\n \nSelecting\n \ndevice\n: \nnRF52\n\n\n \n***\n \nloading\n \nblinky\n.\nelf\n \n***\n\n \nLo ading\n \nsection\n .\ntext\n, \nsize\n \n0x5c84\n \nlma\n \n0x0\n\n \nLoading\n \nsection\n .\nARM\n.\nextab\n, \nsize\n \n0x24\n \nlma\n \n0x5c84\n\n \nLoading\n \nsection\n .\nARM\n.\nexidx\n, \nsize\n \n0xd8\n \nlma\n \n0x5ca8\n\n \nLoading\n \nsection\n .\ndata\n, \nsize\n \n0x8f8\n \nlma\n \n0x5d80\n\n \nStart\n \naddress\n \n0x48c\n, \nload\n \nsize\n \n26232\n\n \nTransfer\n \nrate\n: \n12808\n \nKB/sec\n, \n2914\n \nbytes/write\n.\n \nDuring\n \nsymbol\n \nreading\n, \nunexpected\n \noverlap\n \nbetween\n:\n (\nA\n) \nsection\n \n`\n.\ntext\n \nfrom\n \n`~/dev/nordic_blinky/project/blinky/bin/blink_nordic/blinky\n.\nelf\n [\n0x0\n, \n0x5c84\n)\n (\nB\n) \nsection\n \n`*COM*\n \nfrom\n \n`~/dev/nordic_blinky/project/blinky/bin/blink_nordic/blinky\n.\nelf\n [\n0x0\n, \n0x0\n).\n \nWill\n \nignore\n \nsection\n \nB\n.\n\n \n***\n \nResetting\n \ntarget\n \n***\n\n \nResetting\n \ntarget\n\n\n \n***\n \nHalting\n \ntarget\n \n***\n\n\n\n\n\n\n\n\nType 'c' to continue. The LED on the board will start to blink. You will also see some activity in the terminal showing the open J-Link GDB server connection. The LED will continue to blink after you quit out of that connection.\n\n\n\n\n (\ngdb\n) \nc\n\n \nContinuing\n.", + "text": "Blinky on nRF52 board\n\n\nObjective\n\n\nDownload a generic firmware skeleton (\"bootstrap image\") that applies to any hardware and then throw in additional applicable pkgs to generate a build for a specific board, namely the\nnRF52 Series chip from Nordic Semiconductors.\n\n\nHardware needed\n\n\n\n\nnRF52 Development Kit\n\n\nLaptop running Mac OS\n\n\nIt is assumed you have already installed newt tool. \n\n\nIt is assumed you already installed native tools as described \nhere\n\n\n\n\nInstall jlinkEXE\n\n\nIn order to be able to communicate with the SEGGER J-Link debugger on the dev board, you have to download and install the J-Link GDB Server software on to your laptop. You may download the \"Software and documentation pack for Mac OS X\" from \nhttps://www.segger.com/jlink-software.html\n. \n\n\nCreate a project.\n\n\nCreate a new project to hold your work. For a deeper understanding, you can read about project creation in \n\nGet Started -- Creating You r First Project\n\nor just follow the commands below.\n\n\n $ mkdir ~/dev\n $ cd ~/dev\n $ newt new myproj\n Downloading project skeleton from apache/incubator-mynewt-blinky...\n Installing skeleton in myproj...\n Project myproj successfully created.\n\n $ cd myproj\n\n $ newt install -v \n apache-mynewt-core\n Downloading repository description for apache-mynewt-core... success!\n ...\n apache-mynewt-core successfully installed version 0.7.9-none\n\n\n\n\n\nCreate the target\n\n\nCreate a single target for the nrf52. NOTE: The nrf52 mynewt core does not\nyet have bootloader support, so we will create a single image to download\nto the device.\n\n\n$ newt target create blink_nordic\n$ newt target set blink_nordic app=apps/blinky\n$ newt target set blink_nordic bsp=@apache-mynewt-core/hw/bsp/nrf52pdk\n$ newt target set blink_nordic build_profile=debug\n$ newt target show \ntargets/blink_nordic\n app=apps/blinky\n bsp=@apache-mynewt-core/hw/b sp/nrf52pdk\n build_profile=debug\n\n\n\n\n\nBuild the image\n\n\n$ newt build blink_nordic\n...\nCompiling main.c\nArchiving blinky.a\nLinking blinky.elf\nApp successfully built: ~/dev/myproj/bin/blink_nordic/apps/blinky/blinky.elf\n\n\n\n\n\nConnect the board\n\n\nConnect the evaluation board via micro-USB to your PC via USB cable.\n\n\nDownload to the target\n\n\nDownload the executable to the target platform.\n\n\n$ newt -v load blink_nordic\n\n\n\n\n\nCongratulations\n\n\nYou have created, setup, compiled, loaded, and ran your first mynewt application\nfor the nrf52 evaluation board.", "title": "Blinky on nRF52" }, { @@ -352,17 +352,47 @@ }, { "location": "/os/tutorials/nRF52/#hardware-needed", - "text": "nRF52 Development Kit Laptop running Mac OS", + "text": "nRF52 Development Kit Laptop running Mac OS It is assumed you have already installed newt tool. It is assumed you already installed native tools as described here", "title": "Hardware needed" }, { - "location": "/os/tutorials/nRF52/#step-by-step-instructions-to-build-image", - "text": "The first step is to download the generic skeleton of the project. The eggs installed are not hardware architecture specific. [] user@~/dev ] $ newt nest create nordic_blinky \n Downloading nest skeleton from https : //www.github.com/mynewt/tadpole... ok! \n Nest nordic_blinky successfully created in ~dev/nordic_blinky \n\n user@~/dev$ cd nordic_blinky/ Then, the clutch of eggs named larva is added from the nest (also named larva) on the github. This step simply downloads the clutch description file and does not actually install the eggs that constitute the clutch. The clutch description file ( clutch.yml ) will be used to check dependencies during the egg install to ensure completeness. It serves as a reference for all the eggs in the clutch that one can choose from and install. [] user@~/dev/nordic_blinky ] $ newt nest add-clutch larva https : //github.com/mynewt/larva \n Downloading clutch . yml from https : //github.com/mynewt/larva/master... ok! \n Verifying clutch . yml format ... ok! \n Clutch larva successfully installed to Nest . The next step is to install relevant eggs from the larva nest on github. The instructions assume that you know what application or project you are interested in (the blinky application, in this case), what hardware you are using (STM32F3DISCOVERY board, in this case) and hence, what board support package you need. [ user@~/dev/nordic_blinky ] $ newt egg install project/blinky \n Downloading larva from https : //github.com/mynewt/larva//master... ok! \n Installing project/blinky \n Installation was a success! \n\n\n [ user@~/dev/nordic_blinky ] $ newt egg install hw/bsp/nrf52pdk \n Downloading larva from https : //github.com/mynewt/larva//master... ok! \n Installing hw/bsp/nrf52pd k \n Installing hw/mcu/nordic/nrf52xxx \n Installing libs/cmsis-core \n Installing compiler/arm-none-eabi-m4 \n Installation was a success! It's time to create a target for the project and define the target attributes. [ user@~/dev/nordic_blinky ] $ newt target create blink_nordic \n Creating target blink_nordic \n Target blink_nordic successfully created! \n [ user@~/dev/nordic_blinky ] $ newt target set blink_nordic project=blinky \n Target blink_nordic successfully set project to blinky \n [ user@~/dev/nordic_blinky ] $ newt target set blink_nordic bsp=hw/bsp/nrf52pdk \n Target blink_nordic successfully set bsp to hw/bsp/nrf52pdk \n [ user@~/dev/nordic_blinky ] $ newt target set blink_nordic compiler_def=debug \n Target blink_nordic successfully set compiler_def to debug \n [ user@~/dev/nordic_blinky ] $ newt target set blink_nordic compiler=arm-none-eabi-m4 \n Target blink_nordic successfully set compiler to arm-none-eabi-m4 \n [ user@~/dev/nordic_blinky ] $ newt target set blink_nordic arch=cortex_m4 \n Target blink_nordic successfully set arch to cortex_m4 \n [ user@~/dev/nordic_blinky ] $ newt target show \n blink_nordic \n compiler : arm-none-eabi-m4 \n name : blink_nordic \n arch : cortex_m4 \n project : blinky \n bsp : hw/bsp/nrf52pdk \n compiler_def : debug Finally, you get to build the target and generate an executable that can now be uploaded to the board via the on-board SEGGER J-Link debugger. [ user@~/dev/nordic_blinky ] $ newt target build blink_nordic \n Building target blink_nordic ( project = blinky )\n Compiling case . c \ n Compiling suite . c \n Compiling testutil . c \n Compiling testutil_arch_arm . c \n Archiving libtestutil . a \n Compiling os . c \n Compiling os_callout . c \n Compiling os_eventq . c \n Compiling os_heap . c \n Compiling os_mbuf . c \n Compiling os_mempool . c \n Compiling os_mutex . c \n Compiling os_sanity . c \n Compiling os_sched . c \n Compiling os_sem . c \n Compiling os_task . c \n Compiling os_time . c \n Compiling os_arch_arm . c \n Assembling HAL_CM4 . s \n Assembling SVC_Table . s \n Archiving libos . a \n Compiling hal_cputime . c \n Compiling hal_gpio . c \n Compiling hal_uart . c \n Archiving libnrf52xxx . a \n Compiling cmsis_nvic . c \n Compiling hal_bsp . c \n Compiling libc_stubs . c \n C ompiling os_bsp . c \n Compiling sbrk . c \n Compiling system_nrf52 . c \n Assembling gcc_startup_nrf52 . s \n Archiving libnrf52pdk . a \n Compiling main . c \n Building project blinky \n Linking blinky . elf \n Successfully run! In order to be able to communicate with the SEGGER J-Link debugger on the dev board, you have to download and install the J-Link GDB Server software on to your laptop. You may download the \"Software and documentation pack for Mac OS X\" from https://www.segger.com/jlink-software.html . The command line version of the server is used in the steps below. Open a new terminal and start a J-Link session. [ user@~/dev/nordic_blinky/project/blinky/bin ] $ which JLinkGDBServer \n /usr/local/bin/JLinkGDBServer \n [ user@~/dev/nordic_blinky/project/blinky/bin ] $ JLinkGDBServer - if SWD \n SEGGER J-Link GDB Server V5 .02f Command Line Version \n\n JLinkARM . dll V5 .02f ( DLL compiled Oct 2 2015 20 : 55 : 03 )\n\n -----GDB Server start settings----- \n GDBInit file : none \n GDB Server Listening port : 2331 \n SWO raw output listening port : 2332 \n Terminal I/O port : 2333 \n Accept remote connection : yes \n Generate logfile : off \n Verify download : off \n Init regs on start : off \n Silent mode : off \n Single run mode : off \n Target connection timeout : 0 ms \n ------J-Link related settings------ \n J-Link Host interface : USB \n J-Link script : none \n J-Link settings file : none \n ------Target related sett ings------ \n Target device : unspecified \n Target interface : SWD \n Target interface speed : 1000 kHz \n Target endian : little \n\n Connecting to J-Link ...\n J-Link is connected .\n Firmware : J-Link OB-SAM3U128-V2-NordicSemi compiled Aug 28 2015 19 : 26 : 24 \n Hardware : V1 .00 \n S/N : 682371959 \n Checking target voltage ...\n Target voltage : 3.30 V \n Listening on TCP/IP port 2331 \n Connecting to target ... Connected to target \n Waiting for GDB connection ... Connected to 127.0.0.1 You need a configuration file for the GDB session to be opened correctly and the image (\"blinky.elf\") you built for this target downloaded to flash. A sample config script is given below. Alternatively, you could choose to type each command at the gdb prom pt. [ user@~/dev/nordic_blinky/project/blinky/bin/blink_nordic ] $ cat jlink-gdb . cfg \n echo ***Setting up the environment for debugging gdb . ***\\n \n set complaints 1 \n set prompt ( gdb ) \n set endian little \n echo \\n*** Set target charset ASCII\\n \n set target-charset ASCII \n echo \\n*** Connecting over port # 2331 ***\\n \n target remote localhost : 2331 \n echo \\n*** Enable flash write and set device to nrf52 ***\\n \n monitor flash download= 1 \n monitor flash device=nRF52 \n echo \\n*** loading blinky . elf ***\\n \n load ~/dev/nordic_blinky/project/blinky/bin/blink_nordic/blinky . elf \n symbol-file ~/dev/nordic_blinky/project/blinky/bin/blink_nordic/blinky . elf \n echo \\n*** Resetting target ***\\n \n m onitor reset \n echo \\n*** Halting target ***\\n \n monitor halt Start the gdb session and monitor that it loads the image, resets the target, and halts for a command to continue. [ user@~/dev/nordic_blinky/project/blinky/bin/blink_nordic ] $ arm-none-eabi-gdb -x ~/dev/nordic_blinky/project/blinky/bin/blink_nordic/jlink-gdb . cfg \n\n GNU gdb ( GNU Tools for ARM Embedded Processors ) 7.8.0.20150604 -cvs \n Copyright ( C ) 2014 Free Software Foundation , Inc .\n License GPLv3+: GNU GPL version 3 or later http : //gnu.org/licenses/gpl.html \n This is free software : you are free to change and redistribute it .\n There is NO WARRANTY , to the extent permitted by law . Type show copying \n and show warranty for details .\n This GDB was configured as --host=x86_64-apple-darwin10 --target =arm-none-eabi .\n Type show configuration for configuration details .\n For bug reporting instructions , please see :\n http : //www.gnu.org/software/gdb/bugs/ . \n Find the GDB manual and other documentation resources online at :\n http : //www.gnu.org/software/gdb/documentation/ . \n For help , type help .\n Type apropos word to search for commands related to word .\n\n ***Setting up the environment for debugging gdb . *** \n The target is assumed to be little endian \n\n *** Set target charset ASCII \n\n *** Connecting over port # 2331 *** \n 0x00003c34 in ?? ()\n\n *** Enable flash write and set device to nrf52 *** \n Flash download enabled \n Selecting device : nRF52 \n\n *** loading blinky . elf *** \n Loadin g section . text , size 0x5c84 lma 0x0 \n Loading section . ARM . extab , size 0x24 lma 0x5c84 \n Loading section . ARM . exidx , size 0xd8 lma 0x5ca8 \n Loading section . data , size 0x8f8 lma 0x5d80 \n Start address 0x48c , load size 26232 \n Transfer rate : 12808 KB/sec , 2914 bytes/write .\n During symbol reading , unexpected overlap between :\n ( A ) section ` . text from `~/dev/nordic_blinky/project/blinky/bin/blink_nordic/blinky . elf [ 0x0 , 0x5c84 )\n ( B ) section `*COM* from `~/dev/nordic_blinky/project/blinky/bin/blink_nordic/blinky . elf [ 0x0 , 0x0 ).\n Will ignore section B .\n\n *** Resetting target *** \n Resetting target \n\n *** Halting target *** Type 'c' to continue. The LED on the board will start to blink. You will also see some activity in the terminal showing the open J-Link GDB server connection. The LED will continue to blink after you quit out of that connection. ( gdb ) c \n Continuing .", - "title": "Step by Step Instructions to build image" + "location": "/os/tutorials/nRF52/#install-jlinkexe", + "text": "In order to be able to communicate with the SEGGER J-Link debugger on the dev board, you have to download and install the J-Link GDB Server software on to your laptop. You may download the \"Software and documentation pack for Mac OS X\" from https://www.segger.com/jlink-software.html .", + "title": "Install jlinkEXE" + }, + { + "location": "/os/tutorials/nRF52/#create-a-project", + "text": "Create a new project to hold your work. For a deeper understanding, you can read about project creation in Get Started -- Creating Your First Project \nor just follow the commands below. $ mkdir ~/dev\n $ cd ~/dev\n $ newt new myproj\n Downloading project skeleton from apache/incubator-mynewt-blinky...\n Installing skeleton in myproj...\n Project myproj successfully created.\n\n $ cd myproj\n\n $ newt install -v \n apache-mynewt-core\n Downloading repository description for apache-mynewt-core... success!\n ...\n apache-mynewt-core successfully installed version 0.7.9-none", + "title": "Create a project." + }, + { + "location": "/os/tutorials/nRF52/#create-the-target", + "text": "Create a single target for the nrf52. NOTE: The nrf52 mynewt core does not\nyet have bootloader support, so we will create a single image to download\nto the device. $ newt target create blink_nordic\n$ newt target set blink_nordic app=apps/blinky\n$ newt target set blink_nordic bsp=@apache-mynewt-core/hw/bsp/nrf52pdk\n$ newt target set blink_nordic build_profile=debug\n$ newt target show \ntargets/blink_nordic\n app=apps/blinky\n bsp=@apache-mynewt-core/hw/bsp/nrf52pdk\n build_profile=debug", + "title": "Create the target" + }, + { + "location": "/os/tutorials/nRF52/#build-the-image", + "text": "$ newt build blink_nordic\n...\nCompiling main.c\nArchiving blinky.a\nLinking blinky.elf\nApp successfully built: ~/dev/myproj/bin/blink_nordic/apps/blinky/blinky.elf", + "title": "Build the image" + }, + { + "location": "/os/tutorials/nRF52/#connect-the-board", + "text": "Connect the evaluation board via micro-USB to your PC via USB cable.", + "title": "Connect the board" + }, + { + "location": "/os/tutorials/nRF52/#download-to-the-target", + "text": "Download the executable to the target platform. $ newt -v load blink_nordic", + "title": "Download to the target" + }, + { + "location": "/os/tutorials/nRF52/#congratulations", + "text": "You have created, setup, compiled, loaded, and ran your first mynewt application\nfor the nrf52 evaluation board.", + "title": "Congratulations" }, { "location": "/os/tutorials/arduino_zero/", - "text": "Running Mynewt on Arduino Zero\n\n\nThis tutorial describes how to run Mynewt OS on Arduino Zero. \n\n\nPrerequisites\n\n\nBefore tackling this tutorial, it's best to read about Mynewt in the \nIntroduction\n section of this documentation.\n\n\nEquipment\n\n\nYou will need the following equipment\n\n\n\n\nAn Arduino Zero board. NOTE: There are many flavors of Arduino. Ensure that \nyou have an Arduino Zero. See below for the verions of Arduino Zero that are\ncompatible with this tutorial\n\n\nA computer that can connect to the Arduino Zero over USB\n\n\nA USB cable (Type A to micro B) that can connect the computer to the Arduino\n\n\nThe Mynewt Release\n\n\n\n\nArduino Boards\n\n\nThis tutorial has been tested on the following two Arduino Zero boards.\n\n\n\n\n\n\nSteps\n\n\nFollow these simple steps and your board will be blinking in no time!\n\n\nInstall Mynewt and Newt\n\n\nIf you have not already done so, install Newt as shown in the \nNewt install tutoria l\n and cloned the Mynewt OS repository as shown in the \nGet Started tutorial for Blinky\n\n\nFetch External Packages for Atmel SAMD21\n\n\nMynewt uses source code provided directly from the chip manufacturer for \nlow level operations. This code is licensed only for Atmel parts, and \ncannot live in the Apache Mynewt repository. Fetch the package from \nthe runtime github repository.\n\n\nTo fetch the package from the runtime git repository, you need to add \nthe repository to the \nproject.yml\n file in your base project directory.\n\n\nHere is an example \nproject.yml\n file with the Arduino Zero repository\nadded:\n\n\n$ more project.yml \nproject.name: \nmy_project\n\n\nproject.repositories:\n - apache-mynewt-core\n - mynewt_arduino_zero\n\nrepository.apache-mynewt-core:\n type: github\n vers: 0-latest\n user: apache\n repo: incubator-mynewt-core\n\nrepository.mynewt_arduino_zero:\n type: github\n vers: 0-latest\n user: runtimeinc\n repo: mynewt_a rduino_zero\n$ \n\n\n\n\n\nIn the above, the sections with \nmynewt_arduino_zero\n need to be added to \nyour project file.\n\n\nOnce you've edited your \nproject.yml\n file, the next step is to install the \nproject dependencies, this can be done with the \nnewt install\n command \n(to see more output, provide the \n-v\n verbose option.): \n\n\n$ newt install \napache-mynewt-core\nmynewt_arduino_zero\n$\n\n\n\n\n\nCreate your bootloader Target\n\n\nNext, you need to tell Newt what to build. For the Arduino Zero, we are going to \ngenerate both a bootloader, and an image target.\n\n\nTo generate the bootloader target, you need to specify the following options:\n\n\n$ newt target create arduino_boot \nTarget targets/arduino_boot successfully created\n$ newt target set arduino_boot bsp=@mynewt_arduino_zero/hw/bsp/arduino_zero \nTarget targets/arduino_boot successfully set target.bsp to @mynewt_arduino_zero/hw/bsp/arduino_zero\n$ newt target set arduino_boot app=@apache-mynewt-core/ap ps/boot \nTarget targets/arduino_boot successfully set target.app to @apache-mynewt-core/apps/boot\n$ newt target set arduino_boot features=arduino_zero_pro \nTarget targets/arduino_boot successfully set pkg.features to arduino_zero_pro\n\n\n\n\n\nThese commands do a few things: \n\n\n\n\nCreate a target named \narduino_boot\n, in order to build the Arduino Zero Bootloader.\n\n\nSet the application for the \narduino_boot\n target to the default Apache Mynewt \n bootloader (\n@apache-mynewt-core/apps/boot\n)\n\n\nSet the board support package for the target to \n \n@mynewt_arduino_zero/hw/bsp/arduino_zero\n. This is a reference to the downloaded \n Arduino Zero support from Github.\n\n\nTells the Board Support Package to enable support for the Arduino Zero Pro, and not \n the Arduino Zero. This is done through setting a build feature. If you are building \n for an Arduino Zero, and not a Zero Pro, this feature should be set to \narduino_zero\n.\n\n\n\n\nOnce you've configured the bootloader target, the next step is to build the bootloader for\nyour Arduino, you can do this by using the \nnewt build\n command:\n\n\n$ newt build arduino_boot \nCompiling asprintf.c\nCompiling atoi.c\nCompiling atol.c\nCompiling atoll.c\nCompiling bsearch.c\nCompiling bzero.c\nCompiling calloc.c\nCompiling fgets.c\nCompiling inline.c\n\nsnip\n\nApp successfully built: myproject/bin/arduino_boot/apps/boot/boot.elf\n\n\n\n\n\nIf this command finishes successfully, you have successfully built the Arduino \nbootloader, and the next step is to build your application for the Arduino \nboard.\n\n\nTo create and download your application, you create another target, this one pointing\nto the application you want to download to the Arduino board. In this tutorial, \nwe will use the default application that comes with your project, \napps/blinky\n:\n\n\n$ newt target create arduino_blinky \nTarget targets/arduino_blinky successfully created\n$ newt target set arduino_blinky app=apps/blinky \nTarget targets/arduino_blinky successfully set target.app to apps/blinky\n$ newt target set arduino_blinky bsp=@mynewt_arduino_zero/hw/bsp/arduino_zero\nTarget targets/arduino_blinky successfully set target.bsp to @mynewt_arduino_zero/hw/bsp/arduino_zero\n$ newt target set arduino_blinky build_profile=debug \nTarget targets/arduino_blinky successfully set target.build_profile to debug\n$ newt target set arduino_blinky features=arduino_zero_pro \nTarget targets/arduino_blinky successfully set pkg.features to arduino_zero_pro\n$ \n\n\n\n\n\nYou can now build the target, with \nnewt build\n: \n\n\n$ newt build arduino_blinky \nCompiling main.c\nArchiving blinky.a\nCompiling cons_fmt.c\nCompiling cons_tty.c\nArchiving full.a\nCompiling case.c\nCompiling suite.c\nCompiling testutil.c\nArchiving testutil.a\n\nsnip\n\nApp successfully built: myproject/bin/arduino_blinky/apps/blinky/blinky.elf\n\n\n\n\n\nCongratulations! You have successfully built your application, now it's \ntime to load the bootloader and application onto the target.\n\n\nConnect the Target\n\n\nConnect your computer to the Arduino Zero (from now on we'll call this the \ntarget) with the Micro-USB cable through the Programming Port as shown below. \nMynewt will download and debug the target through this port. You should see a \nlittle green LED come on. That means the board has power.\n\n\nNo external debugger is required. The Arduino Zero comes with an internal\ndebugger that can be accessed by Mynewt.\n\n\nA image below shows the Arduino Zero Programming Port.\n\n\n\n\n\n\nDownload the Bootloader\n\n\nExecute the command to download the bootloader. \n\n\n \n$\n \nnewt\n \nload\n \narduino_boot\n\n\n\n\n\n\nIf the newt tool finishes without error, that means the bootloader has been \nsuccessfully loaded onto the target.\n\n\nRun the Image\n\n\nNow that the bootloader is downloaded to the target, the next step is to load \nyour image onto the Arduino Zero. The easiest way t o do this, is to use the \n\nnewt run\n command. \nnewt run\n will automatically rebuild your program\n(if necessary), create an image, and load it onto the target device.\n\n\nHere, we will load our \narduino_blinky\n target onto the device, and we \nshould see it run:\n\n\n$ newt run arduino_blinky 0.0.0 \nDebugging myproject/bin/arduino_blinky/apps/blinky/blinky.elf\nOpen On-Chip Debugger 0.9.0 (2015-09-23-21:46)\nLicensed under GNU GPL v2\nFor bug reports, read\n http://openocd.org/doc/doxygen/bugs.html\nInfo : only one transport option; autoselect \nswd\n\nadapter speed: 500 kHz\nadapter_nsrst_delay: 100\ncortex_m reset_config sysresetreq\nInfo : CMSIS-DAP: SWD Supported\nInfo : CMSIS-DAP: JTAG Supported\nInfo : CMSIS-DAP: Interface Initialised (SWD)\nInfo : CMSIS-DAP: FW Version = 01.1F.0118\nInfo : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 1 TDO = 1 nTRST = 0 nRESET = 1\nInfo : CMSIS-DAP: Interface ready\nInfo : clock speed 500 kHz\nInfo : SWD IDCODE 0x0bc11477\nInfo : at91samd2 1g18.cpu: hardware has 4 breakpoints, 2 watchpoints\nGNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150604-cvs\nCopyright (C) 2014 Free Software Foundation, Inc.\nLicense GPLv3+: GNU GPL version 3 or later \nhttp://gnu.org/licenses/gpl.html\n\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \nshow copying\n\nand \nshow warranty\n for details.\nThis GDB was configured as \n--host=x86_64-apple-darwin10 --target=arm-none-eabi\n.\nType \nshow configuration\n for configuration details.\nFor bug reporting instructions, please see:\n\nhttp://www.gnu.org/software/gdb/bugs/\n.\nFind the GDB manual and other documentation resources online at:\n\nhttp://www.gnu.org/software/gdb/documentation/\n.\nFor help, type \nhelp\n.\nType \napropos word\n to search for commands related to \nword\n...\nReading symbols from myproject/bin/arduino_blinky/apps/blinky/blinky.elf...done.\ntarget state: halted\ntarget halted due to debug-request, current mode: Thread \nxPSR: 0x21000000 pc: 0x0000030e msp: 0x20008000\nInfo : accepting \ngdb\n connection on tcp/3333\nInfo : SAMD MCU: SAMD21G18A (256KB Flash, 32KB RAM)\n0x0000030e in ?? ()\n(gdb) r\nThe \nremote\n target does not support \nrun\n. Try \nhelp target\n or \ncontinue\n.\n(gdb) c\nContinuing.\n\n\n\n\n\nNOTE:\n The 0.0.0 specified after the target name to newt run, is the version \nof the image to load. If you are not providing remote upgrade, and are just \ndeveloping locally, you can provide 0.0.0 for every image version.\n\n\nIf you want the image to run without the debugger connected, simply quit the \ndebugger and restart the board. The image you programmed will come and run on the \nArduino on next boot! \n\n\nWatch the LED blink\n\n\nCongratulations! You have created a Mynewt operating system running on the \nArduino Zero. The LED right next to the power LED should be blinking. It is toggled by one task running on the Mynewt OS.", + "text": "Running Mynewt on Arduino Zero\n\n\nThis tutorial describes how to run Mynewt OS on Arduino Zero. \n\n\nPrerequisites\n\n\nBefore tackling this tutorial, it's best to read about Mynewt in the \nIntroduction\n section of this documentation.\n\n\nEquipment\n\n\nYou will need the following equipment\n\n\n\n\nAn Arduino Zero board. NOTE: There are many flavors of Arduino. Ensure that \nyou have an Arduino Zero. See below for the verions of Arduino Zero that are\ncompatible with this tutorial\n\n\nA computer that can connect to the Arduino Zero over USB\n\n\nA USB cable (Type A to micro B) that can connect the computer to the Arduino\n\n\nThe Mynewt Release\n\n\n\n\nArduino Boards\n\n\nThis tutorial has been tested on the following two Arduino Zero boards.\n\n\n\n\n\n\nSteps\n\n\nFollow these simple steps and your board will be blinking in no time!\n\n\nInstall Mynewt and Newt\n\n\nIf you have not already done so, install Newt as shown in the \nNewt install tutoria l\n and cloned the Mynewt OS repository as shown in the \nGet Started tutorial for Sim Blinky\n\n\nFetch External Packages for Atmel SAMD21\n\n\nMynewt uses source code provided directly from the chip manufacturer for \nlow level operations. This code is licensed only for Atmel parts, and \ncannot live in the Apache Mynewt repository. Fetch the package from \nthe runtime github repository.\n\n\nTo fetch the package from the runtime git repository, you need to add \nthe repository to the \nproject.yml\n file in your base project directory.\n\n\nHere is an example \nproject.yml\n file with the Arduino Zero repository\nadded:\n\n\n$ more project.yml \nproject.name: \nmy_project\n\n\nproject.repositories:\n - apache-mynewt-core\n - mynewt_arduino_zero\n\nrepository.apache-mynewt-core:\n type: github\n vers: 0-latest\n user: apache\n repo: incubator-mynewt-core\n\nrepository.mynewt_arduino_zero:\n type: github\n vers: 0-latest\n user: runtimeinc\n repo: myne wt_arduino_zero\n$ \n\n\n\n\n\nIn the above, the sections with \nmynewt_arduino_zero\n need to be added to \nyour project file.\n\n\nOnce you've edited your \nproject.yml\n file, the next step is to install the \nproject dependencies, this can be done with the \nnewt install\n command \n(to see more output, provide the \n-v\n verbose option.): \n\n\n$ newt install \napache-mynewt-core\nmynewt_arduino_zero\n$\n\n\n\n\n\nCreate your bootloader Target\n\n\nNext, you need to tell Newt what to build. For the Arduino Zero, we are going to \ngenerate both a bootloader, and an image target.\n\n\nTo generate the bootloader target, you need to specify the following options:\n\n\n$ newt target create arduino_boot \nTarget targets/arduino_boot successfully created\n$ newt target set arduino_boot bsp=@mynewt_arduino_zero/hw/bsp/arduino_zero \nTarget targets/arduino_boot successfully set target.bsp to @mynewt_arduino_zero/hw/bsp/arduino_zero\n$ newt target set arduino_boot app=@apache-mynewt-cor e/apps/boot \nTarget targets/arduino_boot successfully set target.app to @apache-mynewt-core/apps/boot\n$ newt target set arduino_boot features=arduino_zero_pro \nTarget targets/arduino_boot successfully set pkg.features to arduino_zero_pro\n\n\n\n\n\nThese commands do a few things: \n\n\n\n\nCreate a target named \narduino_boot\n, in order to build the Arduino Zero Bootloader.\n\n\nSet the application for the \narduino_boot\n target to the default Apache Mynewt \n bootloader (\n@apache-mynewt-core/apps/boot\n)\n\n\nSet the board support package for the target to \n \n@mynewt_arduino_zero/hw/bsp/arduino_zero\n. This is a reference to the downloaded \n Arduino Zero support from Github.\n\n\nTells the Board Support Package to enable support for the Arduino Zero Pro, and not \n the Arduino Zero. This is done through setting a build feature. If you are building \n for an Arduino Zero, and not a Zero Pro, this feature should be set to \narduino_zero\n.\n\n\n\n\nOnce you 've configured the bootloader target, the next step is to build the bootloader for\nyour Arduino, you can do this by using the \nnewt build\n command:\n\n\n$ newt build arduino_boot \nCompiling asprintf.c\nCompiling atoi.c\nCompiling atol.c\nCompiling atoll.c\nCompiling bsearch.c\nCompiling bzero.c\nCompiling calloc.c\nCompiling fgets.c\nCompiling inline.c\n\nsnip\n\nApp successfully built: myproject/bin/arduino_boot/apps/boot/boot.elf\n\n\n\n\n\nIf this command finishes successfully, you have successfully built the Arduino \nbootloader, and the next step is to build your application for the Arduino \nboard.\n\n\nTo create and download your application, you create another target, this one pointing\nto the application you want to download to the Arduino board. In this tutorial, \nwe will use the default application that comes with your project, \napps/blinky\n:\n\n\n$ newt target create arduino_blinky \nTarget targets/arduino_blinky successfully created\n$ newt target set arduino_bl inky app=apps/blinky \nTarget targets/arduino_blinky successfully set target.app to apps/blinky\n$ newt target set arduino_blinky bsp=@mynewt_arduino_zero/hw/bsp/arduino_zero\nTarget targets/arduino_blinky successfully set target.bsp to @mynewt_arduino_zero/hw/bsp/arduino_zero\n$ newt target set arduino_blinky build_profile=debug \nTarget targets/arduino_blinky successfully set target.build_profile to debug\n$ newt target set arduino_blinky features=arduino_zero_pro \nTarget targets/arduino_blinky successfully set pkg.features to arduino_zero_pro\n$ \n\n\n\n\n\nYou can now build the target, with \nnewt build\n: \n\n\n$ newt build arduino_blinky \nCompiling main.c\nArchiving blinky.a\nCompiling cons_fmt.c\nCompiling cons_tty.c\nArchiving full.a\nCompiling case.c\nCompiling suite.c\nCompiling testutil.c\nArchiving testutil.a\n\nsnip\n\nApp successfully built: myproject/bin/arduino_blinky/apps/blinky/blinky.elf\n\n\n\n\n\nCongratulations! You have successfully built your application, now it's \ntime to load the bootloader and application onto the target.\n\n\nConnect the Target\n\n\nConnect your computer to the Arduino Zero (from now on we'll call this the \ntarget) with the Micro-USB cable through the Programming Port as shown below. \nMynewt will download and debug the target through this port. You should see a \nlittle green LED come on. That means the board has power.\n\n\nNo external debugger is required. The Arduino Zero comes with an internal\ndebugger that can be accessed by Mynewt.\n\n\nA image below shows the Arduino Zero Programming Port.\n\n\n\n\n\n\nDownload the Bootloader\n\n\nExecute the command to download the bootloader. \n\n\n \n$\n \nnewt\n \nload\n \narduino_boot\n\n\n\n\n\n\nIf the newt tool finishes without error, that means the bootloader has been \nsuccessfully loaded onto the target.\n\n\nRun the Image\n\n\nNow that the bootloader is downloaded to the target, the next step is to load \nyour image onto the Arduino Zero. The easiest w ay to do this, is to use the \n\nnewt run\n command. \nnewt run\n will automatically rebuild your program\n(if necessary), create an image, and load it onto the target device.\n\n\nHere, we will load our \narduino_blinky\n target onto the device, and we \nshould see it run:\n\n\n$ newt run arduino_blinky 0.0.0 \nDebugging myproject/bin/arduino_blinky/apps/blinky/blinky.elf\nOpen On-Chip Debugger 0.9.0 (2015-09-23-21:46)\nLicensed under GNU GPL v2\nFor bug reports, read\n http://openocd.org/doc/doxygen/bugs.html\nInfo : only one transport option; autoselect \nswd\n\nadapter speed: 500 kHz\nadapter_nsrst_delay: 100\ncortex_m reset_config sysresetreq\nInfo : CMSIS-DAP: SWD Supported\nInfo : CMSIS-DAP: JTAG Supported\nInfo : CMSIS-DAP: Interface Initialised (SWD)\nInfo : CMSIS-DAP: FW Version = 01.1F.0118\nInfo : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 1 TDO = 1 nTRST = 0 nRESET = 1\nInfo : CMSIS-DAP: Interface ready\nInfo : clock speed 500 kHz\nInfo : SWD IDCODE 0x0bc11477\nInfo : at91s amd21g18.cpu: hardware has 4 breakpoints, 2 watchpoints\nGNU gdb (GNU Tools for ARM Embedded Processors) 7.8.0.20150604-cvs\nCopyright (C) 2014 Free Software Foundation, Inc.\nLicense GPLv3+: GNU GPL version 3 or later \nhttp://gnu.org/licenses/gpl.html\n\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \nshow copying\n\nand \nshow warranty\n for details.\nThis GDB was configured as \n--host=x86_64-apple-darwin10 --target=arm-none-eabi\n.\nType \nshow configuration\n for configuration details.\nFor bug reporting instructions, please see:\n\nhttp://www.gnu.org/software/gdb/bugs/\n.\nFind the GDB manual and other documentation resources online at:\n\nhttp://www.gnu.org/software/gdb/documentation/\n.\nFor help, type \nhelp\n.\nType \napropos word\n to search for commands related to \nword\n...\nReading symbols from myproject/bin/arduino_blinky/apps/blinky/blinky.elf...done.\ntarget state: halted\ntarget hal ted due to debug-request, current mode: Thread \nxPSR: 0x21000000 pc: 0x0000030e msp: 0x20008000\nInfo : accepting \ngdb\n connection on tcp/3333\nInfo : SAMD MCU: SAMD21G18A (256KB Flash, 32KB RAM)\n0x0000030e in ?? ()\n(gdb) r\nThe \nremote\n target does not support \nrun\n. Try \nhelp target\n or \ncontinue\n.\n(gdb) c\nContinuing.\n\n\n\n\n\nNOTE:\n The 0.0.0 specified after the target name to newt run, is the version \nof the image to load. If you are not providing remote upgrade, and are just \ndeveloping locally, you can provide 0.0.0 for every image version.\n\n\nIf you want the image to run without the debugger connected, simply quit the \ndebugger and restart the board. The image you programmed will come and run on the \nArduino on next boot! \n\n\nWatch the LED blink\n\n\nCongratulations! You have created a Mynewt operating system running on the \nArduino Zero. The LED right next to the power LED should be blinking. It is toggled by one task running on the Mynewt OS." , "title": "Blinky on Arduino Zero" }, { @@ -392,7 +422,7 @@ }, { "location": "/os/tutorials/arduino_zero/#install-mynewt-and-newt", - "text": "If you have not already done so, install Newt as shown in the Newt install tutorial and cloned the Mynewt OS repository as shown in the Get Started tutorial for Blinky", + "text": "If you have not already done so, install Newt as shown in the Newt install tutorial and cloned the Mynewt OS repository as shown in the Get Started tutorial for Sim Blinky", "title": "Install Mynewt and Newt" }, { http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/09ce71d2/os/get_started/project_create/index.html ---------------------------------------------------------------------- diff --git a/os/get_started/project_create/index.html b/os/get_started/project_create/index.html index c368dd8..70dd7ed 100644 --- a/os/get_started/project_create/index.html +++ b/os/get_started/project_create/index.html @@ -412,19 +412,20 @@ </div> </div> - <h1 id="creating-a-mynewt-project">Creating a Mynewt Project<a class="headerlink" href="#creating-a-mynewt-project" title="Permanent link">¶</a></h1> -<p>This page shows how to create a Mynewt Project using <code>newt</code></p> -<h1 id="pre-requisites">Pre-Requisites<a class="headerlink" href="#pre-requisites" title="Permanent link">¶</a></h1> + <h2 id="create-your-first-mynewt-project">Create Your First Mynewt Project<a class="headerlink" href="#create-your-first-mynewt-project" title="Permanent link">¶</a></h2> +<p>This page shows how to create a Mynewt Project using the <code>newt</code> command-line tool.</p> +<h3 id="pre-requisites">Pre-Requisites<a class="headerlink" href="#pre-requisites" title="Permanent link">¶</a></h3> <ul> -<li>Ensure you have installed <a href="../../../newt/newt_intro">newt</a> and that the -newt command is in your system path.</li> +<li>Ensure you have installed <a href="../../../newt/tutorials/newt_mac/">newt</a> and that the +newt command is in your system path. </li> <li>You must have Internet connectivity to fetch remote Mynewt components</li> <li>You must <a href="project1.md">install the compiler tools</a> to support native compiling to build the project this tutorial creates. </li> </ul> -<h2 id="newt-new">Newt New<a class="headerlink" href="#newt-new" title="Permanent link">¶</a></h2> -<p>Chose a project name. For this tutorial we will call this project <code>myproj</code>. -Enter the <code>newt new myproj</code> command. Your put</p> +<p><br></p> +<h3 id="newt-new">Newt New<a class="headerlink" href="#newt-new" title="Permanent link">¶</a></h3> +<p>Choose a project name. For this tutorial we will call this project <code>myproj</code>. +Enter the <code>newt new myproj</code> command. </p> <div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> $ newt new myproj Downloading project skeleton from apache/incubator-mynewt-blinky... Installing skeleton in myproj... @@ -432,6 +433,7 @@ Enter the <code>newt new myproj</code> command. Your put</p> </pre></div> +<p><br></p> <p>The <code>newt</code> tool has created a project directory structure like the one below:</p> <div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> âââ myproj âââ DISCLAIMER @@ -454,6 +456,7 @@ Enter the <code>newt new myproj</code> command. Your put</p> </pre></div> +<p><br></p> <p><code>newt</code> has installed the base files for a project comprising the following.</p> <ol> <li>file <code>project.yml</code> contains the repository list that the project uses to fetch @@ -468,12 +471,12 @@ targets.</li> <li>A non-build-able target called <code>unittest</code>. This is used internally by <code>newt</code> and is not a formal build target.</li> </ol> -<p>NOTE: the actual code and package files are not installed -(except the template for <code>main.c</code>. See the next step for installing -the packages.</p> -<h2 id="newt-install">Newt Install<a class="headerlink" href="#newt-install" title="Permanent link">¶</a></h2> -<p>change into the <code>myproj</code> directory. Then ask newt to install all the -project package dependencies using <code>newt install</code></p> +<p><strong>NOTE:</strong> the actual code and package files are not installed +(except the template for <code>main.c</code>). See the next step for installing the packages.</p> +<p><br></p> +<h3 id="newt-install">Newt Install<a class="headerlink" href="#newt-install" title="Permanent link">¶</a></h3> +<p>Change into the <code>myproj</code> directory. Then ask newt to install all the +project package dependencies using <code>newt install</code>.</p> <div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> $ newt install -v apache-mynewt-core Downloading repository description for apache-mynewt-core... success! @@ -516,6 +519,7 @@ under the specific repository you have included in the base project. </p> <p>Within each of these directories are the packages required to build your project for the various targets.</p> +<p><br></p> <h2 id="testing-the-project">Testing the Project<a class="headerlink" href="#testing-the-project" title="Permanent link">¶</a></h2> <p>To validate, you can also run all the units test through simulation.</p> <div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> $ newt test all @@ -529,6 +533,7 @@ project for the various targets.</p> </pre></div> +<p><br></p> <h2 id="building-the-project">Building the Project<a class="headerlink" href="#building-the-project" title="Permanent link">¶</a></h2> <p>To build the project you can use <code>newt build</code> using the target </p> <div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> $ newt build my_blinky_sim @@ -536,6 +541,7 @@ project for the various targets.</p> </pre></div> +<p><br></p> <p>You can run the simulated version of your project and see the simulated LED blink</p> <div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> ./bin/my_blinky_sim/apps/blinky/blinky.elf @@ -544,8 +550,9 @@ blink</p> <p>Just do <code>ctrl-c</code> to exit.</p> +<p><br></p> <h2 id="complete">Complete<a class="headerlink" href="#complete" title="Permanent link">¶</a></h2> -<p>Congratulations, you have created your first project. This project contains +<p>Congratulations, you have created your first project! This project contains the core OS, a simple application to blink an LED and all of the dependencies required.</p> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/09ce71d2/os/tutorials/arduino_zero/index.html ---------------------------------------------------------------------- diff --git a/os/tutorials/arduino_zero/index.html b/os/tutorials/arduino_zero/index.html index 9fdd051..cdfae48 100644 --- a/os/tutorials/arduino_zero/index.html +++ b/os/tutorials/arduino_zero/index.html @@ -452,11 +452,11 @@ </div> </div> - <h1 id="running-mynewt-on-arduino-zero">Running Mynewt on Arduino Zero<a class="headerlink" href="#running-mynewt-on-arduino-zero" title="Permanent link">¶</a></h1> + <h2 id="running-mynewt-on-arduino-zero">Running Mynewt on Arduino Zero<a class="headerlink" href="#running-mynewt-on-arduino-zero" title="Permanent link">¶</a></h2> <p>This tutorial describes how to run Mynewt OS on Arduino Zero. </p> -<h2 id="prerequisites">Prerequisites<a class="headerlink" href="#prerequisites" title="Permanent link">¶</a></h2> +<h3 id="prerequisites">Prerequisites<a class="headerlink" href="#prerequisites" title="Permanent link">¶</a></h3> <p>Before tackling this tutorial, it's best to read about Mynewt in the <a href="../../get_started/introduction">Introduction</a> section of this documentation.</p> -<h2 id="equipment">Equipment<a class="headerlink" href="#equipment" title="Permanent link">¶</a></h2> +<h3 id="equipment">Equipment<a class="headerlink" href="#equipment" title="Permanent link">¶</a></h3> <p>You will need the following equipment</p> <ul> <li>An Arduino Zero board. NOTE: There are many flavors of Arduino. Ensure that @@ -466,14 +466,14 @@ compatible with this tutorial</li> <li>A USB cable (Type A to micro B) that can connect the computer to the Arduino</li> <li>The Mynewt Release</li> </ul> -<h2 id="arduino-boards">Arduino Boards<a class="headerlink" href="#arduino-boards" title="Permanent link">¶</a></h2> +<h3 id="arduino-boards">Arduino Boards<a class="headerlink" href="#arduino-boards" title="Permanent link">¶</a></h3> <p>This tutorial has been tested on the following two Arduino Zero boards.</p> <p><img src="https://www.arduino.cc/en/uploads/Main/Zero_Usb_Ports.jpg" alt="Drawing" style="width: 400px;"/> <img src="http://www.arduino.org//images/products/ArduinoZeroPro-flat-org.jpg" alt="Drawing" style="width: 330px;"/></p> -<h2 id="steps">Steps<a class="headerlink" href="#steps" title="Permanent link">¶</a></h2> +<h3 id="steps">Steps<a class="headerlink" href="#steps" title="Permanent link">¶</a></h3> <p>Follow these simple steps and your board will be blinking in no time!</p> -<h3 id="install-mynewt-and-newt">Install Mynewt and Newt<a class="headerlink" href="#install-mynewt-and-newt" title="Permanent link">¶</a></h3> -<p>If you have not already done so, install Newt as shown in the <a href="../../../newt/tutorials/newt_mac/">Newt install tutorial</a> and cloned the Mynewt OS repository as shown in the <a href="../get_started/project1.md">Get Started tutorial for Blinky</a></p> +<h4 id="install-mynewt-and-newt">Install Mynewt and Newt<a class="headerlink" href="#install-mynewt-and-newt" title="Permanent link">¶</a></h4> +<p>If you have not already done so, install Newt as shown in the <a href="../../../newt/tutorials/newt_mac/">Newt install tutorial</a> and cloned the Mynewt OS repository as shown in the <a href="../../get_started/project_create/">Get Started tutorial for Sim Blinky</a></p> <h3 id="fetch-external-packages-for-atmel-samd21">Fetch External Packages for Atmel SAMD21<a class="headerlink" href="#fetch-external-packages-for-atmel-samd21" title="Permanent link">¶</a></h3> <p>Mynewt uses source code provided directly from the chip manufacturer for low level operations. This code is licensed only for Atmel parts, and
