Nano33BLE device serial port hangs after upload attempt -- using CLion/Platformio on M2 Mac

I’ve been using Platformio and CLion for Arduino projects on an intel based Mac for years, with good results.
I just switched to an M2 based Mac and can’t get projects to upload. I’m using a simple Blink project to get things working.
Before attempting an upload I can see the serial port in /dev. It’s cu.usbmodem13401, or tty.usbmodem13401.
When I upload the project, the Nano33BLE led pulses, and stops. However the sketch never runs. Also, after the upload attempt, the serial port is no longer visible.
ls /dev/usb shows no matches. usbmodem13401 is no longer present.
If I double press the Nano33BLE reset button, the serial device returns, and I can repeat the process with the same results.
I can use the Arduino IDE v2.1 to upload the same project with success.
So I suspect a Platformio configuration or CLion Platformio integration problem.
% pio system info

PlatformIO Core 6.1.6
Python 3.9.6-final.0
System Type darwin_arm64
Platform macOS-13.3.1
File System Encoding utf-8
Locale Encoding UTF-8
PlatformIO Core Directory /Users/rbb/.platformio
PlatformIO Core Executable /Users/rbb/.platformio/penv/bin/platformio
Python Executable /Users/rbb/.platformio/penv/bin/python
Global Libraries 0
Development Platforms 2
Tools & Toolchains 14

I’m looking for any advice on how to proceed.

1 Like

I can confirm that I have the same behavior on Windows 10. And I have also asked about the sketch not running over here.

Thanks for the reference to your similar problem. Although on Windows vs Mac, the problem looks identical.

I see you received a recommendation to roll back to an older platform=nordicnrf52@4.0.0. I also see your response on what happened when you tried that.

I get a similar response:

Platform Manager: Installing nordicnrf52 @ 4.0.0
Error: Could not find the package with 'nordicnrf52 @ 4.0.0' requirements for your system 'darwin_arm64'

Did you ever figure this out, or come up with a nordicnrf52 version that worked?

Thanks again for the link to your thread.

Problem solved: platform = nordicnrf52@9.5.0. - Thank you individual61 !

Classic. I changed computers from an Intel Mac to a M2 Mac, and my development environment fell apart. After chasing M2 red herrings all day, the problem turns out to be the nordicnrf52 version, and had nothing to do with the Intel to M2 migration.

1 Like

Also, thank you @bbar2 ! I had tried the version number that someone else suggested but that did not work. However I tried with yours and now Blink works!