This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Uartlogging example in ek-tm4c1294xl

Hi,

Development environment:

ccs 6.0.1.00040

tirtos_tivac_2_00_02_36

TivaWare_C_Series-2.1.0.12573

 

I am looking at tm4c to find a similar function like "UARTprintf()" that displays debugging messages on "putty" .

In uartlogging example, I expect "Log_print2" outputs to "System analyzer", also display something on the terminal (Putty).

However I don't see anything in "System Analyzer" but displaying broken characters on "putty".

Baud rate:9600

data bits : 8

stop bits :1

parity: None

flow control : None

What do I have to do to be able to see messages on Putty?

Is "LoggerIdle" the only way to display messages on the "putty" simultaneously with displaying on ccs console or system analyzer?

Thanks,

Jin

  • The UARTLogging example sends out binarry log data that can be interpreted by System Analyzer in CCS. It will be garbage, as you note, in putty.

    We use Log in the RTOS because it has lower performance impact. All the string processing is done of the target (e.g. System Analyzer).

    Did you try connecting System Analyzer to the target?

    Todd

  • Hi Todd,

    I enabled System Analyzer ( Toos->System Analyzer ->??) and tried everything shown on the menu to see the log message.

    However, nothing has been displayed so far.

    Where does the following message display on in uartlogging.c?

    Log_print2(Diags_USER1, "Task %d awake, count = %d", id, count);

    Thanks,

    Jin

  • Are you sure you are connecting to the correct port in CCS? In the debugger, can you open ROV in CCS (Tools->ROV) and look at LoggerIdle. Do you see any entries in it? Step over one of your Log calls and see if it is seen by ROV. Logging over the UART is a two step process. Step one is putting the Log entry into a buffer. The next step is to have the Idle task pump the data out. If the Idle task never executes, the entries are not sent out.

    Note: I'm assuming your read through the content in the TI-RTOS User Guide related to this.

    Todd


  • Hi Todd,

    Since I saw log messages in tools->live session before in a different example, that's why I was looking for the message in live session or print logs other than ROV->LoggerIdle ->Records.


    However I wonder the log message in rov-loggeridle only shows up as I halt program using step over at the point calling Log_print(). The loggers are set not stopMode(JTAG) but LoggerIdle in .cfg, so what I expected is whenever the task goes into idle state the log message is uploaded to System Analyzer by UARTUtils_loggerIdleSend() at runtime while the target is runnging.

    Therefore, I guessed there could be no need to halt the running program  to see the message through System Analyzer.

    You said "If the Idle task never executes, the entries are not sent out" which means idle task is executed only when the program is halted like using step over in this example since idle_function() is not registered in this example?.

    Thanks,

    Jin

  • When you use the stopmode logger, all the Log records are stored in an internal buffer. System Analyzer can read these entries when you suspend/halt the target in the debugger. You can see these records also in ROV.

    When you use LoggerIdle, all the Log records are stored initially in an internal buffer. When the Idle task on the target runs, it send the entries out the UART (or USB...depends what you set-up). Note the Idle Task runs when there are no other Tasks, Swi or Hwi running. The CPU is still running though. When you halt the target, no code executes. If the Idle task never runs, the entries are not sent out. Why would the Idle Task never run? If you had a Task that did while(1) {}, the Idle task would never run.

    LoggerIdle records can be viewed in ROV also (or at least until they are sent out).

    I wanted you to step over the Log statement to make sure the entry went into LoggerIdle.

    Todd

  • hi Todd,

    As I stepped over the program, I could see the log message in ROV, but I wondered why the log message was not shown up while target was running without using step over in LoggerIdle mode.

    In while(1) of the example, what I thought is Task_sleep(sleepDur) delays the execution of the current task and invoke idle task.

    Thanks,
    Jin
  • Hello,

    This thread is marked as answered, however I think it is not. I'm in the same situation, getting the binary data on the COM port, however cannot get anything displayed by the System Analyzer. Using CCS 6.1.0.00104 and TI-RTOS_Tivac_2_14_0_10. When running the uartlogging example app with the debugger, the System Analyzer transport settings set to the Stellaris Virtual Serial Port, for 9600bps (no difference for 115.2kbps), Analysis set to Printf Logs, the Live Session and Printf Logs windows do not show anything.
    When running without the debugger, upon start of the System Analyzer, it is asking for a valid UIA configuration file, with an extension .usmxml. I do not have such a file, so I have created it...

    We are missing some important step in the setup, preventing us to use the System Analyzer. Please advise.

    Thank you,

    Dalibor
  • Hi Dalibor,

    When threads get marked as "answered" additional posts can fall through the cracks. I'd recommend that you open a new thread and reference this one.

    Todd