Nucleo-WL55JC2 - Not able to upload via USB on a Mac

I am on a Mac and trying to get the Nucleo WL55JC2 dev board up and running but have been unable to upload to it via USB, getting the error:

OpenOCD init failed

My platform.ini file is as follows:

[env:nucleo_wl55jc]
platform = ststm32
board = nucleo_wl55jc
framework = arduino
debug_tool = stlink
upload_protocol = stlink

I’ve tried other upload_protocols with no success:
mbed, cmsis_dap, jlink

USB Enumerating Successfully:
I can check via the Mac, General->About->System Report->More Info and can verify the board is showing up there as “STLINK-V3”

Confirmed communications via USB:
I installed STM32CubeProgrammer to see if I could connect to the dev board. If I selected any of the options STLink, UART, USB, etc and click “Connect”…it is never successful. However, if select STLink, it will show the firmware version of the board, suggesting there is some communication happening. Also, there’s a ‘Firmware Upgrade’ button that when clicked can be followed up by clicking the ‘Open in update mode’. I am then able to update the board’s firmware successfully. So communication via USB cable is possible.

It seems that others experiencing similar issues years ago were on Windows.

What would you suggest I try next?

I worked with the Nucleo WL55JC some time ago and found the PlatformIO-supplied official OpenOCD to not have good support for STM32WL chips. There is a STM32 modified OpenOCD version that fares better. Still, there are a few possibilities here:

  1. OpenOCD is not using the right reset method (software/hardware) with respect to the board or the firmware that’s running on the board right now. If the currently loaded firmware goes into deepsleep, it shuts off the debugging and flashing capabilities via SWD. You can bypass that if you hold down the reset button on the Nucleo board, start the upload, and release it at the right time when the OpenOCD text shows up.
  2. OpenOCD itself is too outdatd / buggy. You can download https://github.com/xpack-dev-tools/openocd-xpack/releases and try to use the same upload command (Project tasks → Advanced → Verbose Upload) but with that newer openocd version.

If OpenOCD is too old, perhaps st-link (brew install stlink) will work? I use this:

upload_protocol = custom
upload_command = st-flash --connect-under-reset $UPLOAD_FLAGS write $SOURCE 0x08000000

The “connect under reset” option gets uploads working even when the µC is in deep sleep or has disabled the SWD pins.