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/04 19:42:37 UTC

[2/2] incubator-mynewt-site git commit: Cleaned up port mynewt docs. Added arduino Zero port documentation. This closes #28.

Cleaned up port mynewt docs. Added arduino Zero port documentation. This closes #28.


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

Branch: refs/heads/master
Commit: d668d1bdf0d9cebb16023ed9c675bbb572941bd0
Parents: 901aafc c2bd198
Author: aditihilbert <ad...@runtime.io>
Authored: Fri Mar 4 10:42:25 2016 -0800
Committer: aditihilbert <ad...@runtime.io>
Committed: Fri Mar 4 10:42:25 2016 -0800

----------------------------------------------------------------------
 docs/newt/command_list/newt_pkg.md  |   2 +-
 docs/os/core_os/porting/port_bsp.md |  24 ++--
 docs/os/core_os/porting/port_cpu.md |   4 -
 docs/os/core_os/porting/port_mcu.md |   3 +-
 docs/os/tutorials/arduino_zero.md   | 213 +++++++++++++++++++++++++++++++
 5 files changed, 226 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/d668d1bd/docs/newt/command_list/newt_pkg.md
----------------------------------------------------------------------
diff --cc docs/newt/command_list/newt_pkg.md
index 9eccb74,9eccb74..38ecf33
--- a/docs/newt/command_list/newt_pkg.md
+++ b/docs/newt/command_list/newt_pkg.md
@@@ -35,7 -35,7 +35,7 @@@ list         | List all the pkgs in th
  checkdeps    | Resolve all dependencies in the local app. This command goes through all pkgs currently installed, checks their dependencies, and prints any unresolved dependencies between pkgs.
  search       | Searches for a pkg, specified by `input1`. The local app, along with all remote apps (pkg-lists) are searched. All matched pkgs are shown along with the pkg-list informaton. Installed pkgs are called out as such. The command can be invoked from anywhere in the app.
  show     |  Show the contents of the pkg named `input2` found in the pkg-list named `input1`. The pkg-list name is optional; if only the pkg name is given as the argument it is resolved using all the pkg-lists installed in the current app. If the pkg is present in multiple pkg-lists it will list all of them along with the pkg-list information for each.
--install  |  Install the pkg specified by `input2` from the pkg-list named `input1`. The command downloads the pkg from the github repository using the URL in the pkg-list description file (typically donwloaded as 'input1@<branch-name>.yml' in .app/pkg-lists). It also downloads all the dependencies (constituent pkgs) as decribed in the pkg's description file ('pkg.yml') and installs all of them. The pkg-list name is optional. If only the pkg name is given as the argument, the command looks for the pkg name in all the pkg-lists in the local app and installs accordingly. A pkg is installed by this command only if it has not already been installed. 
++install  |  Install the pkg specified by `input2` from the pkg-list named `input1`. The command downloads the pkg from the github repository using the URL in the pkg-list description file (typically downloaded as 'input1@<branch-name>.yml' in .app/pkg-lists). It also downloads all the dependencies (constituent pkgs) as decribed in the pkg's description file ('pkg.yml') and installs all of them. The pkg-list name is optional. If only the pkg name is given as the argument, the command looks for the pkg name in all the pkg-lists in the local app and installs accordingly. A pkg is installed by this command only if it has not already been installed. 
  remove   |  Remove a pkg named `input2` from pkg-list `input1`, if pkg-list is specified. Otherwise only one input required - that of the name of the pkg to be removed from the local app.
  
  

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/d668d1bd/docs/os/core_os/porting/port_bsp.md
----------------------------------------------------------------------
diff --cc docs/os/core_os/porting/port_bsp.md
index a822470,8048dbd..6243ba1
--- a/docs/os/core_os/porting/port_bsp.md
+++ b/docs/os/core_os/porting/port_bsp.md
@@@ -13,33 -17,41 +13,32 @@@ To build a proper BSP, you will typical
  
  * The datasheet for the MCU you have chosen
  * The schematic of your board
 -* The information on the CPU core within your MCU if its not included in your 
 -MCU documentation
 +* The information on the CPU core within your MCU if it is not included in your MCU documentation
  * This Mynewt documentation
  
 -##Name Your BSP
 +##Name your BSP
 +
 +Select a name for your BSP.  For the remainder of this document, we'll assume the bsp is named `myboard`. In general its best to select a name that describes the board/system you are creating.
 +
 +##Create a BSP directory
 +
 +Create a directory `hw/bsp/myboard` using the name chosen above. Within this BSP directory, create the following subdirectories:
  
+ Select a name for your BSP.  For the remainder of this document, 
+ well assume the bsp is named `myboard`. In general its best to select a 
+ name that describes the board/system you are creating.
+ 
 -##Create a BSP Directory
 -
 -Create a directory `hw/bsp/myboard` using the name chosen above.   
 -Within this BSP directory, create the following subdirectories:
 -
  * `include`
  * `include/bsp`
  * `src`
  
  ##Create a Target using Mynewt
  
- Create a newt target for your test project for the BSP. To learn how to create a target, see this **howto** [Tutorial](../../get_started/project1). Once you are 
 -Create a newt target for your test project for the BSP. To learn how to 
 -create a target, see this [Tutorial](../../get_started/project1). Once you are 
--familiar with creating targets, move on below to create a target to use to 
--test your BSP.
++Create a newt target for your test project for the BSP. To learn how to create a target, see this **howto** [Tutorial](../../get_started/project1). Once you are familiar with creating targets, move on below to create a target to use to test your BSP.
  
--Its recommended to use a simple `project` like `blinky` to minimize time to get a 
--working Mynewt system.  For this document, we will assume the `target` is called 
--`myboard_blinky` and uses project `blinky`.  
++It is recommended that you use a simple `project` like `blinky` to minimize time to get a working Mynewt system.  For this document, we will assume the `target` is called `myboard_blinky` and uses project `blinky`.  
  
--Set the `bsp` of the project to `/hw/bsp/myboard`.
- While creating your target, you will need to specify your `arch`and `compiler`. If your platform requires an architecture or compiler that are not defined in Mynewt, you will need to add them first.  To add a CPU architecture see [CPU Porting](port_cpu.md).
 -While creating your target, you will need to specify your `arch`and `compiler`.  
 -If your platform requires an architecture or compiler that are not defined
 -in Mynewt, you will need to add them first.  To add a CPU architecture see
 -[CPU Porting](port_cpu.md).
++Set the `bsp` of the project to `/hw/bsp/myboard`. While creating your target, you will need to specify your `arch`and `compiler`. If your platform requires an architecture or compiler that are not defined in Mynewt, you will need to add them first.  To add a CPU architecture see [CPU Porting](port_cpu.md).
  
  When you are complete, your `target` may look similar to this.
  
@@@ -116,8 -134,10 +115,7 @@@ The following table describes additiona
  | pkg.debugscript |  A script that can run the GDB debugger on your board |
  | pkg.deps |  Any dependencies on your BSP |
  
- The BSP will invariably depend upon an MCU ( in this sample it's `hw/mcu/mymcu/variant`) since the Mynewt OS runs on an MCU within your target.  If your MCU is not supported by Mynewt, see 
 -The BSP will invariably depend upon an MCU ( in this sample its 
 -`hw/mcu/mymcu/variant`) since the Mynewt OS runs on an 
 -MCU within your target.  If your MCU is not supported by Mynewt, see 
--[MCU Porting](port_mcu.md) for details on how to create an MCU in Mynewt.
++The BSP will invariably depend upon an MCU ( in this sample it's `hw/mcu/mymcu/variant`) since the Mynewt OS runs on an MCU within your target.  If your MCU is not supported by Mynewt, see [MCU Porting](port_mcu.md) for details on how to create an MCU in Mynewt.
  
  The package file may also contain:
  
@@@ -163,14 -192,17 +161,14 @@@ Create an alternate linker script for t
  
  At this point, it will be possible to run the `newt` tool to build your target. 
  
- You may find a few Mynewt specific functions missing.  We will describe these below.
 -You may find a few Mynewt specific functions missing.  We will describe 
 -these below
++You may run into complaints from the linker script that a few Mynewt specific functions are missing.  We will describe these below.
  
  | **Function** | **Description** |
  |-----------|-------------|
  | os_bsp_init() | code to initialize the bsp |
  | os_bsp_systick_init() | code to setup the system tick for the OS |
  
- You may also find several libc definitions that can be stubbed in your first BSP.  But you must implement the following function to provide memory to the OS and system.
 -You may also find several libc definitions that can be stubbed in your first 
 -BSP.  But you must implement this function to provide memory to the OS and
 -system.
++There are also several libc definitions that can be stubbed in your first BSP. Examples are `_write`, `_read`, etc. that can be found in `libc_stubs.c`. But you _must_ implement the following function to provide memory to the OS and system.
  
  | **Function** | **Description** |
  |-----------|-------------|
@@@ -234,4 -294,4 +232,4 @@@ package
  
  The `README.md` is a [markdown](https://en.wikipedia.org/wiki/Markdown)
   file that contains any documentation you 
--want to provide for the BSP.
++want to provide for the BSP.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/d668d1bd/docs/os/core_os/porting/port_cpu.md
----------------------------------------------------------------------
diff --cc docs/os/core_os/porting/port_cpu.md
index 13b9e06,183866d..d5e2c3f
--- a/docs/os/core_os/porting/port_cpu.md
+++ b/docs/os/core_os/porting/port_cpu.md
@@@ -3,10 -3,10 +3,9 @@@
  A new CPU architecture typically requires the following:
  
  * A new compiler
 -* new architecture specific code for the OS
 +* New architecture-specific code for the OS
  * Helper libraries to help others porting to the same architecture
  
--
  These are discussed below:
  
  ## Create A New Compiler
@@@ -24,14 -31,18 +23,11 @@@ Edit the `pkg.yml` file and change the 
  | compiler.flags.optimized | additional flags when the newt tool builds an optimized image |
  | compiler.flags.debug |   additional flags when the newt tool builds a debug image|
  
 -##Implement Architecture Specific OS Code
 -
 -There are a several architectures specific code functions that are required when
 -implementing a new architecture.  You can find examples in the `sim` 
 -architecture within Mynewt.
 -
 -When porting to a new CPU architecture, use the existing architectures as 
 -samples when writing your implementation.
 -
 -Please contact the Mynewt development list for help and advice porting
 -to new MCU.
 +##Implement architecture-specific OS code
  
 +There are several architecture-specific code functions that are required when implementing a new architecture.  You can find examples in the `sim` architecture within Mynewt.
  
 +When porting to a new CPU architecture, use the existing architectures as samples when writing your implementation.
  
 +Please contact the Mynewt development list for help and advice portingto new MCU.
  
- 
- 
- 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/d668d1bd/docs/os/core_os/porting/port_mcu.md
----------------------------------------------------------------------
diff --cc docs/os/core_os/porting/port_mcu.md
index 8316111,b3f21b4..8fe5fbf
--- a/docs/os/core_os/porting/port_mcu.md
+++ b/docs/os/core_os/porting/port_mcu.md
@@@ -1,22 -1,31 +1,21 @@@
  # Porting Mynewt to a new MCU
  
- Porting Mynew to a new MCU is not a difficult task if the core CPU architectures is already supported.
 -Porting Mynew to a new MCU is not a difficult task if the
 -core CPU architectures is already supported.
++Porting Mynewt to a new MCU is not a difficult task if the core CPU architectures is already supported.
  
 -The depth of work depends on the amount of hal support you need and 
 -provide in your port.
 +The depth of work depends on the amount of HAL (Hardware Abstraction Layer) support you need and provide in your port.
  
  To get started:
  
 -* create a `hw/mcu/mymcu` directory where mymcu is the MCU you are porting to.
 -Replace the name `mymcu` with a description of the MCU you are using.
 -* create a `hw/mcu/mymcu/variant` director where the variant is the specific
 -variant of the part you are usuing.  Many MCU parts have variants with different
 -capabilityes (RAM, FLASH etc) or different pinouts.  Replace `variant` with 
 -a description of the variant of the part you are using.
 -* create a `hw/mcu/mymcu/variant/pkg.yml` file.  Copy from another mcu and fill 
 -out the relevant information
 -* create  `hw/mcu/mymcu/variant/include`,
 -`hw/mcu/mymcu/variant/include/mcu`, and 
 -a `hw/mcu/mymcu/variant/src` directories to contain the code for your mcu.
 -
 +* Create a `hw/mcu/mymcu` directory where `mymcu` is the MCU you are porting to. Replace the name `mymcu` with a description of the MCU you are using.
 +* Create a `hw/mcu/mymcu/variant` directory where the variant is the specific variant of the part you are usuing.  Many MCU parts have variants with different capabilities (RAM, FLASH etc) or different pinouts.  Replace `variant` with a description of the variant of the part you are using.
 +* Create a `hw/mcu/mymcu/variant/pkg.yml` file.  Copy from another mcu and fill out the relevant information
 +* Create  `hw/mcu/mymcu/variant/include`,`hw/mcu/mymcu/variant/include/mcu`, and 
 +`hw/mcu/mymcu/variant/src` directories to contain the code for your mcu.
  
- 
  At this point there are two main tasks to complete.
  
 -* Implement any os specific code required by the OS
 -* Implement the hal functionality that you are looking for
 +* Implement any OS-specific code required by the OS
 +* Implement the HAL functionality that you are looking for
  
 -Please contact the Mynewt development list for help and advice porting
 -to new MCU.
 +Please contact the Mynewt development list for help and advice porting to new MCU.