Debugging TI RTOS TEAM 4 JORGE JIMENEZ JHONY MEDRANO ALBIEN FEZGA.

11
Debugging TI RTOS TEAM 4 JORGE JIMENEZ JHONY MEDRANO ALBIEN FEZGA

Transcript of Debugging TI RTOS TEAM 4 JORGE JIMENEZ JHONY MEDRANO ALBIEN FEZGA.

Page 1: Debugging TI RTOS TEAM 4 JORGE JIMENEZ JHONY MEDRANO ALBIEN FEZGA.

Debugging TI RTOSTEAM 4

JORGE J IMENEZ

JHONY MEDRANO

ALB IEN FEZGA

Page 2: Debugging TI RTOS TEAM 4 JORGE JIMENEZ JHONY MEDRANO ALBIEN FEZGA.

Overview System Analyzer• The System Analyzer tool suite provides a consistent and portable way to instrument software.• Features include the ability to view the CPU and thread loads, the execution sequence, thread

durations, and context profiling.• Events can be uploaded from the target to RTOS Analyzer and System Analyzer while the target is

running without having to halt the target.• A number of event logging modules are provided to allow instrumentation events to be captured and

uploaded to the host over both JTAG and non-JTAG transports.• SYS/BIOS can transfer data about CPU Load, Task Load, and Task Execution to the host.

Page 3: Debugging TI RTOS TEAM 4 JORGE JIMENEZ JHONY MEDRANO ALBIEN FEZGA.

Adding a Logging to a Project To add SYS/BIOS logging to a project, follow these steps:

1. Double-click on the configuration file (.cfg) for your project to open it with the XGCONF Configuration Editor.

2. If LoggingSetup is already listed in your Outline pane, skip to Step 5.

3. In the "Available Products" area, expand the list as shown here to find the LoggingSetup module in the UIA product.

4. Right-click on the LoggingSetup module, and select Use LoggingSetup. This adds the LoggingSetup module to your project and opens the configuration page for the module.

Page 4: Debugging TI RTOS TEAM 4 JORGE JIMENEZ JHONY MEDRANO ALBIEN FEZGA.

Adding a Logging to a Project 5. Using the configuration page for the LoggingSetup:• Task Context: enables logging of Task ready,

block, switch, yield, sleep, set priority, and exit events.

◦ Swi Context: enables logging of Software Interrupt post, begin, and end events

◦ Hwi Context: enables logging of Hardware Interrupt begin, and end events

WARNING!◦ Application performance may be impacted if you

enable logging of swi or hwi context for applications with Swi or Hwi functions that run frequently.

Page 5: Debugging TI RTOS TEAM 4 JORGE JIMENEZ JHONY MEDRANO ALBIEN FEZGA.

LoggerIdle over UART

Page 6: Debugging TI RTOS TEAM 4 JORGE JIMENEZ JHONY MEDRANO ALBIEN FEZGA.

LoggerIdle over UART• Data logged can be passed to a host computer through serial by selecting LoggerIdle in the Loggers section of the setup.

• Once selected, the LoggerIdle needs to be configured. • Add a Transport Function • Select proper buffer size.• Select Transport Type UART

•More information can be found by clicking the more info link at the setup window. A wiki with a tutorial can be found following the link.

Page 7: Debugging TI RTOS TEAM 4 JORGE JIMENEZ JHONY MEDRANO ALBIEN FEZGA.

Adding Log Events to your Code• Log calls are of the format: • Log_typeN(String, arg1, arg2… argN). • Valid types are print, info, warning and error.• N is the number of arguments between 0 and 5.

•Example:• Log_info2("tsk1 Entering. arg0,1 = %d %d", arg0, arg1)

Page 8: Debugging TI RTOS TEAM 4 JORGE JIMENEZ JHONY MEDRANO ALBIEN FEZGA.

Running RTOS Analyzer• After you have built and run your application, follow these steps in the CCS Debug view to see Log messages from your application with RTOS Analyzer:• Open an analyzer by selecting Tools > RTOS Analyzer > Printf and Error Logs.• The Analysis Configuration detects the type of transport you are using.• Select Features to Run.• Configure the analyzer to run for a set time or forever.• You can also choose when to process the data.• And whether to clear existing data and save the data to a file.

Page 9: Debugging TI RTOS TEAM 4 JORGE JIMENEZ JHONY MEDRANO ALBIEN FEZGA.

Printf• Lets you use the tried-and-true debugging mechanism of sending execution information to the console.• For example, add a printf to a task to verify its execution.

• The printf() function outputs data to a CIO buffer on the target. When CCS is attached to the

target (for example, via JTAG or USB), the printf() output is displayed in the Console window.

• CIO is a broad term referring to the input and output functions in the RTS.

Page 10: Debugging TI RTOS TEAM 4 JORGE JIMENEZ JHONY MEDRANO ALBIEN FEZGA.

LED’s• Flash LEDs to indicate that the application has arrived at a certain point.

•Similar to printf function.

•However, the output that’s is connected to the LED, can be connected to an oscilloscope to measure frequency of operation.

Page 11: Debugging TI RTOS TEAM 4 JORGE JIMENEZ JHONY MEDRANO ALBIEN FEZGA.

Questions?