Hey,
I have an issue with unit testing on an STM32G4 Nucleo board.
The one test I wrote compiles, links, and uploads fine, but after that, I’m getting:
[Errno 13] could not open port /dev/ttyS21: [Errno 13] Permission denied: '/dev/ttyS21'
This seems a bit strange to me, as the correct serial port of my board is ttyACM0. For that reason, I have specified
test_port = /dev/ttyACM0
in my platformio.ini. Still, PlatformIO tries to use ttyS21.
After googling and finding this, I used chmod to make ttyS21 accessible. I then get
Could not configure port: (5, 'Input/output error')
This might make sense, as it tries the wrong serial port anyway.
I tried adding a delay after uploading (in case the serial port briefly disappears and PIO therefore tries another one) using this, but neither did that help.
Any ideas?