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.

RTOS/66AK2H12: LoggerBuf usage questions

Part Number: 66AK2H12
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

SYS/BIOS 6.50, XDCtools 3.50, CCS 7.2

I am using the xdc.runtime.Log and xdc.runtime.LoggerBuf. Using ROV Classic I can see my log info/warnings/error showing up as expected but I have several questions;

1) Am I using the proper package?

2) Currently we are not using SMP but I see that there is an equivalent package there: ti.sysbios.smp.LoggerBuf. If we go to SMP, will I need to switch? 

3) I think I can turn on and off logging via my application using LoggerBuf_enable() and LoggerBuf_disable() and when disabled, there is minimal impact on resources and performance. But if I want to just disable Info level logging I'm not clear on how to do that. I see filters and masks but it is not clear to me how they relate to the Info/Warning/Error levels.

4) I'd like to be able to read and decipher/render as text the log entries via application code. I see LoggerBuf_getNextEntry(). It unfortunately clears the event (I'd prefer that not happen) and they are not in chronological order (I think they are display in order in ROV Classic?) After I get the Log_EventRec using that call, is there an straight forward way to render an event as text? I see Log_doPrint() but that uses System_printf. I'm trying to fill in a local buffer.

The goal is to be able to control the logging and view logged events via a serial link or TCP after deployment.

Mike

  • Hi Mike,

    I've forwarded your query to the TI-RTOS experts. Their feedback should be posted here.

    BR
    Tsvetolin Shulev
  • Mike,

    Have you looked at the UIA loggers? This are integrated with CCS's System Analyzer. There are several different types of loggers (e.g. LoggerIdle) which calls a user specified callback to allow the user to send the log records out some peripheral, etc.

    Here is the download page: e2e.ti.com/.../627355

    Todd
  • Hi Todd. I have not looked at UIA loggers. I am not concerned at this point about integration with CCS system analyzer (honestly don't know what that is at this point) but more with post deployment where my customer will have a terminal on a serial port. My application will have a menu driven system to interact with the user over the serial link. I'd like to be able to turn on/off the logging and query the data logged through this task. So I was wondering if the xdc.runtime.LoggerBuf would support that. do you thinks yes or no? maybe? Would the UIA loggers give me this?
    Kind Regards,
    Mike
  • Hi Mike,

    If you are not looking for System Analyzer integration, LoggerBuf will work for you. You can enable/disable them. You can use LoggerBuf_getNextEntry to get the records and send them out a serial port (or whatever). You'll need to decode them on the host then since they are just binary records not ASCII.

    You can use Log_doPrint to decode the Log records on the target. That API uses System_printf which you could route to the serial port also though. Note: LoggerBuf_flush calls Log_doPrint on all the records in the internal buffer.

    Todd