|Hint: Use the tree menu to navigate groups of related pages|
FreeRTOS+IO Board Support Packages
IntroductionBoard support packages, or BSPs, target the FreeRTOS+IO code to a specific microcontroller, on a specific board. It is the equivalent to the port layer found in FreeRTOS itself.
The FreeRTOS+IO code includes a header file called FreeRTOS_IO_BSP.h. This header file should ether contain the BSP information directly, or itself just be used to include the BSP header file that is correct for the target being used.
It is best to locate FreeRTOS_IO_BSP.h in an application directory, along side FreeRTOSIOConfig.h, because the header file is specific to the hardware being used by the application rather than the core FreeRTOS+IO code.
A BSP includes:
- A table that defines the supported peripherals, and how each peripheral is identified in calls to FreeRTOS_open().
- Device specific peripheral drivers.
- A set of constants that define peripheral pin outs, LED polarities, etc.
- An example FreeRTOSIOConfig.h header file.
- Documentation that describes any target specific FreeRTOS_ioctl() request codes.
The array is assigned to the macro boardAVAILABLE_DEVICES_LIST, so appears in a BSP configuration files as something like:
The above example defines three peripherals. The peripheral accessed using the path string “/UART3/” is of type UART, and has a base address of MCU_UART3. The same table also defines an SPI peripheral and an I2C peripheral at their respective addresses.
Assigning the array to the boardAVAILABLE_DEVICES_LIST macro allows the same core FreeRTOS+IO code to be used with multiple BSP configuration files, simply by changing the BSP header file.