2016-02-19 10:25 AM
Hi there,
I have a Nucleo-L476 board I would like to have printf() working. I used the tiny-printf provided by the Atollic IDE but I still need to implement the _write() function.Any suggestion on how this can be accomplished using this board? Should I use an UART or is it possible to use SWD?Thanks!2016-02-19 10:35 AM
I should be possible to use either, the SWV only being usable with things like the ST-LINK Utilities, or a debug console. The USART is workable from a Terminal application, or any program you write that can open a serial port.
Should be nothing unique about the L4, any Atollic/GNU tutorial on doing this kind of semi-hosting should get you where you want to go.2016-02-19 01:43 PM
Thanks for the quick reply!
I just noticed that the SWV feature in Atollic is only available in the PRO version. Is there a way I can easily (ie, not using a USB CDC stack) print some characters through an UART and ST-LINK on the Nucleo board?2016-02-19 02:01 PM
1. When you use attolic specific functions please ask on attolic forum or something.
2. Why you need print standard function? 3. Why you use tool when free solution can much more? 4. If you have free uart use uart. Writee own not not neccesarry printf function for this. OR read about system calls. In net you can find many examples of this (syscalls.c).2016-02-19 05:44 PM
Yes, you'd want to check the manual for the USART that connects to the ST-LINK's VCP. On other Nucleo's this is USART2 on PA2/PA3, but you'd need to double check.
The SWV will also work with the ST-LINK Utilities.