Skip to content
NXPPublic

About

Generic RTOS Application Layer

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

221 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RTOS Application Layer

The RTOS Application Layer provides several re-usable components that may be integrated into larger applications. It aims to provide a common repository to maximize code sharing across different applications and/or environments.

Supported application components

  • asynchronous processing (component name: async)
  • audio pipeline (component name: audio)
  • logging (component name: log)
  • shell (component name: shell)
  • statistics (component name: stats)
  • tsn endpoint (component name: tsn)

Using the RTOS Application Layer

FreeRTOS

MCUX SDK vesions from 25.06 onward

Components can be enabled through Kconfig configuration in your prj.conf file:

CONFIG_MCUX_COMPONENT_component.rtos_apps.async=y
CONFIG_MCUX_COMPONENT_component.rtos_apps.audio=y
CONFIG_MCUX_COMPONENT_component.rtos_apps.log=y
CONFIG_MCUX_COMPONENT_component.rtos_apps.stats=y
CONFIG_MCUX_COMPONENT_component.rtos_apps.tsn=y

Individual components may have additional configuration options. For example, the log component:

CONFIG_MCUX_COMPONENT_component.rtos_apps.log=y
CONFIG_RTOS_APPS_LOG_STR="app "
CONFIG_RTOS_APPS_LOG_TIMESTAMP=y
MCUX SDK versions 2.16 and below

Each of the components provides:

  • A cmake submodule file: rtos_apps_<component>.cmake
  • One or more header file(s): rtos_apps/<component>.h or rtos_apps/<component>/<file>.h

On the applications' CMake, add the following lines:

FreeRTOS

set(RTOS_APPS_DIR /path/to/rtos-apps)
set(RTOS_APPS_TARGET <application target name>)

include(${RTOS_APPS_DIR}/rtos_apps_<component_a>.cmake)
...
include(${RTOS_APPS_DIR}/rtos_apps_<component_b>.cmake)

Zephyr

A top-level cmake file rtos_apps.cmake is provided. It pulls in the components enabled through Kconfig, so applications only need to include this one file.

Each of the components provides:

  • A cmake submodule file: rtos_apps_<component>.cmake (included by rtos_apps.cmake when the component is enabled)
  • One or more header file(s): rtos_apps/<component>.h or rtos_apps/<component>/<file>.h

On the applications' CMake, add the following lines:

set(RTOS_APPS_DIR /path/to/rtos-apps)
set(RTOS_APPS_TARGET <application target name>)

include(${RTOS_APPS_DIR}/rtos_apps.cmake)

Source the rtos-apps Kconfig from the application's Kconfig file (the path can be relative to $(ZEPHYR_BASE)):

rsource "$(ZEPHYR_BASE)/../rtos-apps/Kconfig.z"

And enable the required Kconfig symbols, for instance on your prj.conf file:

CONFIG_RTOS_APPS=y
CONFIG_RTOS_APPS_LOG=y
CONFIG_RTOS_APPS_<component_a>=y
...
CONFIG_RTOS_APPS_<component_b>=y

Sources will be added to the specified target, as well as required include paths. To use the application layer, include the component specific header file(s):

#include <rtos_apps/<component>.h>

or

#include <rtos_apps/<component>/<file>.h>

About

Generic RTOS Application Layer

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages