This repository has been archived on 2021-11-24. You can view files and clone it, but cannot push or open issues or pull requests.
fsfw_example_public/bsp_stm32_rtems/RTEMSConfig.h

45 lines
1.4 KiB
C
Raw Normal View History

2021-04-27 17:22:34 +02:00
#ifndef BSP_STM32_RTEMS_RTEMSCONFIG_H_
#define BSP_STM32_RTEMS_RTEMSCONFIG_H_
#include <rtems/rtems/tasks.h>
/* Forward declaration required */
rtems_task Init(rtems_task_argument argument);
#define CONFIGURE_MICROSECONDS_PER_TICK 1000
//! Specify the allocation scheme used for RTEMS.
//! See: https://docs.rtems.org/branches/master/c-user/config/intro.html
#define RTEMS_USE_UNLIMITED_OBJECTS_ALLOCATION 0
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#if RTEMS_USE_UNLIMITED_OBJECTS_ALLOCATION == 1
#define CONFIGURE_UNIFIED_WORK_AREAS
#define CONFIGURE_UNLIMITED_OBJECTS
#define CONFIGURE_INIT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 6)
#else
#define CONFIGURE_MAXIMUM_TASKS 20
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 30
#define CONFIGURE_MAXIMUM_SEMAPHORES 20
#define CONFIGURE_MAXIMUM_TIMERS 10
//! Required for Rate-Monotonic Scheduling (RMS)
#define CONFIGURE_MAXIMUM_PERIODS 15
#define CONFIGURE_INIT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 6)
//! Around 41 kB extra task stack for now.
#define CONFIGURE_EXTRA_TASK_STACKS (10 * RTEMS_MINIMUM_STACK_SIZE)
#endif /* RTEMS_USE_UNLIMITED_OBJECTS_ALLOCATION == 1 */
#define CONFIGURE_INIT
#include <rtems/confdefs.h>
#endif /* BSP_STM32_RTEMS_RTEMSCONFIG_H_ */