macosarduinostm32arduino-idest-link

Connecting the STM32 blue pill to the serial monitor of the Arduino IDE (macOS)


I am using the Arduino IDE to program a STM32 blue pill using a St-link v2. To configure everithing I follwed few guides like this one and eventually I could get a successful upload and get the blinking pin c13 example running.

My problem is that enven I am able to compile and upload, the Arduino IDE does not detect any port, so I cant use the Serial Monitor as it shows

Not conected. Select a board and a port to connect automatically.

And indeed, the IDE does not recognise a port for any configuration...

enter image description here

enter image description here

but it does show the stlinkv2 in the macOS system report

enter image description here

Does anybody know what Im missing here? Theres maybe other alternative to see code-promts?


Solution

  • The ST-LINK probe you have doesn't provide a virtual serial port functionality. It's a debugger/programmer using the SWD protocol.

    I'm not familiar with using STM32 with Arduino framework, but in order to use Serial class of the Arduino framework, you probably need to access one of the hardware serial ports of STM32F103.

    In this case, you need an external USB - Serial converter which works with 3.3 volts logic levels and connect it to the relevant serial port pins of your Blue Pill board.

    Some ST-LINK models also provide embedded USB - Serial converter interface along with the SWD functionality. But even if you have one of those, you still need to physically connect ST-LINK serial pins into the Blue Pill serial pins.