Appendix C Advanced build options. STMicroelectronics Multicom 4
تبلیغات
تبلیغات
Advanced build options
Appendix C Advanced build options
Note:
UM1112
This appendix describes how environment or make command line variables can be used to tailor the Multicom build process. See
Chapter 1: Building Multicom on page 8
how to build the software.
Many of the options described below alter they way the software is built. For such changes it
is important that the tree is cleaned before building to prevent make’s build avoidance
techniques from interfering with the changes.
C.1
Note:
Debugging assertions and logging
All target resident source code is supplied with the Multicom distribution, this allows application developers to enable the in built assertion checking and/or run-time logging to help them identify problems.
Debug assertions are runtime tests compiled into the application that, to a limited extent, verify correct operation of the program. This is supplementary to normal debugging which requires only debugging information. Compiling with debugging information is discussed in
Chapter 1: Building Multicom on page 8
.
All these facilities are controlled at build time by a single environment or make variable
DEBUG_CFLAGS
. The contents of this variable are placed on the command line for every compiler invocation allowing DEBUG_CFLAGS to be used to defined C pre-processor macros the alter the build.
Table 33. Pre-processor macros that enable diagnostic code
Pre-processor macro Purpose
ICS_DEBUG
Enable all debug assertions within the ICS tree. Also causes the tracing code to be compiled in. When used alone this macro does not cause any tracing to be output since each module must have tracing separately enabled.
ICS_DEBUG_FLAGS=<mask>
Enable individual ICS subsystem library tracing.
ICS_DEBUG_MEM=1
MME_DEBUG
Enable extra checking and tracing of all memory allocations from the ICS subsystem.
Enable all debug assertions within the MME tree. Also causes the tracing code to be compiled in. When used alone this macro does not cause any tracing to be output since each module must have tracing separately enabled.
MME_DEBUG_FLAGS=<mask>
Enable individual MME subsystem library tracing,
To build an Multicom tree with the maximum possible amount of diagnostic code the following command line could be used.
make DEBUG_CFLAGS=”-DICS_DEBUG -DICS_DEBUG_MEM=1
-DICS_DEBUG_FLAGS=-1 -DMME_DEBUG -DMME_DEBUG_FLAGS=-1”
DEBUG_CFLAGS
does not have to be specified on the make command line; it can also be set as an environment variable.
216/224 8182595 Rev 5
UM1112 Advanced build options
When running the host under Linux, debug logging can be enabled in the same way, that is by compiling the Multicom 4 kernel drivers, having set DEBUG_CFLAGS appropriately. The debug logging level and output channel can then be controlled by using the kernel module parameters supplied to both the ICS and MME kernel modules. For example: insmod ics.ko debug_flags=1 debug_chan=5 insmod mme.ko debug_flags=1
MME allows parameters such as thread priority to be tuned without recompiling Multicom components. The function to modify tuneable parameters is:
MME_ERROR MME_ModifyTuneable(MME_Tuneable_t key, MME_UINT value)
Each call to this function allows a single tuneable value to be updated. See
8182595 Rev 5 217/224
217
دانلود
تبلیغات