BSP and standalone drivers
Understand the embedded C library, BSP structure and the two driver levels used by a Vitis application.
What the BSP provides
An embedded application should not guess the hardware configuration. The Board Support Package describes the services available to one processor and one software domain.
A standalone domain targets a bare-metal application. The program runs directly on the processor, without a complete operating system. The BSP therefore supplies the minimum startup code, libraries and drivers required by that application.
In Vitis, a platform associates the XSA file with one or more domains. Each domain selects a processor, an operating system and a BSP. A hardware change therefore requires the platform to be updated before the application is rebuilt.
| Element | Purpose |
|---|---|
| Generated headers | Hardware addresses, identifiers and parameters |
| Drivers | Access to PS and PL peripherals |
| Libraries | Standard C, files, network and system services |
| Startup code | Vector table, initialization and exception handling |
The standalone C library relies on Newlib, a compact implementation of the standard C library for embedded systems. It supplies common functions such as memcpy, printf and dynamic allocation. Calls that normally depend on an operating system must be adapted to the platform.
Reading xparameters.h
xparameters.h is generated from the exported hardware. It contains base addresses, device identifiers, interrupt identifiers and some clock frequencies.
#include "xparameters.h"
#define LED_BASEADDR XPAR_FPT_LED_BANK_BASEADDR
#define