I get this question a LOT of times…
Looking for a better perspective, I choose AL’s interpretation.
The Board Support Package (BSP) in Arduino IDE is a collection of software components, configurations, and drivers that allow the IDE to compile and upload code to a specific microcontroller board.
What Does the BSP Contain?
A BSP typically includes:
Board Definitions
- Defines the MCU model, memory layout, and hardware pins.
- Specifies the bootloader used for flashing.
Core Libraries
- Provides low-level HAL (Hardware Abstraction Layer) functions.
- Includes standard Arduino functions like
pinMode()
,digitalWrite()
,analogRead()
, etc.
Drivers & Peripheral Support
- Pre-configured drivers for GPIO, I2C, SPI, UART, PWM, ADC, etc..
- May include support for WiFi, BLE, NFC, USB, and power management.
Compiler & Toolchain Configurations
- Specifies the compiler flags and settings needed to build firmware.
- Includes build scripts, linker files, and upload methods.
How Does BSP Work in Arduino IDE?
When you select a board (e.g., Seeed Xiao nRF52840 Sense), the Arduino IDE uses the BSP to:
- Set up the correct compiler settings.
- Link to the required libraries and drivers.
- Handle pin mappings and memory configurations.
- Provide upload methods (via UF2 bootloader, J-Link, or OpenOCD).
Where is BSP Stored in Arduino?
BSPs are installed via the Boards Manager and stored in:
- Windows:
C:\Users\YourUsername\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\<BSP_version>
- Mac/Linux:
~/Arduino15/packages/Seeeduino/hardware/nrf52/<BSP_version>
BSP Versions & Updates
- Different BSP versions may add new features, fix bugs, or change how peripherals are configured.
- If a new BSP update breaks your code, you can roll back to an older version in the Boards Manager.
Example: Xiao nRF52840 BSP in Arduino
If you install the Seeed nRF52 BSP (e.g., 2.9.3), it provides:
- Board files for Xiao nRF52840 BLE & Sense.
- **ADDED New files for the PLUS variants **.
- Drivers for Nordic peripherals (nRF SDK-based).
- BLE, NFC, QSPI flash, and IMU sensor support.
How to Check & Update BSP in Arduino IDE
- Go to: Tools > Board > Boards Manager
- Search for your board (e.g., Seeed nRF52).
- Select a version (Upgrade/Downgrade if needed).
AMA, and I hope that answers any questions…
GL PJ