]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/kernel/v2_0/host/instr/readme.txt
Initial revision
[karo-tx-redboot.git] / packages / kernel / v2_0 / host / instr / readme.txt
1
2 README for User Friendly Instrumentation Messages
3 =================================================
4
5 The CDL option CYGDBG_KERNEL_INSTRUMENT_MSGS controls whether the
6 system is capable of displaying user friendly instrumentation
7 messages.  To do this it needs to know what event numbers mean
8 what events - as a text string to print for you.
9
10 It gets the information from a table created by the header file
11 instrument_desc.h in the kernel.  If the instrumentation numbers
12 change, you must rebuild that header to match.
13
14 A further CDL option is provided to help you with that.  The
15 procedure is as follows:
16
17 1) Remove kernel/VERSION/include/instrument_desc.h from your
18    repository.  Is is probably a good idea to move it away rather
19    than deleting it in case the next stages fail.
20
21 2) Make a build configuration, enabling options
22    CYGDBG_KERNEL_INSTRUMENT, CYGDBG_KERNEL_INSTRUMENT_MSGS and
23    CYGDBG_KERNEL_INSTRUMENT_MSGS_BUILD_HEADERFILE in the kernel.
24    Viewed in the GUI configtool, "Kernel instrumentation", "Print
25    user friendly instrument messages" and "Rebuild the header
26    file" respectively.
27
28 3) Make eCos within this build configuration.  It should create
29    install/include/cyg/kernel/instrument_desc.h
30
31 4) Copy that new file back to your repository, to
32    kernel/VERSION/include/instrument_desc.h replacing the file
33    you moved aside in step 1.
34
35 5) Commit the new file to your version control system or whatever
36    you use.
37
38 If you wish to rebuild the file "by hand" the command to use, in
39 a suitable shell, is this:
40
41    $ECOS_REPOSITORY/kernel/$ECOS_VERSION/host/instr/instrument.sh 
42         $ECOS_REPOSITORY/kernel/$ECOS_VERSION/include/instrmnt.h
43         > $ECOS_BUILD_PREFIX/include/cyg/kernel/instrument_desc.h
44
45 (all on one line of course) or to rebuild it directly into the
46 kernel source repository:
47
48    $ECOS_REPOSITORY/kernel/$ECOS_VERSION/host/instr/instrument.sh 
49         $ECOS_REPOSITORY/kernel/$ECOS_VERSION/include/instrmnt.h
50         > $ECOS_REPOSITORY/kernel/$ECOS_VERSION/include/instrument_desc.h
51
52 It's up to you to sort out file permissions for this to work, and
53 to set environment variables as required or edit these lines as
54 you type them.
55
56
57 There is also a host-based program which can print a buffer
58 nicely for you - if you can get the data into your host.
59 Enabling CDL option CYGDBG_KERNEL_INSTRUMENT_BUILD_HOST_DUMP or
60 "Build the host tool to print out a dump" will build it for you
61 in install/bin.  To build it instead "by hand", use
62
63     mkdir -p tempinc
64     cp -r $(ECOS_BUILD_PREFIX)/include/cyg tempinc
65     cp -r $(ECOS_BUILD_PREFIX)/include/pkgconf tempinc
66     cc -I./tempinc
67     $(ECOS_REPOSITORY)/kernel/${ECOS_VERSION}/host/instr/dump_instr.c
68     -o $(PREFIX)/bin/dump_instr
69
70 again with environment variables as required, or type in whatever
71 is appropriate.  You still have to somehow get the
72 instrumentation buffer into a file on the host. 'Exercise for the
73 reader' as university lecturers tend to say.
74
75 One possibility is to set up a tftp *server* in the target which
76 will serve the instrumentation buffer.  This hint is as far as
77 support for this goes.
78
79
80