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:
typedef struct xAVAILABLE_DEVICES { /* Text name of the peripheral. For example, "/UART0/", or "/SPI2/". */ const int8_t * const pcPath; /* The type of the peripheral, as defined by the Peripheral_Types_t enum. */ const Peripheral_Types_t xPeripheralType; /* The base address of the peripheral in the microcontroller memory map. */ const void *pvBaseAddress; } Available_Peripherals_t; The Available_Peripheral_t structure
The array is assigned to the macro boardAVAILABLE_DEVICES_LIST, so appears
in a BSP configuration files as something like:
#define boardAVAILABLE_DEVICES_LIST \
{ \
{ "/UART3/", eUART_TYPE, MCU_UART3 }, \
{ "/SSP1/", eSSP_TYPE, MCU_SPI1 }, \
{ "/I2C2/", eI2C_TYPE, MCU_I2C2 } \
}
An array of Available_Peripheral_t structures
assigned to the boardAVAILABLE_DEVICES_LIST macro
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.