Printf() is a standard I/O library routine which operates the UART in polled mode in most 8051 'C' compilers. It is likely that the UART write routine is looking for the UART's TI bit to be set to '1' before it will proceed to write a byte to the UART's SBUF register.
If you are seeing this issue in your software on the first call to printf(), modify your UART setup routine so that the TI bit is initialized to '1'.
There are also examples of using the UART with the standard I/O libraries in the IDE's examples directory, which is typically located at CilabsMCUExamples.
Hanging on printf()
Where would the printf() then display?
@xjoshpointoh,
It will print on any serial terminal (such as TeraTerm or Termite).
Best,
Manasa