🤔 What is the BSP (Board Support Package) in Arduino IDE?

:nerd_face: 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.

:one: What Does the BSP Contain?

A BSP typically includes:

:small_blue_diamond: Board Definitions

  • Defines the MCU model, memory layout, and hardware pins.
  • Specifies the bootloader used for flashing.

:small_blue_diamond: Core Libraries

  • Provides low-level HAL (Hardware Abstraction Layer) functions.
  • Includes standard Arduino functions like pinMode(), digitalWrite(), analogRead(), etc.

:small_blue_diamond: 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.

:small_blue_diamond: Compiler & Toolchain Configurations

  • Specifies the compiler flags and settings needed to build firmware.
  • Includes build scripts, linker files, and upload methods.

:two: 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:

  1. Set up the correct compiler settings.
  2. Link to the required libraries and drivers.
  3. Handle pin mappings and memory configurations.
  4. Provide upload methods (via UF2 bootloader, J-Link, or OpenOCD).

:three: 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>

:four: 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.

:five: 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.

:six: 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… :+1:

GL :slight_smile: PJ :v:

1 Like