Questions about ArduinoIDE BSPs and versioning

Hi, I’m switching to PlatformIO from the Arduino IDE. I’m trying to understand how the versioned Board Support Packages (BSPs) in the ArduinoIDE relate to the similar project configuration concepts in PlatformIO: platform, board, framework. I am asking specifically because I need to be able to use the Adafruit nRF52 Feather BSP 0.9.3 (the latest is 0.11.0) and I’m not sure how to configure PlatformIO to use the equivalent of the older version.

Could somebody explain how the platformio.ini settings: platform, board and framework relate to the ArduinoIDE’s board support packages?

Supporting information

Thanks for any advice!

After reading this, this, this, this and this, I can tell you

  • you can read the used BSP version from the macro ARDUINO_BSP_VERSION, just Serial.println("Used BSP: " + ARDUINO_BSP_VERSION);
  • it reads the BSP version it from the framework’s version=(\d+\.\d+.\d+) line in the platform.txt
  • can be force-set to a specific version by just stating board_build.bsp.version = xyz in the platformio.ini, but it won’t actually changed the used version it seems
  • as can be seen from the package manifest, two releases of framework-arduinoadafruitnrf52 exist
  • the used framework-arduinoadafruitnrf52 package version is determined by the platform’s platform.json. E.g. the most recent version says

So it will pull the BSP 0.10.1 version.

platform=nordicnrf52@3.2.0 has

So it will use the BSP 0.9.3 version. (See here and switch through tags).

In short:

  • platform=nordicnrf52@X.Y.Z with X.Y.Z from Releases · platformio/platform-nordicnrf52 · GitHub gives you a different platform.json
  • platform.json contains which package versions to use (using semantic versioning)
  • package content download links can be obtained from the packageRepositories entries in the platform.json.
  • in case of the framework-arduinoadafruitnrf52 package, the BSP version is in the platform.txt as version=... string
2 Likes

Wow, thank you for all that information!