summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Gielda <mgielda@antmicro.com>2014-04-08 23:23:32 +0200
committerMichael Gielda <mgielda@antmicro.com>2014-04-08 23:23:32 +0200
commita7c85f047fd2dc2d67a438e44b09f4a91e92ff57 (patch)
tree6bba049abcc927e6de334cbc35ccb9d1a18cc185
parent10f11ade130a2a462f13d8c91408f567b2047e1b (diff)
Divided docs into chapters, closes #5
-rw-r--r--README.rst6
-rw-r--r--doc/source/appendix-a.rst80
-rw-r--r--doc/source/appendix-b.rst46
-rw-r--r--doc/source/building.rst167
-rw-r--r--doc/source/index.rst5
-rw-r--r--doc/source/introduction.rst407
-rw-r--r--doc/source/running.rst106
7 files changed, 413 insertions, 404 deletions
diff --git a/README.rst b/README.rst
index a53974f..87faf9f 100644
--- a/README.rst
+++ b/README.rst
@@ -42,4 +42,8 @@ The documentation for this port, residing in the ``doc`` directory, is written i
It is however possible to use GitHub ``.rst`` file rendering as a fallback:
-* `introduction <doc/source/introduction.rst>`_
+* `Introduction <doc/source/introduction.rst>`_
+* `Building the eCos kernel and applications <doc/source/compiling.rst>`_
+* `Running an eCos application on Colibri VF61 <doc/source/running.rst>`_
+* `Appendix A: custom eCos configuration <doc/source/appendix-a.rst>`_
+* `Appendix B: POSIX and µITRON compatibility <doc/source/appendix-b.rst>`_
diff --git a/doc/source/appendix-a.rst b/doc/source/appendix-a.rst
new file mode 100644
index 0000000..3d456c2
--- /dev/null
+++ b/doc/source/appendix-a.rst
@@ -0,0 +1,80 @@
+Appendix A: custom eCos configuration
+=====================================
+
+ECos is called a *configurable* system for a reason: it contains a powerful infrastructure for choosing what system components and abstractions are included and how they are configured.
+
+This Appendix will describe briefly how to deal with :abbr:`.ecc` files for the Colibri VF61.
+
+Background
+----------
+
+The main tool used for building the eCos operating system is :program:`ecosconfig` (see :ref:`prerequisites`).
+The source tree of eCos, called **eCos repository** (like for example the source code tree provided in this release) is not built directly but instead first trimmed down and configured to suit the needs of a specific user and platform using :program:`ecosconfig`.
+This static pick-and-build procedure allows the user to exclude these elements of the system which are not necessary, thus reducing the memory footprint.
+This mechanism also enables easy configuration of system-wide variables and driver specific features.
+
+What exactly can be included, excluded or configured is determined by the contents of :file:`.cdl` files residing side by side with all source files in the eCos repository (usually in the :file:`cdl` directory on the same level as the :file:`src` directory of a given package, like a driver for a particular interface).
+
+:program:`configtool`
+---------------------
+
+:program:`configtool` is a GUI front-end to :program:`ecosconfig` to facilitate the creation of eCos configuration files.
+It also may be downloaded from `eCosCentric <http://www.ecoscentric.com/snapshots/configtool-100305.bz2>`_.
+
+.. warning::
+
+ :program:`configtool` (just like :program:`ecosconfig`) is a 32bit application, thus if you are using a 64bit OS you have to provide 32bit run-time libraries for compatibility. In a Debian-based Linux distributions these could be installed using the command ``sudo apt-get install ia32-libs``.
+
+Templates
+---------
+
+:program:`configtool` allows the user to build the system however they want using a graphical user interface, provided constraints in :file:`.cdl` files describing the system structure are maintained.
+
+While creating a new :abbr:`.ecc` file it is easier to also use a predefined template representing common use scenarios, such as **posix** which represents a system which has all the necessary packages to run typical POSIX programs or **redboot** which understandably is used to build a binary of RedBoot, the eCos bootloader.
+
+In order to select a template to base upon, use :menuselection:`build --> templates`.
+
+.. warning::
+
+ Remember that the templates are just general scenarios, which may contain settings incompatible with the desired ones (baudrates, console mangling, debug console choice, presence of RedBoot ROM monitor). It is necessary to tweak them according to your needs.
+
+Preparing an :abbr:`.ecc` file using :program:`configtool`
+----------------------------------------------------------
+
+Launch :program:`configtool`.
+
+Select :menuselection:`build --> repository` specify the path to eCos repository (the ``packages`` directory).
+Select the :menuselection:`build --> template` option and choose the :guilabel:`Toradex Colibri VF61` as your hardware platform with default set of packages.
+Click :guilabel:`continue` to proceed.
+
+When the default set of packages is used for the platform, the associated :abbr:`.ecc` file can already be prepared.
+Save it in a directory accessible by your build script and **remember to point to it in** :ref:`the kernel build script <build-kernel>`.
+
+Other packages can be added from :menuselection:`build --> packages`, bear in mind that you may need to alter the chosen packages and options to satisfy some ``.cdl`` constraints.
+
+.. _memory:
+
+Startup memory choice
+---------------------
+
+There are three memories from which eCos software may be launched in Colibri VF61.
+This is determined in the :abbr:`.ecc` file the eCos kernel was based on.
+
+By default the software is prepared to be launched from OnChip RAM (OCRAM).
+Alternatively DRAM memory may be used for booting.
+In this approach however the DDR memory block assigned to Linux must be limited to prevent Linux from accessing the memory region already occupied by eCos.
+This may be achieved by altering the boot arguments from U-Boot as described in the section entitled :ref:`u-boot`.
+
+The OCRAM and DDR scenarios are recommended; alternatively you may also try to run eCos from TCML, but this method was not tested.
+Besides, TCML offers a limited amount of memory which may be insufficient for many eCos applications.
+
+To modify the startup memory scenario in the eCos kernel, :program:`configtool` can be used.
+The appropriate menu option is:
+
+:menuselection:`eCos HAL --> Cortex-M Architecture --> Freescale Vybrid Cortex-M4 Variant --> Toradex Colibri VF61 Platform --> Startup type`
+
+The associated parameters are:
+
+* CYG_HAL_STARTUP_PLF (ByVariant / DRAM)
+* CYG_HAL_STARTUP_VAR (OCRAM / TCML)
+
diff --git a/doc/source/appendix-b.rst b/doc/source/appendix-b.rst
new file mode 100644
index 0000000..49da58e
--- /dev/null
+++ b/doc/source/appendix-b.rst
@@ -0,0 +1,46 @@
+Appendix B: POSIX and µITRON compatibility
+==========================================
+
+By default, eCos allows the user to enable POSIX or µITRON compatibility, which may be beneficial for many applications.
+This Appendix explains briefly how to use them with this eCos port.
+
+For more information refer to the `eCos Reference Guide`_, Chapters XIII and XIV.
+
+.. _eCos Reference Guide: http://ecos.sourceware.org/docs-3.0/pdf/ecos-3.0-ref-a4.pdf
+
+POSIX
+-----
+
+:abbr:`POSIX (Portable Operating System Interface)`, is a well-known family of OS standards.
+:abbr:`POSIX` defines the primitives, nomenclature and API which makes it easier to provide software compliance between operating systems.
+
+This is especially useful with regard to programming heterogeneous devices like the Colibri VF61,
+where (especially with the :abbr:`POSIX` compatibility layer enabled),
+the programming style for eCos applications dedicated for the Cortex-M4 core can vastly resemble that of Linux programs running on the Cortex-A5 core,
+lowering the entry barrier for programmers.
+
+.. todo::
+
+ Describe how to enable POSIX compatibility, and point to a sample program.
+
+µITRON
+------
+
+µITRON is a the name of an Japanese open standard for RTOS, originally undertaken in 1984 under the guidance of Ken Sakamura.
+eCos supports the µITRON version 3.02 specification, with complete "Standard functionality" (level S), plus many "Extended" (level E) functions.
+
+More about ITRON and µITRON can be read in the following sources:
+
+* `introduction to ITRON project <http://www.ertl.jp/ITRON/panph98/panph98-e.html>`_
+* `µITRON3.0 specification <http://www.ertl.jp/ITRON/spec-e.html#ITRON3>`_
+* Dr. Sakamura’s book: uITRON 3.0, An Open and Portable Real Time Operating System for Embedded Systems
+
+Since eCos was designed with the µITRON guidelines in mind, it is not strictly necessary to "activate" this compatibility layer, as an eCos application may fulfill the standard anyway.
+However, eCos provides a package named ``CYKPKG_UITRON`` setting some additional constraints, and adding it to the kernel is recommended for applications meant to be µITRON compliant.
+To activate this package, use either :program:`ecosconfig` (``ecosconfig add CYGPKG_UITRON``) or :program:`configtool`:
+
+#. Choose :menuselection:`Build --> Packages`
+#. Select :guilabel:`uITRON compatibility` and click :guilabel:`Add >>`, then :guilabel:`OK`
+#. A new package, ``uITRON compatibility layer`` should appear in the package list - save your :abbr:`.ecc` file and exit.
+
+A sample application, verified to work as expected using the port can be found inside the port code, in the subdirectory :file:`compat/uitron/current/tests/test3.c`
diff --git a/doc/source/building.rst b/doc/source/building.rst
new file mode 100644
index 0000000..8a8d801
--- /dev/null
+++ b/doc/source/building.rst
@@ -0,0 +1,167 @@
+Building the eCos kernel and applications
+=========================================
+
+This chapter describes how to build an eCos kernel and compile eCos applications for Colibri VF61.
+
+The build process was tested on the Gentoo, Debian, Ubuntu and Mint Linux distributions.
+The procedures described here should also work on other systems, but if you find any way to improve this manual with respect to tested platforms, please e-mail us at contact@antmicro.com.
+
+.. _prerequisites:
+
+Prerequisites
+-------------
+
+Toolchain
+~~~~~~~~~
+
+This port of eCos was prepared using a pre-built standard eCos toolchain, which can be obtained e.g. from the `GWDG FTP server <ftp://ftp.gwdg.de/pub/misc/sources.redhat.com/ecos/gnutools/i386linux/test/>`_.
+
+.. code-block:: bash
+
+ wget ftp://ftp.gwdg.de/pub/misc/sources.redhat.com/ecos/gnutools/i386linux/test/\
+ ecos-gnutools-arm-eabi-20120623.i386linux.tar.bz2
+ tar xjvf ecos-gnutools-arm-eabi-20120623.i386linux.tar.bz2
+
+Alternatively it is possible to compile eCos software using self-built toolchains as described `on the eCos website <http://ecos.sourceware.org/getstart.html>`_.
+
+To compile eCos and eCos applications, the toolchain's :file:`bin` directory has to be included in the PATH variable.
+The proper availability of the toolchain can be checked by finding out if ``arm-eabi-gcc`` is available from the shell.
+
+:program:`ecosconfig`
+~~~~~~~~~~~~~~~~~~~~~
+
+The :program:`ecosconfig` tool, available from the `eCosCentric website <http://www.ecoscentric.com/snapshots/ecosconfig-100305.bz2>`_, is used to generate the build tree from the main repository and is a mandatory requirement.
+:program:`ecosconfig` requires the tcl compiler to work.
+
+.. topic:: Installing tcl on Debian-based distributions
+
+ .. code-block:: bash
+
+ sudo apt-get install tcl8.5 # use sudo emerge dev-lang/tcl for Gentoo
+
+Now you can download and use :program:`ecosconfig`. You also need to make :program:`ecosconfig` executable after downloading and extracting it from the archive. It is also a good idea to make it available system-wide by moving it to ``/usr/local/bin``.
+
+.. topic:: Installing ecosconfig
+
+ .. code-block:: bash
+
+ wget http://www.ecoscentric.com/snapshots/ecosconfig-100305.bz2
+ bunzip2 ecosconfig-100305.bz2
+ chmod +x ecosconfig-100305
+ sudo mv ecosconfig-100305 /usr/local/bin/ecosconfig
+
+.. warning::
+
+ :program:`ecosconfig` is a 32bit application, thus if you are using a 64bit OS you have to provide 32bit run-time libraries for compatibility. In a Debian-based Linux distributions these could be installed using the command ``sudo apt-get install ia32-libs``.
+
+.. note::
+
+ The output of :program:`ecosconfig` are :abbr:`.ecc (eCos Configuration)` files which are in essence ``tcl`` scripts storing all the information on what elements will be included in the system image and how they will be configured.
+
+.. note::
+
+ A `handbook on ecosconfig <http://ecos.sourceware.org/docs-3.0/user-guide/using-ecosconfig-on-linux.html>`_ exists to help in the manual creation of :abbr:`.ecc` files.
+ Also, if you want to create custom eCos configuration files, see :doc:`appendix-a`.
+
+Source code
+-----------
+
+The source of the port can be downloaded by using the following command:
+
+.. topic:: Downloading the Colibri VF61 eCos source
+
+ .. code-block:: bash
+
+ git clone https://github.com/mgielda/ecos-colibri-vf61.git
+
+Preparing an :abbr:`.ecc` file
+------------------------------
+
+The actual configuration of the eCos system is maintained and modified through :program:`ecosconfig`.
+The following commands will prepare a sample :abbr:`.ecc` file for a kernel with default settings.
+
+.. topic:: Generating the kernel ecc file from scratch
+
+ .. code-block:: bash
+
+ export ECOS_REPOSITORY="{path/to/ecos-colibri-vf61/ecos}/packages" # modify
+ # Create ecos.ecc file based on Colibri VF61 default template
+ ecosconfig new col_vf61 default
+
+You now have a ``ecos.ecc`` file that holds the default eCos configuration for Colibri VF61.
+The file can be further edited manually with a text editor and/or :program:`ecosconfig` or graphically using :program:`configtool` (see :ref:`custom-config`), but at this moment it is already enough to compile a sample eCos kernel.
+
+.. _build-kernel:
+
+Building the kernel
+-------------------
+
+The eCos kernel is built in two stages:
+
+* first, a so-called *build tree* is generated from the eCos sources by :program:`ecosconfig`.
+ The build tree is customized for your build as configured in the :abbr:`.ecc` file used.
+ It is best to generate the build tree in a separate directory (here ``build-tree``).
+* then, the source files are compiled
+
+A short shell script is proposed to make the compilation process easier:
+
+.. topic:: Building the eCos kernel
+
+ .. code-block:: bash
+
+ export ECOS_REPOSITORY="{path/to/ecos-colibri-vf61/ecos}/packages" # modify
+ export PATH="{path/to/toolchain}/bin:$PATH" # modify
+
+ mkdir -p build-tree
+ rm -rf build-tree/*
+ cd build-tree
+
+ ecosconfig --config={path/to}/ecos.ecc tree # modify
+ make
+ cd ..
+
+The resulting kernel files can be found in :file:`build-tree/install/lib`.
+
+Application
+-----------
+
+With a compiled kernel files in the :file:`build-tree/install/lib` directory (see :ref:`build-kernel`), a user space eCos application can be compiled and linked to it.
+
+A listing for a short sample application (taken from :file:`ecos-colibri-vf61/ecos/examples/hello.c`) is given below.
+
+.. topic:: hello.c - sample application
+
+ .. code-block:: c
+
+ #include <stdio.h>
+
+ int main(void)
+ {
+ printf("Hello, eCos world!\r\n");
+ return 0;
+ }
+
+You can compile an eCos program with a procedure similar to the following listing (which you can save for reuse, for example as ``make.sh``):
+
+.. topic:: Building a user space application
+
+ .. code-block:: bash
+
+ export PATH="{path/to/toolchain}/bin:$PATH" # modify
+
+ # Set compiler options
+ OPT="-Wall -Wpointer-arith -Wstrict-prototypes -Wundef \
+ -Wno-write-strings -mthumb -g -O2 -fdata-sections \
+ -ffunction-sections -fno-exceptions -nostdlib \
+ -mcpu=cortex-m4"
+
+ # Set path to eCos kernel
+ BTPATH="{path/to/ecos/build-tree}" # modify
+
+ # Do compilation and link your application with kernel
+ arm-eabi-gcc -g -I./ -g -I${BTPATH}/install/include hello.c \
+ -L${BTPATH}/install/lib -Ttarget.ld ${OPT}
+
+ # Use objcopy to generate a binary
+ arm-eabi-objcopy -O binary a.out hello.bin
+
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 061c2b0..3744f28 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -5,3 +5,8 @@
:maxdepth: 2
introduction
+ building
+ running
+ appendix-a
+ appendix-b
+
diff --git a/doc/source/introduction.rst b/doc/source/introduction.rst
index 211b5a1..965c35e 100644
--- a/doc/source/introduction.rst
+++ b/doc/source/introduction.rst
@@ -14,6 +14,8 @@ The documentation for eCos 3.0, which is the most recent version of the system a
A comprehensive PDF `eCos Reference Guide`_ is also available from the eCos website.
+.. _eCos Reference Guide: http://ecos.sourceware.org/docs-3.0/pdf/ecos-3.0-ref-a4.pdf
+
Licence
-------
@@ -39,7 +41,7 @@ This eCos port provides the following software packages specific for Toradex Col
* GPIO handling
Also, the port has been verified to work with the standard eCos POSIX an µITRON compatibility layers.
-See :ref:`appendix-b` for more information on this.
+See :doc:`appendix-b` for more information on this.
Version information
-------------------
@@ -53,406 +55,5 @@ Version information
Michael Gielda,Running programs,2014-03-28,0.3.1
Michael Gielda,Further updates,2014-04-02,0.3.2
Michael Gielda,Further updates & Appendix B,2014-04-07,0.4.0
+ Michael Gielda,Cleanup & division into files,2014-04-08,0.5.0
-Compiling the system
-====================
-
-The compilation process was tested on the Gentoo, Debian, Ubuntu and Mint Linux distributions. The procedures described here should also work on other systems, but if you find any way to improve this manual with respect to tested platforms, please e-mail us at contact@antmicro.com.
-
-.. _prerequisites:
-
-Prerequisites
--------------
-
-Toolchain
-~~~~~~~~~
-
-This port of eCos was prepared using a pre-built standard eCos toolchain, which can be obtained e.g. from the `GWDG FTP server <ftp://ftp.gwdg.de/pub/misc/sources.redhat.com/ecos/gnutools/i386linux/test/>`_.
-
-.. code-block:: bash
-
- wget ftp://ftp.gwdg.de/pub/misc/sources.redhat.com/ecos/gnutools/i386linux/test/\
- ecos-gnutools-arm-eabi-20120623.i386linux.tar.bz2
- tar xjvf ecos-gnutools-arm-eabi-20120623.i386linux.tar.bz2
-
-Alternatively it is possible to compile eCos software using self-built toolchains as described `on the eCos website <http://ecos.sourceware.org/getstart.html>`_, and proceed with the instructions given there.
-
-To compile eCos and eCos applications, the toolchain's :file:`bin` directory has to be included in the PATH variable.
-The proper availability of the toolchain can be checked by finding out if ``arm-eabi-gcc`` is available from the shell.
-
-:program:`ecosconfig`
-~~~~~~~~~~~~~~~~~~~~~
-
-The :program:`ecosconfig` tool, available from the `eCosCentric website <http://www.ecoscentric.com/snapshots/ecosconfig-100305.bz2>`_, is used to generate the build tree from the main repository and is a mandatory requirement.
-:program:`ecosconfig` requires the tcl compiler to work.
-
-.. topic:: Installing tcl on Debian-based distributions
-
- .. code-block:: bash
-
- sudo apt-get install tcl8.5 # use sudo emerge dev-lang/tcl for Gentoo
-
-Now you can download and use :program:`ecosconfig`. You also need to make :program:`ecosconfig` executable after downloading and extracting it from the archive. It is also a good idea to make it available system-wide by moving it to ``/usr/local/bin``.
-
-.. topic:: Installing ecosconfig
-
- .. code-block:: bash
-
- wget http://www.ecoscentric.com/snapshots/ecosconfig-100305.bz2
- bunzip2 ecosconfig-100305.bz2
- chmod +x ecosconfig-100305
- sudo mv ecosconfig-100305 /usr/local/bin/ecosconfig
-
-.. warning::
-
- :program:`ecosconfig` is a 32bit application, thus if you are using a 64bit OS you have to provide 32bit run-time libraries for compatibility. In a Debian-based Linux distributions these could be installed using the command ``sudo apt-get install ia32-libs``.
-
-.. note::
-
- The output of :program:`ecosconfig` are :abbr:`.ecc (eCos Configuration)` files which are in essence ``tcl`` scripts storing all the information on what elements will be included in the system image and how they will be configured.
-
-.. note::
-
- A `handbook on ecosconfig <http://ecos.sourceware.org/docs-3.0/user-guide/using-ecosconfig-on-linux.html>`_ exists to help in the manual creation of :abbr:`.ecc` files.
- Also, if you want to create custom eCos configuration files, see :ref:`appendix-a`.
-
-Source code
------------
-
-The source of the port can be downloaded by using the following command:
-
-.. topic:: Downloading the Colibri VF61 eCos source
-
- .. code-block:: bash
-
- git clone https://github.com/mgielda/ecos-colibri-vf61.git
-
-Preparing an :abbr:`.ecc` file
-------------------------------
-
-The actual configuration of the eCos system is maintained and modified through :program:`ecosconfig`.
-The following commands will prepare a sample :abbr:`.ecc` file for a kernel with default settings.
-
-.. topic:: Generating the kernel ecc file from scratch
-
- .. code-block:: bash
-
- export ECOS_REPOSITORY="{path/to/ecos-colibri-vf61/ecos}/packages" # modify
- # Create ecos.ecc file based on Colibri VF61 default template
- ecosconfig new col_vf61 default
-
-You now have a ``ecos.ecc`` file that holds the default eCos configuration for Colibri VF61.
-The file can be further edited manually with a text editor and/or :program:`ecosconfig` or graphically using :program:`configtool` (see :ref:`custom-config`), but at this moment it is already enough to compile a sample eCos kernel.
-
-.. _build-kernel:
-
-Building the kernel
--------------------
-
-The eCos kernel is built in two stages:
-
-* first, a so-called *build tree* is generated from the eCos sources by :program:`ecosconfig`.
- The build tree is customized for your build as configured in the :abbr:`.ecc` file used.
- It is best to generate the build tree in a separate directory (here ``build-tree``).
-* then, the source files are compiled
-
-A short shell script is proposed to make the compilation process easier:
-
-.. topic:: Building the eCos kernel
-
- .. code-block:: bash
-
- export ECOS_REPOSITORY="{path/to/ecos-colibri-vf61/ecos}/packages" # modify
- export PATH="{path/to/toolchain}/bin:$PATH" # modify
-
- mkdir -p build-tree
- rm -rf build-tree/*
- cd build-tree
-
- ecosconfig --config={path/to}/ecos.ecc tree # modify
- make
- cd ..
-
-The resulting kernel files can be found in :file:`build-tree/install/lib`.
-
-Application
------------
-
-With a compiled kernel files in the :file:`build-tree/install/lib` directory (see :ref:`build-kernel`), a user space eCos application can be compiled and linked to it.
-
-A listing for a short sample application (taken from :file:`ecos-colibri-vf61/ecos/examples/hello.c`) is given below.
-
-.. topic:: hello.c - sample application
-
- .. code-block:: c
-
- #include <stdio.h>
-
- int main(void)
- {
- printf("Hello, eCos world!\r\n");
- return 0;
- }
-
-You can compile an eCos program with a procedure similar to the following listing (which you can save for reuse, for example as ``make.sh``):
-
-.. topic:: Building a user space application
-
- .. code-block:: bash
-
- export PATH="{path/to/toolchain}/bin:$PATH" # modify
-
- # Set compiler options
- OPT="-Wall -Wpointer-arith -Wstrict-prototypes -Wundef \
- -Wno-write-strings -mthumb -g -O2 -fdata-sections \
- -ffunction-sections -fno-exceptions -nostdlib \
- -mcpu=cortex-m4"
-
- # Set path to eCos kernel
- BTPATH="{path/to/ecos/build-tree}" # modify
-
- # Do compilation and link your application with kernel
- arm-eabi-gcc -g -I./ -g -I${BTPATH}/install/include hello.c \
- -L${BTPATH}/install/lib -Ttarget.ld ${OPT}
-
- # Use objcopy to generate a binary
- arm-eabi-objcopy -O binary a.out hello.bin
-
-Running and usage
-=================
-
-This chapter will explain how to run the eCos application on the Vybrid Cortex-M core from the Cortex-A core in two ways: either from Linux using ``MQXBboot`` or from U-Boot using TFTP.
-
-Vybrid has three available memory regions:
-
-* OCRAM - 256KB - Default.
-* DRAM - 10MB - Available, but needs limiting Linux RAM memory.
-* TCML - 32KB - Small. Not recommended.
-
-.. note::
-
- Out of the 16MB of the DRAM memory in the CPU, 6MB was reserved for enabling the passing of large data blocks between Cortex-A and Cortex-M.
- This setting can be changed in the ``mlt_vybrid_ext_dram.ldi`` file located in ``ecos/packages/hal/cortexm/vybrid/col_vf61/current/include/pkgconf/``, by modifying the ``DRAM LENGTH`` and ``hal_startup_stack`` values (currently ``0x9FFFF0``).
-
-U-Boot over TFTP
-----------------
-
-Set up TFTP on your host machine and put the binary to be loaded (for example, ``hello.bin``) there. Make sure your host machine is connected to the network and you know its IP address.
-
-.. _u-boot:
-
-Configuring U-Boot
-~~~~~~~~~~~~~~~~~~
-
-.. note::
-
- The memory restriction is mandatory only if DRAM is used to run eCos. See :ref:`memory` for details.
-
-Connect the module to the network with an Ethernet cable, power it on.
-Enter U-Boot and then use the following command sequence:
-
-.. code-block:: bash
-
- dhcp # set module IP address
- set memargs mem=240M # restrict Linux memory space
- set serverip xxx.xxx.xxx.xxx # set TFTP server address
- save # save the configuration
-
-Run the application
-~~~~~~~~~~~~~~~~~~~
-
-The application can then be run over TFTP with the ``tftp`` command.
-The two other ``mw`` commands will set the entry point and turn on the clocks, respectively.
-OCRAM is recommended as default, but you may refer to :ref:`memory` for information on what memory to use and how to get eCos to run from it.
-
-.. topic:: OCRAM (default)
-
- .. code-block:: bash
-
- tftp 0x3f000400 hello.bin
- mw.l 0x4006e028 0x1f000411
- mw.l 0x4006b08c 0x00015a5a
-
-.. topic:: DRAM
-
- .. code-block:: bash
-
- tftp 0x8f000400 hello.bin
- mw.l 0x4006e028 0x0f000411
- mw.l 0x4006b08c 0x00015a5a
-
-.. topic:: TCML
-
- .. code-block:: bash
-
- tftp 0x1f800400 hello.bin
- mw.l 0x4006e028 0x1f800411
- mw.l 0x4006b08c 0x00015a5a
-
-Linux over MQXBoot
-------------------
-
-Requirements
-~~~~~~~~~~~~
-
-The following have to be present on the Cortex-A Linux (apart from the eCos binary) to make this method possible:
-
-* ``mcc.ko`` kernel module
-* ``mqxboot`` binary
-
-.. _running:
-
-Running
-~~~~~~~
-
-The command to run the binary depends on the memory we want to use.
-OCRAM is recommended as default, but you may refer to :ref:`memory` for information on what memory to use and how to get eCos to run from it.
-
-.. topic:: Loading to OCRAM (default)
-
- .. code-block:: bash
-
- mqxboot hello.bin 0x3f000400 0x1f000411
-
-.. topic:: Loading to DRAM
-
- .. code-block:: bash
-
- mqxboot hello.bin 0x8f000400 0x0f000411
-
-.. topic:: Loading to TCML
-
- .. code-block:: bash
-
- mqxboot hello.bin 0x1f800400 0x1f800411
-
-.. _appendix-a:
-
-Appendix A: custom eCos configuration
-=====================================
-
-ECos is called a *configurable* system for a reason: it contains a powerful infrastructure for choosing what system components and abstractions are included and how they are configured.
-
-This Appendix will describe briefly how to deal with :abbr:`.ecc` files for the Colibri VF61.
-
-Background
-----------
-
-The main tool used for building the eCos operating system is :program:`ecosconfig` (see :ref:`prerequisites`).
-The source tree of eCos, called **eCos repository** (like for example the source code tree provided in this release) is not built directly but instead first trimmed down and configured to suit the needs of a specific user and platform using :program:`ecosconfig`.
-This static pick-and-build procedure allows the user to exclude these elements of the system which are not necessary, thus reducing the memory footprint.
-This mechanism also enables easy configuration of system-wide variables and driver specific features.
-
-What exactly can be included, excluded or configured is determined by the contents of :file:`.cdl` files residing side by side with all source files in the eCos repository (usually in the :file:`cdl` directory on the same level as the :file:`src` directory of a given package, like a driver for a particular interface).
-
-:program:`configtool`
----------------------
-
-:program:`configtool` is a GUI front-end to :program:`ecosconfig` to facilitate the creation of eCos configuration files.
-It also may be downloaded from `eCosCentric <http://www.ecoscentric.com/snapshots/configtool-100305.bz2>`_.
-
-.. warning::
-
- :program:`configtool` (just like :program:`ecosconfig`) is a 32bit application, thus if you are using a 64bit OS you have to provide 32bit run-time libraries for compatibility. In a Debian-based Linux distributions these could be installed using the command ``sudo apt-get install ia32-libs``.
-
-Templates
----------
-
-:program:`configtool` allows the user to build the system however they want using a graphical user interface, provided constraints in :file:`.cdl` files describing the system structure are maintained.
-
-While creating a new :abbr:`.ecc` file it is easier to also use a predefined template representing common use scenarios, such as **posix** which represents a system which has all the necessary packages to run typical POSIX programs or **redboot** which understandably is used to build a binary of RedBoot, the eCos bootloader.
-
-In order to select a template to base upon, use :menuselection:`build --> templates`.
-
-.. warning::
-
- Remember that the templates are just general scenarios, which may contain settings incompatible with the desired ones (baudrates, console mangling, debug console choice, presence of RedBoot ROM monitor). It is necessary to tweak them according to your needs.
-
-Preparing an :abbr:`.ecc` file using :program:`configtool`
-----------------------------------------------------------
-
-Launch :program:`configtool`.
-
-Select :menuselection:`build --> repository` specify the path to eCos repository (the ``packages`` directory).
-Select the :menuselection:`build --> template` option and choose the :guilabel:`Toradex Colibri VF61` as your hardware platform with default set of packages.
-Click :guilabel:`continue` to proceed.
-
-When the default set of packages is used for the platform, the associated :abbr:`.ecc` file can already be prepared.
-Save it in a directory accessible by your build script and **remember to point to it in** :ref:`the kernel build script <build-kernel>`.
-
-Other packages can be added from :menuselection:`build --> packages`, bear in mind that you may need to alter the chosen packages and options to satisfy some ``.cdl`` constraints.
-
-.. _memory:
-
-Startup memory choice
----------------------
-
-There are three memories from which eCos software may be launched in Colibri VF61.
-This is determined in the :abbr:`.ecc` file the eCos kernel was based on.
-
-By default the software is prepared to be launched from OnChip RAM (OCRAM).
-Alternatively DRAM memory may be used for booting.
-In this approach however the DDR memory block assigned to Linux must be limited to prevent Linux from accessing the memory region already occupied by eCos.
-This may be achieved by altering the boot arguments from U-Boot as described in the section entitled :ref:`u-boot`.
-
-The OCRAM and DDR scenarios are recommended; alternatively you may also try to run eCos from TCML, but this method was not tested.
-Besides, TCML offers a limited amount of memory which may be insufficient for many eCos applications.
-
-To modify the startup memory scenario in the eCos kernel, :program:`configtool` can be used.
-The appropriate menu option is:
-
-:menuselection:`eCos HAL --> Cortex-M Architecture --> Freescale Vybrid Cortex-M4 Variant --> Toradex Colibri VF61 Platform --> Startup type`
-
-The associated parameters are:
-
-* CYG_HAL_STARTUP_PLF (ByVariant / DRAM)
-* CYG_HAL_STARTUP_VAR (OCRAM / TCML)
-
-.. _appendix-b:
-
-Appendix B: POSIX and µITRON compatibility
-==========================================
-
-By default, eCos allows the user to enable POSIX or µITRON compatibility, which may be beneficial for many applications.
-This Appendix explains briefly how to use them with this eCos port.
-
-For more information refer to the `eCos Reference Guide`_, Chapters XIII and XIV.
-
-POSIX
------
-
-:abbr:`POSIX (Portable Operating System Interface)`, is a well-known family of OS standards.
-:abbr:`POSIX` defines the primitives, nomenclature and API which makes it easier to provide software compliance between operating systems.
-
-This is especially useful with regard to programming heterogeneous devices like the Colibri VF61,
-where (especially with the :abbr:`POSIX` compatibility layer enabled),
-the programming style for eCos applications dedicated for the Cortex-M4 core can vastly resemble that of Linux programs running on the Cortex-A5 core,
-lowering the entry barrier for programmers.
-
-.. todo::
-
- Describe how to enable POSIX compatibility, and point to a sample program.
-
-µITRON
-------
-
-µITRON is a the name of an Japanese open standard for RTOS, originally undertaken in 1984 under the guidance of Ken Sakamura.
-eCos supports the µITRON version 3.02 specification, with complete "Standard functionality" (level S), plus many "Extended" (level E) functions.
-
-More about ITRON and µITRON can be read in the following sources:
-
-* `introduction to ITRON project <http://www.ertl.jp/ITRON/panph98/panph98-e.html>`_
-* `µITRON3.0 specification <http://www.ertl.jp/ITRON/spec-e.html#ITRON3>`_
-* Dr. Sakamura’s book: uITRON 3.0, An Open and Portable Real Time Operating System for Embedded Systems
-
-Since eCos was designed with the µITRON guidelines in mind, it is not strictly necessary to "activate" this compatibility layer, as an eCos application may fulfill the standard anyway.
-However, eCos provides a package named ``CYKPKG_UITRON`` setting some additional constraints, and adding it to the kernel is recommended for applications meant to be µITRON compliant.
-To activate this package, use either :program:`ecosconfig` (``ecosconfig add CYGPKG_UITRON``) or :program:`configtool`:
-
-#. Choose :menuselection:`Build --> Packages`
-#. Select :guilabel:`uITRON compatibility` and click :guilabel:`Add >>`, then :guilabel:`OK`
-#. A new package, ``uITRON compatibility layer`` should appear in the package list - save your :abbr:`.ecc` file and exit.
-
-A sample application, verified to work as expected using the port can be found inside the port code, in the subdirectory :file:`compat/uitron/current/tests/test3.c`
-
-.. _eCos Reference Guide: http://ecos.sourceware.org/docs-3.0/pdf/ecos-3.0-ref-a4.pdf
diff --git a/doc/source/running.rst b/doc/source/running.rst
new file mode 100644
index 0000000..76581df
--- /dev/null
+++ b/doc/source/running.rst
@@ -0,0 +1,106 @@
+Running an eCos application on Colibri VF61
+===========================================
+
+This chapter will explain how to run the eCos application on the Colibri VF61 Cortex-M core from the Cortex-A core in two ways: either from Linux using ``MQXBboot`` or from U-Boot using TFTP.
+
+Vybrid has three available memory regions:
+
+* OCRAM - 256KB - Default.
+* DRAM - 10MB - Available, but needs limiting Linux RAM memory.
+* TCML - 32KB - Small. Not recommended.
+
+.. note::
+
+ Out of the 16MB of the DRAM memory in the CPU, 6MB was reserved for enabling the passing of large data blocks between Cortex-A and Cortex-M.
+ This setting can be changed in the ``mlt_vybrid_ext_dram.ldi`` file located in ``ecos/packages/hal/cortexm/vybrid/col_vf61/current/include/pkgconf/``, by modifying the ``DRAM LENGTH`` and ``hal_startup_stack`` values (currently ``0x9FFFF0``).
+
+U-Boot over TFTP
+----------------
+
+Set up TFTP on your host machine and put the binary to be loaded (for example, ``hello.bin``) there. Make sure your host machine is connected to the network and you know its IP address.
+
+.. _u-boot:
+
+Configuring U-Boot
+~~~~~~~~~~~~~~~~~~
+
+.. note::
+
+ The memory restriction is mandatory only if DRAM is used to run eCos. See :ref:`memory` for details.
+
+Connect the module to the network with an Ethernet cable, power it on.
+Enter U-Boot and then use the following command sequence:
+
+.. code-block:: bash
+
+ dhcp # set module IP address
+ set memargs mem=240M # restrict Linux memory space
+ set serverip xxx.xxx.xxx.xxx # set TFTP server address
+ save # save the configuration
+
+Running from U-Boot
+~~~~~~~~~~~~~~~~~~~
+
+The application can then be run over TFTP with the ``tftp`` command.
+The two other ``mw`` commands will set the entry point and turn on the clocks, respectively.
+OCRAM is recommended as default, but you may refer to :ref:`memory` for information on what memory to use and how to get eCos to run from it.
+
+.. topic:: OCRAM (default)
+
+ .. code-block:: bash
+
+ tftp 0x3f000400 hello.bin
+ mw.l 0x4006e028 0x1f000411
+ mw.l 0x4006b08c 0x00015a5a
+
+.. topic:: DRAM
+
+ .. code-block:: bash
+
+ tftp 0x8f000400 hello.bin
+ mw.l 0x4006e028 0x0f000411
+ mw.l 0x4006b08c 0x00015a5a
+
+.. topic:: TCML
+
+ .. code-block:: bash
+
+ tftp 0x1f800400 hello.bin
+ mw.l 0x4006e028 0x1f800411
+ mw.l 0x4006b08c 0x00015a5a
+
+Linux over MQXBoot
+------------------
+
+Requirements
+~~~~~~~~~~~~
+
+The following have to be present on the Cortex-A Linux (apart from the eCos binary) to make this method possible:
+
+* ``mcc.ko`` kernel module
+* ``mqxboot`` binary
+
+Running from MQXBoot
+~~~~~~~~~~~~~~~~~~~~
+
+The command to run the binary depends on the memory we want to use.
+OCRAM is recommended as default, but you may refer to :ref:`memory` for information on what memory to use and how to get eCos to run from it.
+
+.. topic:: Loading to OCRAM (default)
+
+ .. code-block:: bash
+
+ mqxboot hello.bin 0x3f000400 0x1f000411
+
+.. topic:: Loading to DRAM
+
+ .. code-block:: bash
+
+ mqxboot hello.bin 0x8f000400 0x0f000411
+
+.. topic:: Loading to TCML
+
+ .. code-block:: bash
+
+ mqxboot hello.bin 0x1f800400 0x1f800411
+