|
modm API documentation
|
Modules | |
| FreeRTOS+TCP | |
lbuild module: modm:freertos
Amazon FreeRTOS is an open source, real-time operating system (RTOS) for microcontrollers in small, low-power devices.
This module provides the latest FreeRTOS LTS release integrated with modm:
modm::Clock via modm:platform:clock.modm:platform:heap module with thread-safe locking of Newlib's malloc/free.modm:architecture:assert interface.Note that we recommend using the FreeRTOS API directly and only if you write threaded code that also runs on other platforms (x86 simulators for example) should you consider using the API defined in modm:processing:rtos module.
This module generates a FreeRTOSConfig.h config file for modm integration with these settings:
configASSERT(x) implemented with modm_assert(x, "freertos").configCPU_CLOCK_HZ implemented with CMSIS SystemCoreClock.configTICK_RATE_HZ set to modm:freertos:frequency or 1kHz on Cortex-M0.configSUPPORT_DYNAMIC_ALLOCATION = 1 only if used with modm:platform:heap.configSUPPORT_STATIC_ALLOCATION = 1 always.configUSE_TICK_HOOK = 1 used by modm:platform:clock to provide modm::Clock.In addition we define these overwritable default settings:
configMAX_SYSCALL_INTERRUPT_PRIORITY = (__NVIC_PRIO_BITS << (8u - __NVIC_PRIO_BITS))configMINIMAL_STACK_SIZE = 128configMAX_PRIORITIES = 5configUSE_PREEMPTION = 1configUSE_IDLE_HOOK = 0configUSE_16_BIT_TICKS = 0configUSE_MUTEXES = 1configUSE_RECURSIVE_MUTEXES = 1configUSE_COUNTING_SEMAPHORES = 1configQUEUE_REGISTRY_SIZE = 10configNUM_THREAD_LOCAL_STORAGE_POINTERS = 5configCHECK_FOR_STACK_OVERFLOW = 1configUSE_TIMERS = 1configTIMER_TASK_PRIORITY = 3configTIMER_QUEUE_LENGTH = 10configTIMER_TASK_STACK_DEPTH = configMINIMAL_STACK_SIZEAll other config settings are unchanged by modm and are defaulted by FreeRTOS itself, please refer to the FreeRTOS Config documentation to understand what each of these do.
To change a configuration setting, define a <FreeRTOSConfigLocal.h> file, which is included before the optional settings, so you can overwrite them easily.
An example <FreeRTOSConfigLocal.h> file:
Generated with: 1000 in [4 ... 1000]