BSP — Board Support Package
A Board Support Package (BSP) is the foundational software layer that makes a specific hardware board work with an operating system or RTOS. It’s the bridge between your custom PCB and the software that runs on it — containing everything needed to initialize the processor, configure peripherals, and provide a hardware abstraction layer for application code.
What a BSP Contains
| Component | Purpose | Example |
|---|---|---|
| Startup code | CPU initialization, vector table, stack setup | startup_stm32f407xx.s |
| Linker script | Memory map (Flash, RAM, stack, heap regions) | STM32F407VG_FLASH.ld |
| Clock configuration | PLL setup, bus dividers, peripheral clocking | system_init(), Devicetree |
| Peripheral drivers | GPIO, UART, SPI, I²C, ADC, PWM, DMA | HAL/LL drivers, Zephyr drivers |
| Pin multiplexing | Mapping MCU pins to board-specific functions | Devicetree overlays, CubeMX |
| Board-specific config | LED mappings, button assignments, sensor connections | Board DTS files |
| Debug configuration | JTAG/SWD probe settings, flash programming algorithms | OpenOCD configs, pyOCD |
BSP Development Workflow
When Inovasense develops a BSP for a custom board:
- Schematic review — Verify pin assignments, voltage domains, clock sources
- Devicetree / config creation — Map every MCU pin to its board function
- Startup bring-up — Clock init, serial console, LED blink (“hello world” for hardware)
- Peripheral verification — Test every bus (SPI, I²C, UART) with logic analyzer
- Driver integration — Sensor drivers, radio modules, display controllers
- Power management — Sleep mode configuration, wake-up source setup
- Production test firmware — Manufacturing test sequence for every peripheral
BSP vs. SDK vs. HAL
| Layer | Scope | Example |
|---|---|---|
| HAL (Hardware Abstraction Layer) | Vendor-provided register-level wrappers | STM32 HAL, nrfx |
| BSP (Board Support Package) | Board-specific configuration using HAL | Custom board Devicetree + drivers |
| SDK (Software Development Kit) | Complete framework with RTOS + middleware | nRF Connect SDK, ESP-IDF |
Why BSP Quality Matters
A poorly written BSP causes problems that are extremely difficult to debug later:
- Wrong clock configuration → intermittent UART corruption at high baud rates
- Incorrect pin mux → SPI bus conflict that only appears when a specific peripheral is active
- Missing pull-up configuration → I²C works on the bench but fails at temperature extremes
- Wrong flash wait states → HardFault crashes that only occur after the chip warms up
Related Terms
- RTOS — The BSP provides the hardware layer that the RTOS kernel runs on.
- SoC — The System-on-Chip that the BSP targets.
- PCB Design — BSP development starts with the schematic and PCB layout.
BSP development for custom boards is one of our core embedded services. See our Embedded Systems Development capabilities.