This is possible using uVision Event Recorder:
See Configuring printf on Keil
The IDE can do it for you - go to 'Manage Run-Time Environment' and select the right option for STDOUT. In this case ITM.
For sure for non M0 devices - in this case not available on F0.
The "USER" selection is normally used to redirect to hardware such as a UART.
Using ITM or EVR does not require a UART or other user hardware.
Attached is an updated version of the Keil ST-Link appnote. I will put this on Keil.com early next week:
See page 15 for the method to provide printf for STM32F0 Coretx-M0 processors. This will also work for other Cortex-M devices.
Retrieving data ...