2019-07-16 01:18 AM
I just started using STM32CubeIDE, and was able to get a blinking LED and getting some UART communication going in no time with a NUCLEO-L476RG eval board.
I am trying to follow the examples in the book "Mastering STM32" by Carmine Noviello, but I am a bit stuck on the ARM Semihosting section. I have tried a couple of things, but I don't know how to get printf() to work for instance in the STM32CubeIDE. Any advice on getting these functions to work so the output is parsed to the UART2 interface would be really appreciated :)
Solved! Go to Solution.
2019-07-16 03:02 AM
Spent some time months ago to try this feature and here is my note for your reference. In short:
2019-07-16 03:02 AM
Spent some time months ago to try this feature and here is my note for your reference. In short:
2019-07-16 03:06 AM
And if you want to try printf over UART, here is a reference:
https://github.com/ethanhuanginst/STM32CubeIDE-Workshop-2019/tree/master/hands-on/03_printf
2019-07-16 03:09 AM
Thanks! Exactly what I was looking for, will definitely try this out.
2020-01-12 09:25 PM
Hi!
I see when you choose Debug probe: ST-LINK (OPENOCD), it works for you. My question is: Which programmer/debugger do you use? I'm ussing ST-LINK v2 (chinese clone) and when I choose the same debug probe and clic "Debug", It show me an error.
So I will you very grateful if you let me know which programmer/debugger do you use? and if you use ST-LINK v2 chinese clone, too, How can I set it to use it with ST-LINK (OPENOCD) debug probe.
Thank you so much.
2020-01-13 06:06 PM
Hi, everyone!
It works for me: http://shawnhymel.com/1840/how-to-use-semihosting-with-stm32/
I hope it help you.
Bye.
2020-09-14 01:51 PM
Excellent ! This is working as intended. Could not use it with ST-LIN GDB, too.