BBC micro:bit v2 - Segger J-link support


In case you may not be aware, the recently released BBC micro:bit can be updated to support Segger J-Link OB (for non-production purposes only).

Last month, Segger released J-Link OB firmware upgrade to allow micro:bit v2 on-board debug interface (CMSIS-DAP) to be converted to a J-Link OB, maintaining support of HEX file Drag & Drop.

This makes the micro:bit v2 a very useful and inexpensive MCU (~US$16) with an onboard J-link, with functionality similar to that of the Segger J-Link Edu Mini.

The micro:bit v2 works well with PlatformIO for builds & J-link debugging. I’ve been using the micro:bit/J-link with PlatformIO & Arduino Framework, and with Zephyr from the macOS terminal.

With Zephyr 2.5 adding support for micro:bit v2, PlatformIO will get even better in the coming months.

Per board page it’s already possible to select upload_protocol = jlink, same for debugging. Or am I missing something?

The PlatformIO micro:bit board needs to be updated to reflect that J-Link is a via an optional J-Link/OB firmware update, Hardware.

The NXP KL27Z interfaces directly to the micro:bit’s nRF52833 SWD & UART for communication and programming. SWD pins are not directly available to the user.

Segger offer a firmware to flash the KL27Z with J-link/OB, so that the micro:bit can work with their Ozone debugger and IDE.

After the firmware upgrade, PIO upload_protocol = jlink and debug_tool = jlink work fine.

btw - I have a bunch of micro:bit v2 and find them very useful with multiple onboard sensors. Release candidate Zephyr 2.5.0-rc supports micro:bit v2 but, like the Arduino core, currently the LED 5x5 matrix display driver hasn’t been updated to support v2. Hopefully soon.