Hi,

This is an update on the RTEMS trace linker being worked on and found in the http://git.rtems.org/chrisj/rtl-host.git repo.

The following is a trace using the both_hello example in examples-v2 using the trace configuration file attached:

 $ sparc-rtems4.11-run both_hello.exe
 >> _Thread_Initialize (0x020013C0)
  1] Objects_Information*(4) = 0203C70C
  2] Thread_Control*(4) = 0203EB48
  3] const Scheduler_Control*(4) = 02035FF8
  4] void*(4) = 00000000
  5] size_t(4) = 00001000
  6] bool(1) = 00
  7] Priority_Control(4) = 000000FF
  8] bool(1) = 01
  9] Thread_CPU_budget_algorithms(4) = 00000000
 10] Thread_CPU_budget_algorithm_callout(4) = 00000000
 11] uint32_t(4) = 00000000
 12] Objects_Name(4) = 49444C45
 << _Thread_Initialize (0x020013C0)
 rt] bool(1) = 01
 >> _Thread_Initialize (0x020013C0)
  1] Objects_Information*(4) = 0203C5EC
  2] Thread_Control*(4) = 0203F0F8
  3] const Scheduler_Control*(4) = 02035FF8
  4] void*(4) = 00000000
  5] size_t(4) = 00001000
  6] bool(1) = 00
  7] Priority_Control(4) = 00000001
  8] bool(1) = 00
  9] Thread_CPU_budget_algorithms(4) = 00000000
 10] Thread_CPU_budget_algorithm_callout(4) = 00000000
 11] uint32_t(4) = 00000000
 12] Objects_Name(4) = 55493120
 << _Thread_Initialize (0x020013C0)
 rt] bool(1) = 01
 >> _Thread_Initialize (0x020013C0)
  1] Objects_Information*(4) = 0203C86C
  2] Thread_Control*(4) = 0203F940
  3] const Scheduler_Control*(4) = 02035FF8
  4] void*(4) = 00000000
  5] size_t(4) = 00002000
  6] bool(1) = 01
  7] Priority_Control(4) = 000000FD
  8] bool(1) = 01
  9] Thread_CPU_budget_algorithms(4) = 00000000
 10] Thread_CPU_budget_algorithm_callout(4) = 00000000
 11] uint32_t(4) = 00000000
 12] Objects_Name(4) = 00000000
 << _Thread_Initialize (0x020013C0)
 rt] bool(1) = 01
Classic -- Hello World
POSIX -- Hello World
 >> exit (0x02001324)
  1] int(4) = 00000000

I also attach the waf script I used to build the example. You need to build and install the rtl-host code to get a working rtems-tld.

The 3 threads created are the Init, POSIX_Init and IDLE No code in RTEMS was altered to do this.

Chris
;
; RTEMS Trace Linker Configuration: hello
;
; This script configure the both hello example to perform some
; tracing via the printf trace generator.
;
[tracer]
;
; Name of the trace.
;
name = Hello RTEMS Tracer
;
; Options can be defined here or on the command line.
;
options = all-funcs, verbose
;
; Functions to trace.
;
traces = hello-trace
;
; Define the function sets. These are the function's that can be
; added to the trace lists.
;
functions = hello-trace
;
; Include RTEMS Trace support.
;
include = rtems.ini, rtld-base.ini

;
; User application trace example.
;
[hello-trace]
generator = printk-generator
signatures = hello-signatures
trace = exit, Init, POSIX_Init, _Thread_Initialize
header = "#include <rtems.h>"
header = "#include <rtems/score/objectimpl.h>"
header = "#include <rtems/score/scheduler.h>"

[hello-signatures]
exit=void, int
Init = void, rtems_task_argument
POSIX_Init = void*, void*
_Thread_Initialize = bool, Objects_Information*, Thread_Control*, const 
Scheduler_Control*, void*, size_t, bool, Priority_Control, bool, 
Thread_CPU_budget_algorithms, Thread_CPU_budget_algorithm_callout, uint32_t, 
Objects_Name
# Copyright 2013 Gedare Bloom (ged...@rtems.org)
# Copyright 2014 Chris Johns (chr...@rtems.org)
#
# This file's license is 2-clause BSD as in this distribution's LICENSE.2 file.
#

# Waf build script for an RTEMS Hello
import rtems_waf.rtems as rtems

def build(bld):
    rtems.build(bld)

    if rtems.check_env(bld, 'RTEMS_TLD'):
        bld(features = 'c rtrace',
            target = 'both_hello.exe',
            source = ['test.c'],
            rtems_trace_cfg = '../../hello/both_hello/hello.ini')
    else:
        bld(features = 'c cprogram',
            target = 'both_hello.exe',
            source = ['test.c'])
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to