Changes between Version 2 and Version 3 of Developer/Tracing


Ignore:
Timestamp:
Mar 15, 2015, 6:02:48 AM (5 years ago)
Author:
Chris Johns
Comment:

Add Printk workflow.

Legend:

Unmodified
Added
Removed
Modified
  • Developer/Tracing

    v2 v3  
    2828''Note: CTF support is still under development''
    2929
    30 RTEMS Trace can generate the Common Trace Format (CTF) files.
     30RTEMS Trace can generate the Common Trace Format (CTF) files. The work flow is shown in following figure:
    3131
    3232[[Image(rtems-trace.png, 40%, align=center)]]
    3333
    34 The work flow is:
     34 [1]:: The user creates an RTEMS application in the normal manner as well as a Trace Linker configuration file. The configuration file specifies using the CTF trace mode, the functions to trace, and the default trace enable and trigger configuration the Capture Engine uses. The user invokes the Trace Linker with the configuration and the normal link command line used to the link the application executable. The application ELF object files and libraries, including the RTEMS libraries are standard and do not need to be built specially.
    3535
    36  [1]:: The user creates an RTEMS application in the normal manner as well as a Trace Linker configuration file. The configuration file specifies using the CTF trace mdre, the functions to trace, and the default trace enable and trigger configuration the Capture Engine uses. The user invokes the Trace Linker with the configuration and the normal link command line used to the link the application executable. The application ELF object files and libraries, including the RTEMS libraries are standard and do not need to be built specially.
    37 
    38  [2]:: The RTEMS Trace Linker reads the user's configuration file and that results in it reading the standard CTF Trace Configuration files installed with the RTEMS Trace Linker. The trace linker uses the target compiler and linker to create the trace enabled application execuable. It wraps the functions defined in the user's configuration with code that generates trace records for the Capture Engine. Each trace record is given an identifier that is used to decode the trace data. The trace wrapper code is compiled with the target compiler and the resulting ELF object file is added to the standard link command line used to link the application and the application is relinked using the wrapping option of the GNU linker.
     36 [2]:: The RTEMS Trace Linker reads the user's configuration file and that results in it reading the standard CTF Trace Configuration files installed with the RTEMS Trace Linker. The trace linker uses the target compiler and linker to create the trace enabled application executable. It wraps the functions defined in the user's configuration with code that generates trace records for the Capture Engine. Each trace record is given an identifier that is used to decode the trace data. The trace wrapper code is compiled with the target compiler and the resulting ELF object file is added to the standard link command line used to link the application and the application is relinked using the wrapping option of the GNU linker.
    3937
    4038 [3]:: The trace linker creates and RTEMS ELF executable that can be run on the target hardware or simulator. It also creates a CTF configuration file defining the trace records and the format of the trace records.
     
    4341
    4442 [5]:: The RTEMS Trace data and the CTF configuration is passed to Babletrace where it is converted to a CTF format data file. CTF data files can be viewed with a range of visualisation tools.
     43
     44== RTEMS Trace Using Printk ==
     45
     46''Note: CTF support is still under development''
     47
     48RTEMS Trace can use the printk call to generate console output. The work flow is shown in following figure:
     49
     50[[Image(rtems-trace-printk.png, 40%, align=center)]]
     51
     52 [1]:: The user creates an RTEMS application in the normal manner as well as a Trace Linker configuration file. The configuration file specifies using the Printk trace mode and the functions to trace. The user invokes the Trace Linker with the configuration and the normal link command line used to the link the application executable. The application ELF object files and libraries, including the RTEMS libraries are standard and do not need to be built specially.
     53
     54 [2]:: The RTEMS Trace Linker reads the user's configuration file and that results in it reading the standard Printk Trace Configuration files installed with the RTEMS Trace Linker. The trace linker uses the target compiler and linker to create the trace enabled application executable. It wraps the functions defined in the user's configuration with code that prints the entry with arguments and exit and return value if any. The trace wrapper code is compiled with the target compiler and the resulting ELF object file is added to the standard link command line used to link the application and the application is relinked using the wrapping option of the GNU linker.
     55
     56 [3]:: The trace linker creates and RTEMS ELF executable that can be run on the target hardware or simulator.
     57
     58 [4]:: The application is run in the hardware directly or using a debugger. The printk output appears on the target console and the user can save that to a file.