Forum Discussion
Altera_Forum
Honored Contributor
15 years agoIt depends on the driver. The one from the Altera HAL (the driver used with ucOS, or when no OS is used) will just stop putting data in the buffer once it is full. You can therefore safely continue to write to the jtag uart, the only loss in system speed is due to the time spent to process the strings in the printf fuctions.
The driver for the eCos operating systems hangs when its buffer is full, until a JTAG connection is available to dump the dada. For the other operating systems I don't know, but you can experiment a bit with a simple test software. An elegant way of dealing with it can be to use# defines in your code. As an example you can define a debug_printf macro than would usually map to the printf() function when debugging, but do nothing in the released code. That way you just have one define to change in the release code. This can even be done automatically in the makefile (or the IDE, depending on the tool you are using).