I’ve started with the blinky app and it does the blinking fine, but I can’t seem to get the printf come up on the SWD window in ST-LINK Utility. This link http://controlsoft.nmmu.ac.za/STM32F3-Discovery-Board/Example-programs/Serial-Wire-Viewer-(SWV) shows how to get it going on a slightly different STM disco board. The suggested mod of connecting PB3 to SWD pin 6 does not work. There is no signal on PB3 (according to oscilloscope)
How can I find out where the printf is being sent to? And possibly even change it to PB3.
I haven’t yet used the viewer. But you should see the output to your serial com port. Please verify which com port your ST is assigned to, open it with baudrate set to 9600 (If your example does not redefined it using stdio serial object to other speed, some examples have baudrate changed to 115200).
Thanks for that. But this board does not have a comport wired up. The TX/RX from the processor are on the connector but no RS232 driver or anything. That’s why I was hoping to get it through the ST-Link USB connection
How can I find out which com port the printf goes to. Where are the processor specific settings? I just ran the config with yotta as described in the getting started section of the mbed. But it does not tell me how the hardware is mapped to the mbed OS.
i don’t know if you find which pins, but try PA_9 as TX and PA_10 as RX, or maybe the inverse, i don’t remember, have a look on the datasheet, it worked fine for me. You can also define the pins you want to use by declaring them as following
Serial pc(PE_1, PE_0); the first one is TX the second is RX, and then set up your baud rate by pc.baud(115200);
Maybe late to this question -
Did you check the speed of the System Clock and the Stimulus port in your viewer? The SWV settings must match the system core clock (similar to the way that a normal UART must match the baud rate.)