To generate a FreeRTOS solution which is fully integrated into our components, we need to determine the current state of application development, make some preliminary considerations and then develop implementation examples.
Current State of Application Development on NetX 90
All netX 90 application examples are based on different components. A typical project contains the following components:
Preliminary Considerations on Porting
The following list describes the considerations made:
Component | Objectives |
---|---|
FreeRTOS | Use the latest FreeRTOS V10.4.3 Modifications shall be documented so that we can easily upgrade to the next version |
CMSIS | The FreeRTOS port shall use the vendor-specific definitions |
NetX peripheral driver | The netX 90 peripheral drivers shall be configured using the FreeRTOS Mutex implementation FreeRTOS is required to trigger the timer driver's systick handler to archive compatibility between the two components |
Newlib C | A threadsafe implementation possibility shall be provided |
CifX API | The cifX API shall be configured using the FreeRTOS Mutex implementation |
Porting Implementation
FreeRTOS
The current version of FreeRTOS can be downloaded from www.freertos.org. For porting, we need the folder <FreeRTOS/Source> and from the portable folder we need to use one of the following port/ portmacro files:
portable | FPU | MPU |
---|---|---|
ARM_CM3 | ||
ARM_CM3_MPU | ||
ARM_CM4FP | ||
ARM_CM4_MPU |
CMSIS
The vendor-specific definitions, which are required for FreeRTOS, are the following:
#define configCPU_CLOCK_HZ ( SystemCoreClock ) #define configPRIO_BITS __NVIC_PRIO_BITS /* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS standard names. */ #define xPortPendSVHandler PendSV_Handler #define vPortSVCHandler SVC_Handler #define xPortSysTickHandler SysTick_Handler