Repository: incubator-mynewt-site
Updated Branches:
  refs/heads/master 8436efc0d -> b7a501145


Two new files added for newt complete and mfg commands


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

Branch: refs/heads/master
Commit: 020ed9591de95a1a3d069521977e03043e14e989
Parents: 8436efc
Author: aditihilbert <[email protected]>
Authored: Mon Jan 2 13:17:56 2017 -0800
Committer: aditihilbert <[email protected]>
Committed: Mon Jan 2 23:34:12 2017 -0800

----------------------------------------------------------------------
 docs/newt/command_list/newt_complete.md |  31 ++++++++
 docs/newt/command_list/newt_mfg.md      | 103 +++++++++++++++++++++++++++
 2 files changed, 134 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/020ed959/docs/newt/command_list/newt_complete.md
----------------------------------------------------------------------
diff --git a/docs/newt/command_list/newt_complete.md 
b/docs/newt/command_list/newt_complete.md
new file mode 100644
index 0000000..7f2d55c
--- /dev/null
+++ b/docs/newt/command_list/newt_complete.md
@@ -0,0 +1,31 @@
+## <font color="#F2853F" style="font-size:24pt">newt complete </font>
+
+Performs bash autocompletion using tab. It is not intended to be called 
directly from the command line.
+
+#### Install bash autocompletion
+
+```no-highlight
+    $ brew install bash-completion
+    Updating Homebrew...
+    <snip>
+    Bash completion has been installed to:
+      /usr/local/etc/bash_completion.d
+    ==> Summary
+    🍺  /usr/local/Cellar/bash-completion/1.3_1: 189 files, 607.8K
+```
+
+#### Enable autocompletion for newt
+
+```no-highlight
+    $ complete -C "newt complete" newt
+```
+
+#### Usage
+
+Hit tab and see possible completion options or completed command.
+
+```no-highlight
+    $ newt target s
+    set   show  
+    $ newt target show
+```

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/020ed959/docs/newt/command_list/newt_mfg.md
----------------------------------------------------------------------
diff --git a/docs/newt/command_list/newt_mfg.md 
b/docs/newt/command_list/newt_mfg.md
new file mode 100644
index 0000000..f8e5b51
--- /dev/null
+++ b/docs/newt/command_list/newt_mfg.md
@@ -0,0 +1,103 @@
+## <font color="#F2853F" style="font-size:24pt">newt mfg </font>
+
+Provides commands to create, build, and upload manufacturing image. 
+
+#### Usage: 
+
+```no-highlight
+    newt mfg [flags]
+    newt mfg [command]
+```
+#### Available Commands: 
+
+```no-highlight
+    create      Create a manufacturing flash image
+    deploy      Builds and uploads a manufacturing image (build + load)
+    load        Load a manufacturing flash image onto a device
+```
+
+#### Flags:
+
+```no-highlight
+    -h, --help=false: help for mfg
+```
+
+#### Global Flags:
+
+```no-highlight
+    -l, --loglevel="WARN": Log level, defaults to WARN.
+    -o, --outfile string    Filename to tee log output to
+    -q, --quiet=false: Be quiet; only display error output.
+    -s, --silent=false: Be silent; don't output anything.
+    -v, --verbose=false: Enable verbose output when executing commands.
+```
+#### Description
+
+Sub-command  | Explanation
+-------------| ------------------------
+create     | A manufacturing image specifies 1) a boot loader target, and 2) 
one or more image targets. Assuming the manufacturing entity has been created 
and defined in the `mfgs/<mfg image name>/` package(see Examples below), this 
command collects the manufacturing related files in the newly created 
`bin/mfgs/<mfg image name>` directory. The collection includes manifests with 
the image build time, version, manufacturing package build time, image ID (or 
hash) etc. It is essentially a snapshot of the image data and metadata uploaded 
to the device flash at manufacturing time. Note that the command expects the 
targets and images to have already been built using `newt build` and `newt 
create-image` commands.
+deploy     | A combination of build and load commands to put together and 
upload manufacturing image on to the device.
+load      | Loads the manufacturing package onto to the flash of the connected 
device.
+
+
+#### Examples
+
+Suppose you have created two targets (one for the bootloader and one for the 
`blinky` app). 
+
+```no-highlight
+$ newt target show
+targets/my_blinky_sim
+    app=apps/blinky
+    bsp=@apache-mynewt-core/hw/bsp/native
+    build_profile=debug
+targets/rb_blinky
+    app=apps/blinky
+    bsp=@apache-mynewt-core/hw/bsp/rb-nano2
+    build_profile=debug
+targets/rb_boot
+    app=@apache-mynewt-core/apps/boot
+    bsp=@apache-mynewt-core/hw/bsp/rb-nano2
+    build_profile=optimized
+```
+
+Build the bootloader and app images.
+
+```
+$ newt build rb_boot
+$ newt build rb_boot
+$ newt create-image rb_blinky 0.0.1
+```
+
+Create the directory and package to hold the manufacturing images.
+
+```
+$ mkdir -p mfgs/rb_blinky_rsa
+```
+
+The `rb_blinky_rsa` package needs a pkg.yml file. In addition it is needs a 
mfg.yml file where the two constituent targets are defined. An example of each 
file is shown below.
+
+```
+$  more mfgs/rb_blinky_rsa/pkg.yml 
+pkg.name: "mfgs/rb_blinky_rsa"
+pkg.type: "mfg"
+pkg.description: 
+pkg.author: 
+pkg.homepage: 
+```
+
+```
+$  more mfgs/rb_blinky_rsa/mfg.yml 
+mfg.bootloader: 'targets/rb_boot'
+mfg.images:
+    - 'targets/rb_blinky'
+```
+
+Run the `newt mfg create` command to collect all the manufacturing snapshot 
files.
+
+```
+$ newt mfg create rb_blinky_rsa
+Creating a manufacturing image from the following files:
+<snip>
+Generated the following files:
+<snip>
+$

Reply via email to