summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMichael Gielda <mgielda@antmicro.com>2014-04-03 14:53:04 +0200
committerMichael Gielda <mgielda@antmicro.com>2014-04-03 14:53:04 +0200
commitae1e4e08a1005a0c487f03ba189d7536e7fdcba6 (patch)
treef1c296f8a966a9a39876b0e98e16d9c5da1776dd /doc
parentf157da5337118d3c5cd464266796de4262ac9dbd (diff)
Added the OS files
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile110
-rw-r--r--doc/make.bat155
-rw-r--r--doc/source/antmicro.sty32
-rw-r--r--doc/source/conf.py227
-rw-r--r--doc/source/images/logo-400.pngbin0 -> 11981 bytes
-rw-r--r--doc/source/index.rst7
-rw-r--r--doc/source/introduction.rst399
7 files changed, 930 insertions, 0 deletions
diff --git a/doc/Makefile b/doc/Makefile
new file mode 100644
index 0000000..92225b6
--- /dev/null
+++ b/doc/Makefile
@@ -0,0 +1,110 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+PAPER =
+BUILDDIR = build
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp epub latex latexpdf text man changes linkcheck doctest
+
+help:
+ @echo "Please use \`make <target>' where <target> is one of"
+ @echo " html to make standalone HTML files"
+ @echo " dirhtml to make HTML files named index.html in directories"
+ @echo " singlehtml to make a single large HTML file"
+ @echo " pickle to make pickle files"
+ @echo " json to make JSON files"
+ @echo " htmlhelp to make HTML files and a HTML help project"
+ @echo " epub to make an epub"
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ @echo " latexpdf to make LaTeX files and run them through pdflatex"
+ @echo " text to make text files"
+ @echo " man to make manual pages"
+ @echo " changes to make an overview of all changed/added/deprecated items"
+ @echo " linkcheck to check all external links for integrity"
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+ -rm -rf $(BUILDDIR)/*
+
+html:
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+ $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+ @echo
+ @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+ @echo
+ @echo "Build finished; now you can process the pickle files."
+
+json:
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+ @echo
+ @echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+ @echo
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+epub:
+ $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+ @echo
+ @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo
+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+ @echo "Run \`make' in that directory to run these through (pdf)latex" \
+ "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo "Running LaTeX files through pdflatex..."
+ make -C $(BUILDDIR)/latex all-pdf
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+ $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+ @echo
+ @echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+ $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+ @echo
+ @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+changes:
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+ @echo
+ @echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+ @echo
+ @echo "Link check complete; look for any errors in the above output " \
+ "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+ @echo "Testing of doctests in the sources finished, look at the " \
+ "results in $(BUILDDIR)/doctest/output.txt."
diff --git a/doc/make.bat b/doc/make.bat
new file mode 100644
index 0000000..041c58f
--- /dev/null
+++ b/doc/make.bat
@@ -0,0 +1,155 @@
+@ECHO OFF
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+ set SPHINXBUILD=sphinx-build
+)
+set BUILDDIR=build
+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
+if NOT "%PAPER%" == "" (
+ set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
+)
+
+if "%1" == "" goto help
+
+if "%1" == "help" (
+ :help
+ echo.Please use `make ^<target^>` where ^<target^> is one of
+ echo. html to make standalone HTML files
+ echo. dirhtml to make HTML files named index.html in directories
+ echo. singlehtml to make a single large HTML file
+ echo. pickle to make pickle files
+ echo. json to make JSON files
+ echo. htmlhelp to make HTML files and a HTML help project
+ echo. qthelp to make HTML files and a qthelp project
+ echo. devhelp to make HTML files and a Devhelp project
+ echo. epub to make an epub
+ echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
+ echo. text to make text files
+ echo. man to make manual pages
+ echo. changes to make an overview over all changed/added/deprecated items
+ echo. linkcheck to check all external links for integrity
+ echo. doctest to run all doctests embedded in the documentation if enabled
+ goto end
+)
+
+if "%1" == "clean" (
+ for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
+ del /q /s %BUILDDIR%\*
+ goto end
+)
+
+if "%1" == "html" (
+ %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/html.
+ goto end
+)
+
+if "%1" == "dirhtml" (
+ %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
+ goto end
+)
+
+if "%1" == "singlehtml" (
+ %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
+ goto end
+)
+
+if "%1" == "pickle" (
+ %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
+ echo.
+ echo.Build finished; now you can process the pickle files.
+ goto end
+)
+
+if "%1" == "json" (
+ %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
+ echo.
+ echo.Build finished; now you can process the JSON files.
+ goto end
+)
+
+if "%1" == "htmlhelp" (
+ %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
+ echo.
+ echo.Build finished; now you can run HTML Help Workshop with the ^
+.hhp project file in %BUILDDIR%/htmlhelp.
+ goto end
+)
+
+if "%1" == "qthelp" (
+ %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
+ echo.
+ echo.Build finished; now you can run "qcollectiongenerator" with the ^
+.qhcp project file in %BUILDDIR%/qthelp, like this:
+ echo.^> qcollectiongenerator %BUILDDIR%\qthelp\U-BootforToradexColibrimodulewithnVidiaTegra2.qhcp
+ echo.To view the help file:
+ echo.^> assistant -collectionFile %BUILDDIR%\qthelp\U-BootforToradexColibrimodulewithnVidiaTegra2.ghc
+ goto end
+)
+
+if "%1" == "devhelp" (
+ %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
+ echo.
+ echo.Build finished.
+ goto end
+)
+
+if "%1" == "epub" (
+ %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
+ echo.
+ echo.Build finished. The epub file is in %BUILDDIR%/epub.
+ goto end
+)
+
+if "%1" == "latex" (
+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+ echo.
+ echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
+ goto end
+)
+
+if "%1" == "text" (
+ %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
+ echo.
+ echo.Build finished. The text files are in %BUILDDIR%/text.
+ goto end
+)
+
+if "%1" == "man" (
+ %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
+ echo.
+ echo.Build finished. The manual pages are in %BUILDDIR%/man.
+ goto end
+)
+
+if "%1" == "changes" (
+ %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
+ echo.
+ echo.The overview file is in %BUILDDIR%/changes.
+ goto end
+)
+
+if "%1" == "linkcheck" (
+ %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
+ echo.
+ echo.Link check complete; look for any errors in the above output ^
+or in %BUILDDIR%/linkcheck/output.txt.
+ goto end
+)
+
+if "%1" == "doctest" (
+ %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
+ echo.
+ echo.Testing of doctests in the sources finished, look at the ^
+results in %BUILDDIR%/doctest/output.txt.
+ goto end
+)
+
+:end
diff --git a/doc/source/antmicro.sty b/doc/source/antmicro.sty
new file mode 100644
index 0000000..114159e
--- /dev/null
+++ b/doc/source/antmicro.sty
@@ -0,0 +1,32 @@
+\usepackage{xcolor}
+
+\definecolor{AMaubergine}{rgb}{0.2,0.18,0.22}
+\definecolor{AMorange}{rgb}{0.84,0.32,0.28}
+
+% Redefine these colors to your liking in the preamble.
+\definecolor{TitleColor}{named}{AMorange}
+\definecolor{InnerLinkColor}{named}{AMorange}
+\definecolor{OuterLinkColor}{named}{AMorange}
+% Redefine these colors to something not white if you want to have colored
+% background and border for code examples.
+%\definecolor{VerbatimColor}{rgb}{0.92,0.92,0.92}%{0.99,0.77,0.65}
+%\definecolor{VerbatimBorderColor}{named}{AMaubergine}
+
+\makeatletter
+ \fancypagestyle{normal}{
+ \fancyhf{}
+ \headheight 40pt
+ \setlength{\topmargin}{-20mm}
+ \fancyfoot[LE,RO]{{\py@HeaderFamily\thepage}}
+ \fancyfoot[LO,RE]{{\py@HeaderFamily \@title}}
+ \fancyhead[LO]{{\py@HeaderFamily\nouppercase{\rightmark}}}
+ \fancyhead[RE]{{\py@HeaderFamily\nouppercase{\leftmark}}}
+ \fancyhead[LE,RO]{{\includegraphics[height=25pt]{logo-400.png}}}
+ \renewcommand{\headrulewidth}{0.4pt}
+ \renewcommand{\footrulewidth}{0.4pt}
+ }
+\makeatother
+
+\PassOptionsToClass{openany}{\sphinxdocclass}
+
+\renewcommand{\releasename}{}
diff --git a/doc/source/conf.py b/doc/source/conf.py
new file mode 100644
index 0000000..1342b39
--- /dev/null
+++ b/doc/source/conf.py
@@ -0,0 +1,227 @@
+# -*- coding: utf-8 -*-
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration -----------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ['sphinx.ext.todo', 'sphinx.ext.ifconfig']
+todo_include_todos=False
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'ECos for Toradex Colibri VF61 Freescale Vybrid CoM - manual'
+basic_filename = u'ECos-for-Toradex-Colibri-VF61-Freescale-Vybrid-CoM--manual'
+authors = u'Antmicro Ltd'
+copyright = u'2014 - ' + authors
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = ''
+# The full version, including alpha/beta/rc tags.
+release = ''
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = []
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents. If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar. Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it. The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = basic_filename
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+latex_font_size = '11pt,oneside'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+ ('index', basic_filename+'.tex', project,
+ authors, 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+latex_logo = 'images/logo-400.png'
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output --------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+ ('index', basic_filename, project,
+ [authors], 1)
+]
+
+latex_additional_files = ['antmicro.sty','images/logo-400.png']
+
+latex_elements = {
+ 'fontpkg': '\\usepackage{palatino}',
+ 'preamble': r'''\usepackage{antmicro}''',
+ 'maketitle': r'''\renewcommand{\releasename}{}\maketitle''',
+ 'classoptions':',openany,oneside',
+ 'babel': '\\usepackage[english]{babel}'
+}
+
+rst_epilog = "\n.. |project| replace:: "+project+" \n"
diff --git a/doc/source/images/logo-400.png b/doc/source/images/logo-400.png
new file mode 100644
index 0000000..88fcb0d
--- /dev/null
+++ b/doc/source/images/logo-400.png
Binary files differ
diff --git a/doc/source/index.rst b/doc/source/index.rst
new file mode 100644
index 0000000..061c2b0
--- /dev/null
+++ b/doc/source/index.rst
@@ -0,0 +1,7 @@
+|project|
+=========
+
+.. toctree::
+ :maxdepth: 2
+
+ introduction
diff --git a/doc/source/introduction.rst b/doc/source/introduction.rst
new file mode 100644
index 0000000..9f77fa1
--- /dev/null
+++ b/doc/source/introduction.rst
@@ -0,0 +1,399 @@
+Introduction
+============
+
+This is a compilation and usage manual for the port of the eCos :abbr:`RTOS (real-time operating system)` for `Toradex's Colibri VF61 Freescale Vybrid Computer on Module <http://developer.toradex.com/product-selector/colibri-vf61>`_.
+It gives a brief overview on how to get the port, compile it and run an example program on the module using a Linux host.
+
+The eCos port is targeted for the Cortex-M core of the heterogeneous Vybrid CPU, to provide a robust way to drive a real-time control setup, and is best combined with Linux or similar OS running on the Colibri VF61 Cortex-A core for handling non-critical outside communication, user interfaces etc.
+
+ECos
+----
+
+ECos is a configurable real-time operating system intended for use in embedded applications.
+The documentation for eCos 3.0, which is the most recent version of the system as well as the one ported to Colibri VF61, can be found at http://ecos.sourceware.org/docs-3.0/.
+
+Licence
+-------
+
+*(based on the* `eCos licence overview <http://ecos.sourceware.org/license-overview.html>`_\ *)*
+
+ECos is released under a modified version of the well known `GNU General Public License (GPL) <http://www.gnu.org/copyleft/gpl.html>`_. The eCos license is officially recognised as a GPL-compatible Free Software License. An **exception clause** has been added which limits the circumstances in which the license applies to other code when used in conjunction with eCos. The exception clause is as follows:
+
+ As a special exception, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other works to produce a work based on this file, this file does not by itself cause the resulting work to be covered by the GNU General Public License. However the source code for this file must still be made available in accordance with section (3) of the GNU General Public License.
+
+ This exception does not invalidate any other reasons why a work based on this file might be covered by the GNU General Public License.
+
+**The license does not require users to release the source code of any** *applications* **that are developed with eCos.**
+
+Supported features
+------------------
+
+This eCos port provides the following software packages specific for Toradex Colibri Vybrid VF61 Vybrid module:
+
+* HAL package
+* debug UART driver
+* serial port driver
+* Flex Timer Module
+* GPIO handling
+
+Version information
+-------------------
+
+.. csv-table::
+ :header: Author,Content,Date,Version
+
+ Peter Katarzynski,Draft version,2014-03-21,0.1.0
+ Michael Gielda,Revamp,2014-03-27,0.2.0
+ Michael Gielda,Prerequisites & compiling sample programs,2014-03-27,0.3.0
+ Michael Gielda,Running programs,2014-03-28,0.3.1
+ Michael Gielda,Further updates,2014-04-02,0.3.2
+
+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:`custom-config`.
+
+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
+
+Building eCos
+=============
+
+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-vybrid/ecos}/packages" # modify this
+ # 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
+-------------------
+
+A short shell script is proposed to make the compilation process easier:
+
+.. topic:: Making the eCos kernel script
+
+ .. code-block:: bash
+
+ export ECOS_REPOSITORY="{path/to/ecos-vybrid/ecos}/packages" # modify this
+ export PATH="{path/to/toolchain}/bin:$PATH" # modify this
+
+ mkdir -p build
+ rm -rf build/*
+ cd build
+
+ ecosconfig --config=../ecos.ecc tree
+ make
+
+The resulting kernel files can be found in :file:`build/install/lib`.
+
+Application
+-----------
+
+With a compiled kernel files in the :file:`build/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/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 this
+
+ # 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
+ KPATH="{path/to/kernel}/build" # modify this
+
+ # Do compilation and link your application with kernel
+ arm-eabi-gcc -g -I./ -g -I${KPATH}/install/include hello.c \
+ -L${KPATH}/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 ``ecos/packages/hal/ cortexm/vybrid/col_vf61/current/include/pkgconf`` file 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
+
+.. _custom-config:
+
+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)
+
+