Other Parts Discussed in Thread: SEGGER
Tool/software:
I have been trying to use the 'log' example to examine the 'log' printf functionality but the problem is that it was printing rubbish on my terminal via the UART. I grabbed my oscilloscope to see what was being printed on the UART for the following lines of code in the 'mainthread()' function:
/* Greet the user, send this to all modules */ Log_printf(LogModule_App1, Log_DEBUG, "Hello World! %d", 1); LogSinkUART_flush(); Log_printf(LogModule_App2, Log_DEBUG, "Hello World!"); LogSinkUART_flush(); Log_printf(LogModule_App3, Log_DEBUG, "Hello World!"); LogSinkUART_flush();
it shall print 'Hello World!'. but what is actually printed is 12 bytes, 4 bytes representing some pointer address, 4 bytes representing the current timestamp, the last 4 bytes representing the v_args which is 1 for the first line in the aforementioned lines of code.
How did I know what each of the bytes represent? I have been debugging the 'log' example code and been digging deep into the library source code. I don't know why this happen. it has been a couple of hours and can't determine why the example code provided by TI isn't working properly.