You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ad...@apache.org on 2016/03/06 00:58:07 UTC

[6/8] incubator-mynewt-site git commit: Correct newt install instructions for Mac. Also added info about looking up possible values for target variables.

Correct newt install instructions for Mac. Also added info about looking up possible values for target variables.


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/4f3ab4e7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/tree/4f3ab4e7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/diff/4f3ab4e7

Branch: refs/heads/master
Commit: 4f3ab4e7119e25eeb39e4b7288e6cd172edd7a61
Parents: a72d044
Author: aditihilbert <ad...@runtime.io>
Authored: Fri Mar 4 17:00:00 2016 -0800
Committer: aditihilbert <ad...@runtime.io>
Committed: Fri Mar 4 17:00:00 2016 -0800

----------------------------------------------------------------------
 docs/newt/command_list/newt_target.md |  4 +++-
 docs/newt/newt_mac.md                 | 20 +++++++-------------
 2 files changed, 10 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/4f3ab4e7/docs/newt/command_list/newt_target.md
----------------------------------------------------------------------
diff --git a/docs/newt/command_list/newt_target.md b/docs/newt/command_list/newt_target.md
index 9f31ac6..5273dca 100644
--- a/docs/newt/command_list/newt_target.md
+++ b/docs/newt/command_list/newt_target.md
@@ -38,7 +38,8 @@ Provides commands to create, build, delete, and query targets.
 
 Sub-command  | Explanation
 -------------| ------------------------
-set         | Set attributes of the target. Currently the list of possible attributes are:``` arch, compiler, compiler_def, project, bsp, pkg, identities, capabilities, dependencies, cflags, lflags```. Typically only the first 5 need to be set for a hardware target. For a simulated target, e.g. for software testing purposes, `arch=sim`, `compiler=sim`, and `pkg=<pkg name to be tested>`. You cannot set both the project and pkg for a target. 
+set         | Set attributes (variables) of the target. Currently the list of possible attributes (variables) are:``` arch, compiler, compiler_def, project, bsp, pkg, identities, capabilities, dependencies, cflags, lflags```. Typically only the first 5 need to be set for a hardware target. For a simulated target, e.g. for software testing purposes, `arch=sim`, `compiler=sim`, and `pkg=<pkg name to be tested>`. You cannot set both the project and pkg for a target. 
+         | To display all the existing values for any target attribute (variable), you can simply hit return after that variable. For example, `newt target set target1 arch` displays the valid values available for the attribute `arch` for a target named `target1`. 
 unset    | Unset attributes of the target in its configuration.
 delete         | Deletes only the description for the target. Does not delete the target directory with associated binaries. If you want to clean out the binaries, list files, and executables use`newt target build <target-name> clean` **before** deleting the target!
 create    |  Creates a target description or build definition by the name `input1`. By default it assigns the sim (simulator) architecture to it which allows you to build new projects and software on your native OS and try it out.
@@ -67,6 +68,7 @@ import  | -a, -import-all  | Import all targets typed into standard input or red
  Sub-command  | Usage                  | Explanation 
 -------------| -----------------------|-----------------
 set       | newt target set myblinky compiler=arm-none-eabi-m4 | Set the compiler for the 'myblinky' target to the gcc compiler for embedded ARM chips.
+set       | newt target set myblinky compiler | Lists the valid values currently available to be assigned for target attribute (variable) 'compiler'. For example, arm-none-eabi-m0, arm-none-eabi-m4, sim. As Mynewt grows, the number of possible values will grow.
 unset       | newt target unset myblinky compiler | Remove the setting for the compiler for the 'myblinky' target.
 delete       | newt target delete myblinky | Delete the target description for the target named 'myblinky'. Note that it does not remove any binaries or clean out the directory for this target. 
 create       | newt target create blink_f3disc | Create a new target description by the name 'blink_f3disc'. The architecture is 'sim' by default and can be changed using subcommand 'set' above.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/4f3ab4e7/docs/newt/newt_mac.md
----------------------------------------------------------------------
diff --git a/docs/newt/newt_mac.md b/docs/newt/newt_mac.md
index 4ae7fd3..bd399ff 100644
--- a/docs/newt/newt_mac.md
+++ b/docs/newt/newt_mac.md
@@ -52,18 +52,10 @@ If you want to build the newt tool from its source code you need to install
 #### Creating local repository
 
 * You are ready to download the newt tool repository. You will use Go to copy the directory (currently the asf incubator directory). Be patient as it may take a minute or two. Check the directories installed.
-```no-highlight
-        $ go get git-wip-us.apache.org/repos/asf/incubator-mynewt-newt.git/newt
-        $ ls
-         bin	pkg	   src
-        $ ls src
-        git-wip-us.apache.org	github.com		gopkg.in
-```
-
-If you run into an `unrecognized import path` issue, go to the `~/dev/go/src/git-wip-us.apache.org/repos/asf` directory and create a symbolic link. Then run the `go get` command above again to install all packages correctly.
 
 ```no-highlight
-        $ ln -s incubator-mynewt-newt.git incubator-mynewt-newt
+        $ go get mynewt.apache.org/newt/...
+
 ```
 
 * Check that newt.go is in place.
@@ -76,15 +68,17 @@ If you run into an `unrecognized import path` issue, go to the `~/dev/go/src/git
 #### Building the Newt tool
 
 * You will use Go to run the newt.go program to build the newt tool. The command used is `go install` which compiles and writes the resulting executable to an output file named `newt`. It installs the results along with its dependencies in $GOPATH/bin.
+
 ```no-highlight
-        $ cd $GOPATH/src/git-wip-us.apache.org/repos/asf/incubator-mynewt-newt.git/newt
+        $ cd $GOPATH/src/mynewt.apache.org/newt/newt
         $ go install
         $ ls "$GOPATH"/bin/
-        godep		incubator-mynewt-newt.git	  newt
+        newt	newtmgr	newtvm
 ```
 * Try running newt using the compiled binary. For example, check for the version number by typing 'newt version'. See all the possible commands available to a user of newt by typing 'newt -h'.
 
-   Note: If you are going to be be modifying the newt tool itself often and wish to compile the program every time you call it, you may want to store the command in a variable in your .bash_profile. So type in `export newt="go run $GOPATH/src/git-wip-us.apache.org/repos/asf/incubator-mynewt-newt.git/newt/newt/go"` in your .bash_profile and execute it by calling `$newt` at the prompt instead of `newt`. Here, you use `go run` which runs the compiled binary directly without producing an executable. Don't forget to reload the updated bash profile by typing `source ~/.bash_profile` at the prompt! 
+   Note: If you are going to be be modifying the newt tool itself often and wish to compile the program every time you call it, you may want to store the command in a variable in your .bash_profile. So type in `export newt="go run $GOPATH/mynewt.apache.org/newt/newt/newt.go"` in your .bash_profile and execute it by calling `$newt` at the prompt instead of `newt`. Essentially, `$newt` calls `go run` which runs the compiled binary directly without producing an executable. Don't forget to reload the updated bash profile by typing `source ~/.bash_profile` at the prompt! 
+   
 ```no-highlight
         $ newt version
         Newt version:  1.0