This is an automated email from the ASF dual-hosted git repository.

ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-mcumgr.git

commit e93bd66e0727c37ca1f6981a2b91c9da516545c2
Author: Christopher Collins <ccoll...@apache.org>
AuthorDate: Fri Jan 26 17:58:38 2018 -0800

    Update documentation.
---
 README-mynewt.md | 31 +++++++++++++++++++++++++++++++
 README-zephyr.md | 30 ++++++++++++++++++++++++++++++
 README.md        | 29 +++++++++++++++++++++--------
 3 files changed, 82 insertions(+), 8 deletions(-)

diff --git a/README-mynewt.md b/README-mynewt.md
new file mode 100644
index 0000000..9e65ea8
--- /dev/null
+++ b/README-mynewt.md
@@ -0,0 +1,31 @@
+## Building and using mcumgr with Apache Mynewt
+
+NOTE: The *mcumgr* library consists of functionality that is already present in
+the `apache-mynewt-core` repo.  There is currently no need to use the external
+*mcumgr* library with Mynewt, as the functionality is already built in to the
+OS.  To use this library with a Mynewt application, you will need to remove the
+duplicate functionality from your copy of the `apache-mynewt-core` repo.
+
+### Configuration
+
+To use *mcumgr*, your Mynewt app needs to be configured to use:
+1. An mcumgr transfer encoding
+2. An mcumgr transport
+3. (optional) Command handlers.
+
+This is done by adding the necessary dependencies to your app or target.  The 
following list of dependencies adds support for the SMP transfer encoding, the 
Bluetooth and shell transports, and all the built-in command handlers:
+
+```
+    - '@apache-mynewt-core/mgmt/newtmgr/transport/ble'
+    - '@apache-mynewt-core/mgmt/newtmgr/transport/nmgr_shell'
+    - '@mynewt-mcumgr/cmd/fs_mgmt'
+    - '@mynewt-mcumgr/cmd/img_mgmt'
+    - '@mynewt-mcumgr/cmd/os_mgmt'
+    - '@mynewt-mcumgr/smp'
+```
+
+For an example of an app that uses mcumgr, see the `smp_svr` sample app in 
`samples/smp_svr/mynewt`.
+
+### Building
+
+With the necessary dependencies in place, your project can be built using the 
usual `newt build <target-name>` or `newt run <target-name>`
diff --git a/README-zephyr.md b/README-zephyr.md
new file mode 100644
index 0000000..b808a2f
--- /dev/null
+++ b/README-zephyr.md
@@ -0,0 +1,30 @@
+## Building and using mcumgr with Zephyr
+
+### Configuration
+
+The `samples/smp_svr/zephyr/prj.conf` file provides a good starting point for
+configuring an application to use *mcumgr*.  The major configuration settings
+are described below:
+
+| Setting       | Description   | Default |
+| ------------- | ------------- | ------- |
+| `CONFIG_MCUMGR` | Enable the mcumgr management library. | n |
+| `CONFIG_MCUMGR_CMD_FS_MGMT` | Enable mcumgr handlers for file management | n 
|
+| `CONFIG_MCUMGR_CMD_IMG_MGMT` | Enable mcumgr handlers for image management | 
n |
+| `CONFIG_MCUMGR_CMD_LOG_MGMT` | Enable mcumgr handlers for log management | n 
|
+| `CONFIG_MCUMGR_CMD_OS_MGMT` | Enable mcumgr handlers for OS management | n |
+
+### Building
+
+Your application must specify mcumgr as a link-time dependency.  This is done
+by adding the following to your application's `CMakeLists.txt` file:
+
+```
+zephyr_link_libraries(
+    MCUMGR
+)
+```
+
+### Known issues
+
+If the Bluetooth stack runs out of ACL transmit buffers while a large mcumgr 
response is being sent, the buffers never get freed.  This appears to trigger a 
net_buf leak in the stack.
diff --git a/README.md b/README.md
index 12141dc..bbe0016 100644
--- a/README.md
+++ b/README.md
@@ -11,6 +11,20 @@ mcumgr is operating system and hardware independent.  It 
relies on hardware
 porting layers from the operating system it runs on.  Currently, mcumgr runs on
 both the Apache Mynewt and Zephyr operating systems.
 
+## Getting started
+
+For tips on using mcumgr with your particular OS, see the appropriate file from
+the list below:
+
+* README-mynewt.md
+* README-zephyr.md
+
+## Dependencies
+
+To use mcumgr's image management support, your device must be running the
+MCUBoot boot loader (https://github.com/runtimeco/mcuboot).  The other mcumgr
+features do not require MCUboot.
+
 ## Command line tool
 
 The `mcumgr` command line tool is available at:
@@ -52,6 +66,7 @@ As an example, the sample application `smp_svr` uses the 
following components:
 * Command handlers:
     * Image management (`img_mgmt`)
     * File system management (`fs_mgmt`)
+    * Log management (`log_mgmt`)
     * OS management (`os_mgmt`)
 * Transfer/Transports protocols:
     * SMP/Bluetooth
@@ -60,9 +75,9 @@ As an example, the sample application `smp_svr` uses the 
following components:
 yielding the following stack diagram:
 
 ```
-+--------------+--------------+-------------+
-|   img_mgmt   |   fs_mgmt    |   os_mgmt   |
-+--------------+--------------+-------------+
++----------+----------+----------+----------+
+| img_mgmt |  fs_mgmt | log_mgmt |  os_mgmt |
++----------+----------+----------+----------+
 |                   mgmt                    |
 +---------------------+---------------------+
 |         SMP         |         SMP         |
@@ -87,7 +102,9 @@ The contents of the CBOR key-value map are specified per 
command type.
 
 ## Supported transfer encodings
 
-Mcumgr comes with one built-in transfer encoding: Simple Management Protocol 
(SMP).  SMP requests and responses have a very basic structure.  For details, 
see the comments at the top of `smp/include/smp/smp.h`.
+Mcumgr comes with one built-in transfer encoding: Simple Management Protocol
+(SMP).  SMP requests and responses have a very basic structure.  For details,
+see the comments at the top of `smp/include/smp/smp.h`.
 
 ## Supported transports
 
@@ -114,10 +131,6 @@ For more information in the source, here are some pointers:
 - [samples](https://github.com/apache/mcumgr/tree/master/samples): Sample 
applications utilizing mcumgr.
 - [smp](https://github.com/apache/mcumgr/tree/master/smp): The built-in 
transfer encoding: Simple management protocol.
 
-## Known issues
-
-- (Zephyr) If the Bluetooth stack runs out of ACL transmit buffers while a 
large mcumgr response is being sent, the buffers never get freed.  This appears 
to trigger a net_buf leak in the stack.
-
 ## Joining
 
 Developers welcome!

-- 
To stop receiving notification emails like this one, please contact
ccoll...@apache.org.

Reply via email to