Skip to content

Add STM32U073Cx & STM32U083Cx boards - #887

Open
ndoo wants to merge 3 commits into
platformio:developfrom
meshmy:stm32u0
Open

Add STM32U073Cx & STM32U083Cx boards#887
ndoo wants to merge 3 commits into
platformio:developfrom
meshmy:stm32u0

Conversation

@ndoo

@ndoo ndoo commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds board definitions for the STM32U0 series (Cortex-M0+, 56 MHz, 40 KB RAM) and
the required OpenOCD fix to flash them.

New boards

STM32U073 - 12 generic variants (all variants supported by upstream Arduino STM32 core)

Package 64K (x8) 128K (xB) 256K (xC)
C-T genericSTM32U073C8T genericSTM32U073CBT genericSTM32U073CCT
C-U genericSTM32U073C8U genericSTM32U073CBU genericSTM32U073CCU
R-I genericSTM32U073R8I genericSTM32U073RBI genericSTM32U073RCI
R-T genericSTM32U073R8T genericSTM32U073RBT genericSTM32U073RCT

STM32U083 (all variants supported by upstream Arduino STM32 core, including Nucleo U083RC)

Board Notes
genericSTM32U083CCT C-package, LQFP48
genericSTM32U083CCU C-package, QFN48
genericSTM32U083RCI R-package, BGA64
genericSTM32U083RCT R-package, LQFP64
nucleo_u083rc ST eval board, onboard ST-Link

OpenOCD version bump and hla_swd deprecation

xpack OpenOCD 0.12.0-5 (2025-02-05) deprecated the HLA layer for ST-Link and
converted all interface scripts from transport select hla_swd to swd. Using
hla_swd with xpack ≥ 0.12.0-5 causes OpenOCD to error out. This PR changes
platform.py to always emit transport select swd for all adapters, and bumps
tool-openocd to ~3.1200.5 — also the first release that ships stm32u0x.cfg
(required to target STM32U0).

Note: the PlatformIO registry currently only has tool-openocd @ 3.1200.0.
Users must install xpack OpenOCD ≥ 0.12.0-5 manually until the registry is updated.
Attached is a script to locally update OpenOCD to 0.12.0-7 on MacOS:
install-openocd.sh

Blink test

Test sketch in tests/ updated to include all new boards, this was used to test actual hardware (refer to list below).

Tested on

  • All 17 new environments build successfully (Arduino blink, local platform)
  • genericSTM32U073CBT flashed and verified on actual hardware
  • nucleo_u083rc flashed and verified on actual hardware

Closes: #798

@ndoo

ndoo commented Jan 22, 2026

Copy link
Copy Markdown
Contributor Author

This also requires tool-openocd to be updated to at least xpack openocd v0.12.0-5 (though newer/latest would be nice), the current version in PIO is very very old cc @valeros @ilg-ul

@nschurando

Copy link
Copy Markdown

@valeros I second this PR.

ndoo and others added 3 commits June 25, 2026 10:57
xpack OpenOCD 0.12.0-5 (2025-02-05) included upstream commits that
deprecated HLA support for ST-Link (34ec5536c0) and converted all
`transport select hla_swd` to `swd` in the interface scripts
(ad53fe659b, 2024-12-23). Using `hla_swd` for stlink with
xpack >=0.12.0-5 fails; use `swd` for all adapters instead.

Bump tool-openocd to ~3.1200.5, the first release containing
stm32u0x.cfg (required for STM32U0 target support) and the version
where the HLA transport change lands. Users on the PIO registry
(still at 3.1200.0) must install xpack >=0.12.0-5 manually until
PlatformIO publishes an updated registry package.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… U083RC)

Adds PlatformIO board definitions for all STM32U0 generic variants supported
by the Arduino STM32 package, covering both the C-series (LQFP/UFQFPN 48-pin)
and R-series (LQFP/UFBGA 64-pin) packages, plus the NUCLEO-U083RC eval board.

Generic boards added (17 total):
- STM32U073C8T/U, STM32U073CBT/U, STM32U073CCT/U (64/128/256k, C-package)
- STM32U083CCT/U (256k, C-package)
- STM32U073R8I/T, STM32U073RBI/T, STM32U073RCI/T (64/128/256k, R-package)
- STM32U083RCI/T (256k, R-package)

Nucleo board added:
- nucleo_u083rc (STM32U083RCT6, 256k flash, onboard ST-Link)

All boards: Cortex-M0+ at 56 MHz, 40k RAM, stm32u0x OpenOCD target,
frameworks arduino/cmsis/stm32cube, upload via stlink/jlink/dfu/serial.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ndoo ndoo changed the title Add generic STM32U073Cx & STM32U083Cx boards Add STM32U073Cx & STM32U083Cx boards Jun 25, 2026
@ndoo

ndoo commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Since quite a length of time has passed without any review/activity from upstream, I have taken the liberty to:

  1. Rebase on develop HEAD since 2 major versions have since been released
  2. Flesh out the PR with full support for the entire range of STM32U073 and STM32U083 that is supported in STM32duino, including the Nucleo-U083RC
  3. Properly set the OpenOCD dependency
    • The upstream version doesn't exist yet
    • I attached a script to the PR (only tested on MacOS) that overrides the local PlatformIO OpenOCD package to a newer version so that this PR works for flashing over SWD (or any other protocols that will use OpenOCD)
  4. Add the new boards to the test sketch

Further details:

Commit f7fa973Add STM32U0 series board support:

  • 16 generic boards - all U073/U083 generic boards in STM32duino core + nucleo_u083rc

Commit 9430683, Fix stlink transport and bump minimum OpenOCD to 3.1200.5:

  • platform.py: transport select hla_swd (stlink) / swd (others) → always swd (hla_swd is deprecated as of OpenOCD 3.12-5)
  • platform.json: tool-openocd ~3.1200.0~3.1200.5.

These are coupled: 0.12.0-5 is both the first release with stm32u0x.cfg (needed for
STM32U0 targets) and the release that drops the HLA layer for ST-Link.

Commit b3a8668Add Arduino blink tests for STM32U073/U083 boards:

  • 17 environments added to tests/arduino-blink-different-cores/platformio.ini.
  • All 17 build clean
  • genericSTM32U073CBT flashed and verified on actual hardware
  • nucleo_u083rc flashed and verified on actual hardware

@ndoo

ndoo commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

My bad, looks like tool-openocd 3.1200.7 has landed so this PR should not need an out-of-tree OpenOCD (but the hla_swd fix is still needed, once the pinned version in platform-ststm32 is moved to 3.1200.7).

@ndoo

ndoo commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

My bad, looks like tool-openocd 3.1200.7 has landed so this PR should not need an out-of-tree OpenOCD (but the hla_swd fix is still needed, once the pinned version in platform-ststm32 is moved to 3.1200.7).

Oh, just checked. Not supported. But at least a custom upload_command and stm32cubeprogrammer works well with my PR changeset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for the STM32U0

3 participants