Code organisation¶
In order to ease the portability to other architectures and operating systems the code is organised in three tiers and seven levels.
Each tier is an independent library. The BareMetal
library is designed to be independent from the file system and from the scheduler, thus allowing to deploy the framework in very embedded systems.
Each level encapsulates a given functional concept and only depends on the functionality provided by any levels above it.

Levels¶
BareMetal¶
Name |
Description |
---|---|
Definition of the basic types that shall be used by any code using the library. |
|
L1Portability |
Code that is either operating system or architecture dependent (atomic operations, memory management, sleep, …) together with components that depend on definitions that are available on |
Root classes of the framework. |
|
Definition of the concept of Stream. |
|
Infrastructure which allows to build fully data-driven applications. |
|
Definition of the logging system. |
|
Dynamic exchange of messages between MARTe components. |
|
MARTe real-time application components. |
|
Logging components that use the file system (e.g. UDP logger). |
|
Application kick-start (bare metal). |
FileSystem¶
Name |
Description |
---|---|
L1Portability |
File system code that is either operating system or architecture dependent (files, sockets, …). |
Portable definition of streams (no operating system dependent code). |
|
Logging components that use the file system (e.g. UDP logger). |
|
Application kick-start code that depends on the file-system (e.g. reading a configuration file). |
Scheduler¶
Name |
Description |
---|---|
L1Portability |
Scheduler code that is either operating system or architecture dependent (semaphores, threads, …). |
Components that provide a unique model for the management of threads and services. |
|
Logging components that use the scheduler (logging queues on independent threads, …). |
|
Support to message queues. |
|
The MARTe state-machine. |
|
MARTe real-time application components that require a scheduler. |
Portability¶
The operating system and architecture dependent code is encapsulated in the Architecture
and Environment
folders inside the L1Portability
and L6App
folders. In the levels’ root folders no operating system and architecture code shall exist.

Based on the Makefile ARCHITECTURE
and ENVIRONMENT
identifiers, the correct header files will be included during the code compilation.
#include INCLUDE_FILE_ARCHITECTURE(ARCHITECTURE,AtomicA.h)
#include INCLUDE_FILE_ENVIRONMENT(ENVIRONMENT,BasicFileProperties.h)
Each new operating system or architecture will have to create a new folder with the operating system or architecture identifier and implement all the relevant files.
Namespace¶
A single namespace, named MARTe
, is used for all the core library (and for the MARTe2-components).