PlatformIO Community

How can I go about running my target-run unit tests through a regular, external, ST-Link on a custom board

Hi all, I need some help

I tried to write a unit test on stm32, using Arduino framework. Uploading is fine but it stucks here showing

“If you don’t see any output for the first 10 secs, please reset board (press reset button)”

this message on terminal.

There is a unsolved topic based on this which says create a custom transport, but i couldn’t find any documentation for the same.

Previous Topic link:

I’m not sure if I understand the problem correctly.

You have your target board and you flash it via an ST-Link and the SWD interface.

But you do not have a UART interface and adapter, so no COM port is visible?

Or do you have a USB-UART adapter connected to the board but cannot get any output to show up? Does a regular firmware with Serial.println() give output?

1 Like

Sorry for the unclear question,

The problem is as you mentioned I am flashing using STlink- SWD interfacre but I don’t have UART interface

No regular Serial print didn’t work as well

Well with just the SWD interface on the STLink you could still attempt to print the results via the Semi-hosting interface (among other things). Try following this issue first to get a basic firmware up and running that uses semihosting to the point where you can see the output.

From there you can extend the unit test transport code to use semihosting, as outlined in the documentation.

1 Like

Thanks for the help :slight_smile: