le_build_config.h

Go to the documentation of this file.
1 
2 /**
3  * @page c_le_build_cfg Build Configuration
4  *
5  * In the file @c le_build_conifg.h are a number of preprocessor macros. Uncommenting these macros
6  * enables a non-standard feature of the framework.
7  *
8  * <HR>
9  *
10  * @section bld_cfg_mem_trace LE_MEM_TRACE
11  *
12  * When @c LE_MEM_TRACE is defined, the memory subsystem will create a trace point for every memory
13  * pool created. The name of the tracepoint will be the same of the pool, and is of the form
14  * "component.poolName".
15  *
16  * @section bld_cfg_mem_valgrind LE_MEM_VALGRIND
17  *
18  * When @c LE_MEM_VALGRIND is enabled the memory system doesn't use pools anymore but in fact
19  * switches to use malloc/free per-block. This way, tools like valgrind can be used on a Legato
20  * executable.
21  *
22  * @section bld_cfg_disable_SMACK LE_SMACK_DISABLE
23  *
24  * Legato provides the ability to disable the SMACK API. We don’t recommend disabling SMACK:
25  * users do so at their own risk.
26  *
27  * By disabling SMACK, you essentially render the SMACK APIs to do nothing; SMACK labels aren’t set
28  * during Legato runtime. On the Yocto side, disabling SMACK will not apply SMACK labels on certain
29  * processes, files, and directories.
30  *
31  * If Legato's SMACK API is disabled, users must set SMACK labels for their own runtime environment
32  * if they want to use SMACK security.
33  *
34  * To disable SMACK, follow these steps:
35  * - Edit "framework/c/inc/le_build_config.h" and uncomment "//#define LE_SMACK_DISABLE".
36  * - Build Legato.
37  * - Flash the resulting legato.cwe or legatoz.cwe with the fwupdate tool. Do not install Legato with "instlegato".
38  * - After the target reboots, it should have the file "/legato/SMACK_DISABLED".
39  * - Reboot the target again.
40 
41  * To re-enable SMACK, follow these steps:
42  * - Edit "framework/c/inc/le_build_config.h" and comment "#define LE_SMACK_DISABLE".
43  * - Build Legato.
44  * - Flash the resulting legato.cwe or legatoz.cwe with the fwupdate tool. Do not install Legato with "instlegato".
45  * - After the target reboots, it should @b not have the file "/legato/SMACK_DISABLED".
46  * - Reboot the target again.
47  *
48  * @section bld_cfg_disable_SEGV_HANDLER LE_SEGV_HANDLER_DISABLE
49  *
50  * When @c LE_SEGV_HANDLER_DISABLE is disabled, the ShowStackSignalHandler() will not use signal
51  * derivation and sigsetjmp()/siglongjmp() to continue and try to survive to invalid memory access
52  * while decoding the stack or the back-trace. This "2nd-level" handler is an ultimate protection
53  * against SEGV. However this handler relies on undefined behaviour of sigsetjmp(), so is more
54  * risky.
55  *
56  * <HR>
57  *
58  * Copyright (C) Sierra Wireless Inc.
59  */
60 
61 //--------------------------------------------------------------------------------------------------
62 /**
63  * @file le_build_config.h
64  *
65  * This file includes preprocessor macros that can be used to fine tune the Legato framework.
66  *
67  * Copyright (C) Sierra Wireless Inc.
68  */
69 //--------------------------------------------------------------------------------------------------
70 #ifndef LE_BUILD_CONFIG_H_INCLUDE_GUARD
71 #define LE_BUILD_CONFIG_H_INCLUDE_GUARD
72 
73 
74 
75 // Uncomment this define to enable memory tracing.
76 //#define LE_MEM_TRACE
77 
78 
79 
80 // Uncomment this define to enable valgrind style memory tracking.
81 //#define LE_MEM_VALGRIND
82 
83 
84 
85 // Uncomment this define to disable the "2nd SEGV handler" protection in ShowStackSignalHandler().
86 //#define LE_SEGV_HANDLER_DISABLE
87 
88 
89 
90 #endif