2 README for User Friendly Instrumentation Messages
3 =================================================
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.
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.
14 A further CDL option is provided to help you with that. The
15 procedure is as follows:
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.
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
28 3) Make eCos within this build configuration. It should create
29 install/include/cyg/kernel/instrument_desc.h
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.
35 5) Commit the new file to your version control system or whatever
38 If you wish to rebuild the file "by hand" the command to use, in
39 a suitable shell, is this:
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
45 (all on one line of course) or to rebuild it directly into the
46 kernel source repository:
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
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
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
64 cp -r $(ECOS_BUILD_PREFIX)/include/cyg tempinc
65 cp -r $(ECOS_BUILD_PREFIX)/include/pkgconf tempinc
67 $(ECOS_REPOSITORY)/kernel/${ECOS_VERSION}/host/instr/dump_instr.c
68 -o $(PREFIX)/bin/dump_instr
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.
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.