Fixes broken labels and the following warnings: /home/nashif/Viper/forto-collab/doc/about_zephyr.rst:1: WARNING: malformed hyperlink target. /home/nashif/Viper/forto-collab/doc/application/apps_code_dev.rst:26: WARNING: malformed hyperlink target. /home/nashif/Viper/forto-collab/doc/application/apps_code_dev.rst:73: WARNING: malformed hyperlink target. /home/nashif/Viper/forto-collab/doc/application/apps_code_dev.rst:90: WARNING: malformed hyperlink target. /home/nashif/Viper/forto-collab/doc/application/ apps_common_procedures.rst:24: WARNING: Enumerated list ends without a blank line; unexpected unindent. /home/nashif/Viper/forto-collab/doc/application/ apps_common_procedures.rst:12: ERROR: Unknown target name: "set_environment_variables". /home/nashif/Viper/forto-collab/doc/application/apps_kernel_conf.rst:26: WARNING: Block quote ends without a blank line; unexpected unindent. /home/nashif/Viper/forto-collab/doc/application/apps_kernel_conf.rst:75: WARNING: Malformed :option: u'CONF_FILE =', does not contain option marker - or -- or / /home/nashif/Viper/forto-collab/doc/application/ apps_kernel_conf.rst:109: WARNING: malformed hyperlink target. /home/nashif/Viper/forto-collab/doc/application /apps_kernel_conf.rst:172: WARNING: malformed hyperlink target. /home/nashif/Viper/forto-collab/doc/application/ apps_kernel_conf.rst:208: WARNING: malformed hyperlink target. /home/nashif/Viper/forto-collab/doc/application/ apps_object_conf.rst:24: WARNING: malformed hyperlink target. /home/nashif/Viper/forto-collab/doc/application/ apps_object_conf.rst:76: WARNING: malformed hyperlink target. /home/nashif/Viper/forto-collab/doc/application/ apps_object_conf.rst:89: WARNING: Include file u'/home/nashif/Viper/forto-collab/samples/microkernel/apps/ philosophers/proj.mdef' not found or reading it failed /home/nashif/Viper/forto-collab/doc/collaboration/code/doxygen/ defines.rst:65: WARNING: Line spec '42-47': no lines pulled from include file u'/home/nashif/Viper/forto-collab/samples/microkernel/apps/ philosophers/src/phil.h' /home/nashif/Viper/forto-collab/doc/collaboration/code/doxygen/ functions.rst:13: ERROR: Unknown interpreted text role "code:c". /home/nashif/Viper/forto-collab/doc/collaboration/code/doxygen/ functions.rst:13: ERROR: Unknown interpreted text role "code:c". /home/nashif/Viper/forto-collab/doc/collaboration/code/ gerrit_practices.rst:53: WARNING: Title underline too short. Change-Id: I41cb0ee3edb401b0f8e9ecab1819278f0465343d Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
97 lines
2.2 KiB
ReStructuredText
97 lines
2.2 KiB
ReStructuredText
.. _apps_object_conf:
|
|
|
|
Microkernel Object Configuration
|
|
################################
|
|
|
|
Microkernel objects are explained fully in the :ref:`zephyr_primer`.
|
|
See :ref:`microkernel` for example MDEF entries.
|
|
|
|
Procedure
|
|
*********
|
|
|
|
.. _create_mdef:
|
|
|
|
Creating and Configuring an MDEF for a Microkernel Application
|
|
==============================================================
|
|
|
|
Create the MDEF to define microkernel objects used in your
|
|
application when they apply to the application as a whole.
|
|
You do not need to define every object before writing code. In
|
|
some cases, the necessary objects aren't obvious until you begin
|
|
writing code. However, all objects used in your code must be defined
|
|
before your application will compile successfully.
|
|
|
|
.. note::
|
|
|
|
Nanokernel applications do not use an MDEF because microkernel
|
|
objects cannot be used in applications of this type.
|
|
|
|
Before you begin
|
|
----------------
|
|
|
|
* Confirm your :file:`~/appDir` already exists.
|
|
|
|
* Confirm Zephyr environment variables are set for each console
|
|
terminal; for instructions, see :ref:`apps_common_procedures`.
|
|
|
|
Steps
|
|
-----
|
|
|
|
1. Create an MDEF in your application directory
|
|
(:file:`~/appDir ~) using
|
|
the name you specified in your application Makefile.
|
|
(See :ref:`Creating an Application Makefile`).
|
|
|
|
.. code-block:: bash
|
|
|
|
$ touch prj.mdef
|
|
|
|
The default MDEF name is :file:`prj.mdef`.
|
|
|
|
2. Open the file using a standard text editor.
|
|
|
|
3. Add settings to the file to suit your application.
|
|
|
|
The syntax for objects that can be defined in :file:`.mdef`
|
|
is:
|
|
|
|
TASK name priority entry_point stack_size groups
|
|
|
|
TASKGROUP name
|
|
|
|
MUTEX name
|
|
|
|
SEMA name
|
|
|
|
FIFO name depth width
|
|
|
|
PIPE name buffer_size
|
|
|
|
MAILBOX name
|
|
|
|
MAP name num_blocks block_size
|
|
|
|
POOL name min_block_size max_block_size numMax
|
|
|
|
.. note::
|
|
|
|
Some microkernel objects, such as Task IRQs, are not
|
|
defined in an :file:`.mdef` file.
|
|
|
|
The following example shows the content of the
|
|
:file:`samples/microkernel/apps/philosophers/proj.mdef`
|
|
for the Philosophers' sample application. The sample
|
|
uses seven tasks and six mutexes.
|
|
|
|
Example MDEF
|
|
------------
|
|
|
|
.. literalinclude:: ../../samples/microkernel/apps/philosophers/proj.mdef
|
|
:linenos:
|
|
|
|
Related Topics
|
|
--------------
|
|
|
|
:ref:`src_makefiles_reqs`
|
|
:ref:`src_files_directories`
|