Changeset 300cc68 in rtems-docs


Ignore:
Timestamp:
Apr 17, 2018, 9:32:47 AM (15 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
676d3d5
Parents:
fc9db4c
git-author:
Sebastian Huber <sebastian.huber@…> (04/17/18 09:32:47)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/20/18 13:04:08)
Message:

bsp-howto: Update BSP source code structure

This patch is a part of the BSP source reorganization.

Update #3285.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bsp-howto/target_dependant_files.rst

    rfc9db4c r300cc68  
    120120in the community who provide those services.  If you need help in making these
    121121modifications to RTEMS try a search in a search engine with something like
    122 "rtems support". The RTEMS Project encourages users to use support services
     122"RTEMS support". The RTEMS Project encourages users to use support services
    123123however we do not endorse any providers.
    124124
     
    139139within that family.
    140140
    141 CPU Dependent Support Files
    142 ===========================
    143 
    144 The CPU dependent support files contain routines which aid in the development
    145 of applications using that CPU family.  For example, the support routines
    146 may contain standard trap handlers for alignment or floating point exceptions
    147 or device drivers for peripheral controllers found on the CPU itself.
    148 This class of code may be found in the following directory:
    149 
    150 .. code-block:: c
    151 
    152     c/src/lib/libcpu/<CPU>
    153 
    154 CPU model dependent support code is found in the following directory:
    155 
    156 .. code-block:: c
    157 
    158     c/src/lib/libcpu/<CPU>/<CPU_MODEL>
    159 
    160 <CPU_MODEL> may be a specific CPU model name or a name indicating a CPU core or
    161 a set of related CPU models.  The file ``configure.ac`` in each
    162 ``c/src/lib/libcpu/<CPU>`` directory contains the logic which enables the
    163 appropriate subdirectories for the specific CPU model your BSP has.
    164 
    165141Board Support Package Structure
    166142===============================
    167143
    168 The BSPs are all under the ``c/src/lib/libbsp`` directory.  Below this
    169 directory, there is a subdirectory for each CPU family.  Each BSP is found
    170 under the subdirectory for the appropriate processor family (arm, powerpc,
    171 sparc, etc.).  In addition, there is source code available which may be shared
    172 across all BSPs regardless of the CPU family or just across BSPs within a
    173 single CPU family.  This results in a BSP using the following directories:
     144The BSPs are all under the `bsps <https://git.rtems.org/rtems/tree/bsps>`_
     145directory.  The structure in this source subtree is:
    174146
    175 .. code-block:: c
     147* :file:`bsps/shared`
     148* :file:`bsps/${{RTEMS_CPU}}/shared`
     149* :file:`bsps/${{RTEMS_CPU}}/${{RTEMS_BSP_FAMILY}}`
    176150
    177     c/src/lib/libbsp/shared
    178     c/src/lib/libbsp/<CPU>/shared
    179     c/src/lib/libbsp/<CPU>/<BSP>
     151The ``${RTEMS_CPU}`` is a particular architecture, e.g. arm, powerpc, riscv,
     152sparc, etc.  The ``shared`` directories contain code shared by all BSPs or BSPs
     153of a particular architecture.  The ``${RTEMS_BSP_FAMILY}`` directories contain
     154BSPs for a particular system on chip (SoC) or processor family.
    180155
    181 Under each BSP specific directory, there is a collection of subdirectories.
    182 For commonly provided functionality, the BSPs follow a convention on
    183 subdirectory naming.  The following list describes the commonly found
    184 subdirectories under each BSP.
     156Use the following structure under the
     157:file:`bsps/${{RTEMS_CPU}}/${{RTEMS_BSP_FAMILY}}`:
    185158
    186 - ``console``:
    187   is technically the serial driver for the BSP rather than just a console
    188   driver, it deals with the board UARTs (i.e. serial devices).
     159* :file:`ata` - the legacy ATA/IDE driver
     160* :file:`btimer` - the legacy benchmark timer driver
     161* :file:`cache` - cache controller support
     162* :file:`clock` - the clock driver
     163* :file:`config` - build system configuration files
     164* :file:`console` - the console driver
     165* :file:`contrib` - imports of external sources
    189166
    190 - ``clock``:
    191   support for the clock tick - a regular time basis to the kernel.
     167  * the layout of external sources should be used as is if possible
    192168
    193 - ``timer``:
    194   support of timer devices.
     169* :file:`i2c` - the I2C driver
     170* :file:`include` - public header files
     171* :file:`irq` - the interrupt controller support
     172* :file:`mpci` - support for heterogeneous multiprocessing
     173  (``RTEMS_MULTIPROCESSING``)
     174* :file:`net` - legacy network stack drivers
     175* :file:`rtc` - the RTC driver
     176* :file:`spi` - the SPI driver
     177* :file:`start` - everything required to run a minimal application without
     178  devices
    195179
    196 - ``rtc`` or ``tod``:
    197   support for the hardware real-time clock.
    198 
    199 - ``nvmem``:
    200   support for non-volatile memory such as EEPROM or Flash.
    201 
    202 - ``network``:
    203   the Ethernet driver.
    204 
    205 - ``shmsupp``:
    206   support of shared memory driver MPCI layer in a multiprocessor system,
    207 
    208 - ``include``:
    209   include files for this BSP.
    210 
    211 - ``gnatsupp``:
    212   BSP specific support for the GNU Ada run-time.  Each BSP that wishes to have
    213   the possibility to map faults or exceptions into Ada language exceptions or
    214   hardware interrupts into Ada interrupt tasks must provide this support.
    215 
    216 There may be other directories in the BSP tree and the name should be
    217 indicative of the functionality of the code within that directory.
    218 
    219 The build order of the BSP is determined by the Makefile structure.  This
    220 structure is discussed in more detail in the :ref:`Makefiles` chapter.
    221 
    222 .. sidebar:
    223 
    224 This manual refers to the gen68340 BSP for numerous concrete examples.  You
    225 should have a copy of the gen68340 BSP available while reading this piece of
    226 documentation.  This BSP is located in the following directory:
    227 
    228 .. code-block:: c
    229 
    230     c/src/lib/libbsp/m68k/gen68340
    231 
    232 Later in this document, the $BSP340_ROOT label will be used to refer to this
    233 directory.
     180  * :file:`start.S` - lowest level startup code
     181  * :file:`bspstart.c` - low level startup code
     182  * :file:`bspsmp.c` - SMP support
     183  * :file:`linkcmds` - a linker command file
Note: See TracChangeset for help on using the changeset viewer.