A small question about the example sketches (e.g. Storage_test, UART_test, Printf)

Currently I am experimenting with the example sketch Printf, similarly, after building and uploading the original code to pixhawk, nothing could be observed from the com ports (neither the console port-uartA nor the debugging port-uartE).
I tried to add the line “hal.console->begin(57600);” followed by a delay of 1s, yet it did not help the situation.