Ulf Magnusson | bd6e044 | 2019-11-01 13:45:29 +0100 | [diff] [blame] | 1 | # General configuration options |
Anas Nashif | 7d4163d | 2015-08-22 14:43:07 -0400 | [diff] [blame] | 2 | |
Anas Nashif | 7d4163d | 2015-08-22 14:43:07 -0400 | [diff] [blame] | 3 | # Copyright (c) 2014-2015 Wind River Systems, Inc. |
Daniel Leung | 8df10d4 | 2016-03-25 14:30:50 -0700 | [diff] [blame] | 4 | # Copyright (c) 2016 Intel Corporation |
David B. Kinder | ac74d8b | 2017-01-18 17:01:01 -0800 | [diff] [blame] | 5 | # SPDX-License-Identifier: Apache-2.0 |
Sebastian Bøe | 4b61bd1 | 2018-01-09 14:12:07 +0100 | [diff] [blame] | 6 | |
Anas Nashif | 658f6bc | 2019-05-28 14:22:51 -0400 | [diff] [blame] | 7 | menu "Modules" |
| 8 | |
Sebastian Bøe | 7061c03 | 2019-03-01 12:57:11 +0100 | [diff] [blame] | 9 | source "$(CMAKE_BINARY_DIR)/Kconfig.modules" |
Anas Nashif | 8017c59 | 2019-05-23 17:19:41 -0400 | [diff] [blame] | 10 | source "modules/Kconfig" |
Emanuele Di Santo | 9acb643 | 2019-03-13 15:30:55 +0100 | [diff] [blame] | 11 | |
Anas Nashif | 658f6bc | 2019-05-28 14:22:51 -0400 | [diff] [blame] | 12 | endmenu |
| 13 | |
Ulf Magnusson | ec3eff5 | 2018-07-30 10:57:47 +0200 | [diff] [blame] | 14 | # Include these first so that any properties (e.g. defaults) below can be |
Anas Nashif | f2cb20c | 2019-06-18 14:45:40 -0400 | [diff] [blame] | 15 | # overridden in *.defconfig files (by defining symbols in multiple locations). |
Ulf Magnusson | ec3eff5 | 2018-07-30 10:57:47 +0200 | [diff] [blame] | 16 | # After merging all the symbol definitions, Kconfig picks the first property |
| 17 | # (e.g. the first default) with a satisfied condition. |
| 18 | # |
| 19 | # Board defaults should be parsed before SoC defaults, because boards usually |
Erwan Gouriou | e3bed1f | 2019-11-22 10:37:01 +0100 | [diff] [blame] | 20 | # overrides SoC values. Similarly shields defaults should be parsed before |
| 21 | # boards defaults, because shields defaults override boards defaults. |
Ulf Magnusson | ec3eff5 | 2018-07-30 10:57:47 +0200 | [diff] [blame] | 22 | # |
Ulf Magnusson | d0e8752 | 2018-09-05 12:58:05 +0200 | [diff] [blame] | 23 | # Note: $ARCH and $BOARD_DIR might be glob patterns. |
Erwan Gouriou | e3bed1f | 2019-11-22 10:37:01 +0100 | [diff] [blame] | 24 | source "boards/shields/*/Kconfig.defconfig" |
| 25 | |
Ulf Magnusson | d713033 | 2018-09-05 13:10:19 +0200 | [diff] [blame] | 26 | source "$(BOARD_DIR)/Kconfig.defconfig" |
Ulf Magnusson | ec3eff5 | 2018-07-30 10:57:47 +0200 | [diff] [blame] | 27 | |
Anas Nashif | 96455d5 | 2018-09-04 14:34:06 -0500 | [diff] [blame] | 28 | source "$(SOC_DIR)/$(ARCH)/*/Kconfig.defconfig" |
Ulf Magnusson | ec3eff5 | 2018-07-30 10:57:47 +0200 | [diff] [blame] | 29 | |
Anas Nashif | abcf2ad | 2018-09-04 08:32:07 -0500 | [diff] [blame] | 30 | source "boards/Kconfig" |
| 31 | |
Anas Nashif | 96455d5 | 2018-09-04 14:34:06 -0500 | [diff] [blame] | 32 | source "$(SOC_DIR)/Kconfig" |
Anas Nashif | abcf2ad | 2018-09-04 08:32:07 -0500 | [diff] [blame] | 33 | |
Anas Nashif | 77ba3c3 | 2015-10-09 06:20:52 -0400 | [diff] [blame] | 34 | source "arch/Kconfig" |
| 35 | |
| 36 | source "kernel/Kconfig" |
| 37 | |
Anas Nashif | c6ba67f | 2017-08-03 07:47:44 -0400 | [diff] [blame] | 38 | source "dts/Kconfig" |
| 39 | |
Anas Nashif | 77ba3c3 | 2015-10-09 06:20:52 -0400 | [diff] [blame] | 40 | source "drivers/Kconfig" |
| 41 | |
Anas Nashif | 0b2c44a | 2016-05-14 23:10:51 -0400 | [diff] [blame] | 42 | source "lib/Kconfig" |
| 43 | |
Ramesh Thomas | e354ad2 | 2016-10-29 04:10:36 -0700 | [diff] [blame] | 44 | source "subsys/Kconfig" |
Ramesh Thomas | cc74572 | 2016-07-25 16:20:54 -0700 | [diff] [blame] | 45 | |
Kumar Gala | 7584a12 | 2016-05-24 14:23:26 -0500 | [diff] [blame] | 46 | source "ext/Kconfig" |
| 47 | |
Kumar Gala | 2630fba | 2020-01-24 09:39:40 -0600 | [diff] [blame] | 48 | osource "$(TOOLCHAIN_KCONFIG_DIR)/Kconfig" |
Anas Nashif | 8017c59 | 2019-05-23 17:19:41 -0400 | [diff] [blame] | 49 | |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 50 | menu "Build and Link Features" |
| 51 | |
| 52 | menu "Linker Options" |
| 53 | |
Daniel Leung | 6600c64 | 2018-10-19 10:15:19 -0700 | [diff] [blame] | 54 | choice |
| 55 | prompt "Linker Orphan Section Handling" |
| 56 | default LINKER_ORPHAN_SECTION_WARN |
| 57 | |
| 58 | config LINKER_ORPHAN_SECTION_PLACE |
| 59 | bool "Place" |
| 60 | help |
| 61 | Linker puts orphan sections in place without warnings |
| 62 | or errors. |
| 63 | |
| 64 | config LINKER_ORPHAN_SECTION_WARN |
| 65 | bool "Warn" |
| 66 | help |
Anas Nashif | f2cb20c | 2019-06-18 14:45:40 -0400 | [diff] [blame] | 67 | Linker places the orphan sections in output and issues |
Daniel Leung | 6600c64 | 2018-10-19 10:15:19 -0700 | [diff] [blame] | 68 | warning about those sections. |
| 69 | |
| 70 | config LINKER_ORPHAN_SECTION_ERROR |
| 71 | bool "Error" |
| 72 | help |
| 73 | Linker exits with error when an orphan section is found. |
| 74 | |
| 75 | endchoice |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 76 | |
Adithya Baglody | 91c5b84 | 2018-11-13 16:57:45 +0530 | [diff] [blame] | 77 | config CODE_DATA_RELOCATION |
Ulf Magnusson | 975de21 | 2019-11-01 10:24:07 +0100 | [diff] [blame] | 78 | bool "Relocate code/data sections" |
| 79 | depends on ARM |
| 80 | help |
Adithya Baglody | 91c5b84 | 2018-11-13 16:57:45 +0530 | [diff] [blame] | 81 | When selected this will relocate .text, data and .bss sections from |
| 82 | the specified files and places it in the required memory region. The |
| 83 | files should be specified in the CMakeList.txt file with |
Håkon Øye Amundsen | d3aa619 | 2019-08-15 09:03:26 +0000 | [diff] [blame] | 84 | a cmake API zephyr_code_relocate(). |
Adithya Baglody | 91c5b84 | 2018-11-13 16:57:45 +0530 | [diff] [blame] | 85 | |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 86 | config HAS_FLASH_LOAD_OFFSET |
| 87 | bool |
| 88 | help |
| 89 | This option is selected by targets having a FLASH_LOAD_OFFSET |
| 90 | and FLASH_LOAD_SIZE. |
| 91 | |
Ulf Magnusson | fd9981a | 2019-11-16 01:33:09 +0100 | [diff] [blame] | 92 | if HAS_FLASH_LOAD_OFFSET |
| 93 | |
Ulf Magnusson | 90b9eb3 | 2019-11-16 01:22:16 +0100 | [diff] [blame] | 94 | config USE_DT_CODE_PARTITION |
Ulf Magnusson | 1f9c5f1 | 2019-11-16 01:16:57 +0100 | [diff] [blame] | 95 | bool "Link application into /chosen/zephyr,code-partition from devicetree" |
Andrzej Puzdrowski | 2b1227f | 2019-03-18 14:02:11 +0100 | [diff] [blame] | 96 | help |
Ulf Magnusson | 1f9c5f1 | 2019-11-16 01:16:57 +0100 | [diff] [blame] | 97 | When enabled, the application will be linked into the flash partition |
| 98 | selected by the zephyr,code-partition property in /chosen in devicetree. |
| 99 | When this is disabled, the flash load offset and size can be set manually |
| 100 | below. |
Andrzej Puzdrowski | 2b1227f | 2019-03-18 14:02:11 +0100 | [diff] [blame] | 101 | |
Kumar Gala | 8ce0cf0 | 2019-08-28 09:29:26 -0500 | [diff] [blame] | 102 | # Workaround for not being able to have commas in macro arguments |
| 103 | DT_CHOSEN_Z_CODE_PARTITION := zephyr,code-partition |
| 104 | |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 105 | config FLASH_LOAD_OFFSET |
Ulf Magnusson | 90b9eb3 | 2019-11-16 01:22:16 +0100 | [diff] [blame] | 106 | # Only user-configurable when USE_DT_CODE_PARTITION is disabled |
| 107 | hex "Kernel load offset" if !USE_DT_CODE_PARTITION |
| 108 | default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION)) if USE_DT_CODE_PARTITION |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 109 | default 0 |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 110 | help |
| 111 | This option specifies the byte offset from the beginning of flash that |
| 112 | the kernel should be loaded into. Changing this value from zero will |
| 113 | affect the Zephyr image's link, and will decrease the total amount of |
| 114 | flash available for use by application code. |
| 115 | |
| 116 | If unsure, leave at the default value 0. |
| 117 | |
| 118 | config FLASH_LOAD_SIZE |
Ulf Magnusson | 90b9eb3 | 2019-11-16 01:22:16 +0100 | [diff] [blame] | 119 | # Only user-configurable when USE_DT_CODE_PARTITION is disabled |
| 120 | hex "Kernel load size" if !USE_DT_CODE_PARTITION |
| 121 | default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION)) if USE_DT_CODE_PARTITION |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 122 | default 0 |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 123 | help |
| 124 | If non-zero, this option specifies the size, in bytes, of the flash |
| 125 | area that the Zephyr image will be allowed to occupy. If zero, the |
| 126 | image will be able to occupy from the FLASH_LOAD_OFFSET to the end of |
| 127 | the device. |
| 128 | |
| 129 | If unsure, leave at the default value 0. |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 130 | |
Ulf Magnusson | fd9981a | 2019-11-16 01:33:09 +0100 | [diff] [blame] | 131 | endif # HAS_FLASH_LOAD_OFFSET |
| 132 | |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 133 | config TEXT_SECTION_OFFSET |
Ole Sæther | 985446a | 2019-01-23 14:13:03 +0100 | [diff] [blame] | 134 | hex |
| 135 | prompt "TEXT section offset" if !BOOTLOADER_MCUBOOT |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 136 | default 0x200 if BOOTLOADER_MCUBOOT |
| 137 | default 0 |
| 138 | help |
| 139 | If the application is built for chain-loading by a bootloader this |
| 140 | variable is required to be set to value that leaves sufficient |
| 141 | space between the beginning of the image and the start of the .text |
| 142 | section to store an image header or any other metadata. |
| 143 | In the particular case of the MCUboot bootloader this reserves enough |
| 144 | space to store the image header, which should also meet vector table |
| 145 | alignment requirements on most ARM targets, although some targets |
| 146 | may require smaller or larger values. |
| 147 | |
| 148 | config HAVE_CUSTOM_LINKER_SCRIPT |
| 149 | bool "Custom linker scripts provided" |
| 150 | help |
| 151 | Set this option if you have a custom linker script which needed to |
| 152 | be define in CUSTOM_LINKER_SCRIPT. |
| 153 | |
| 154 | config CUSTOM_LINKER_SCRIPT |
| 155 | string "Path to custom linker script" |
| 156 | depends on HAVE_CUSTOM_LINKER_SCRIPT |
| 157 | help |
| 158 | Path to the linker script to be used instead of the one define by the |
| 159 | board. |
| 160 | |
| 161 | The linker script must be based on a version provided by Zephyr since |
| 162 | the kernel can expect a certain layout/certain regions. |
| 163 | |
| 164 | This is useful when an application needs to add sections into the |
| 165 | linker script and avoid having to change the script provided by |
| 166 | Zephyr. |
| 167 | |
| 168 | config CUSTOM_RODATA_LD |
Øyvind Rønningstad | 901c0a1 | 2019-03-20 12:53:49 +0100 | [diff] [blame] | 169 | bool "(DEPRECATED) Include custom-rodata.ld" |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 170 | help |
Øyvind Rønningstad | 901c0a1 | 2019-03-20 12:53:49 +0100 | [diff] [blame] | 171 | Note: This is deprecated, use Cmake function zephyr_linker_sources() instead. |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 172 | Include a customized linker script fragment for inserting additional |
| 173 | data and linker directives into the rodata section. |
| 174 | |
| 175 | config CUSTOM_RWDATA_LD |
Øyvind Rønningstad | 901c0a1 | 2019-03-20 12:53:49 +0100 | [diff] [blame] | 176 | bool "(DEPRECATED) Include custom-rwdata.ld" |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 177 | help |
Øyvind Rønningstad | 901c0a1 | 2019-03-20 12:53:49 +0100 | [diff] [blame] | 178 | Note: This is deprecated, use Cmake function zephyr_linker_sources() instead. |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 179 | Include a customized linker script fragment for inserting additional |
| 180 | data and linker directives into the data section. |
| 181 | |
| 182 | config CUSTOM_SECTIONS_LD |
Øyvind Rønningstad | 901c0a1 | 2019-03-20 12:53:49 +0100 | [diff] [blame] | 183 | bool "(DEPRECATED) Include custom-sections.ld" |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 184 | help |
Øyvind Rønningstad | 901c0a1 | 2019-03-20 12:53:49 +0100 | [diff] [blame] | 185 | Note: This is deprecated, use Cmake function zephyr_linker_sources() instead. |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 186 | Include a customized linker script fragment for inserting additional |
| 187 | arbitrary sections. |
| 188 | |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 189 | config KERNEL_ENTRY |
| 190 | string "Kernel entry symbol" |
| 191 | default "__start" |
| 192 | help |
| 193 | Code entry symbol, to be set at linking phase. |
| 194 | |
Sebastian Bøe | 3a0597f | 2019-03-15 14:05:09 +0100 | [diff] [blame] | 195 | config LINKER_SORT_BY_ALIGNMENT |
| 196 | bool "Sort input sections by alignment" |
| 197 | default y |
| 198 | help |
| 199 | This turns on the linker flag to sort sections by alignment |
| 200 | in decreasing size of symbols. This helps to minimize |
| 201 | padding between symbols. |
| 202 | |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 203 | endmenu |
| 204 | |
| 205 | menu "Compiler Options" |
| 206 | |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 207 | config NATIVE_APPLICATION |
| 208 | bool "Build as a native host application" |
| 209 | help |
| 210 | Build as a native application that can run on the host and using |
| 211 | resources and libraries provided by the host. |
| 212 | |
| 213 | choice |
| 214 | prompt "Optimization level" |
| 215 | default NO_OPTIMIZATIONS if COVERAGE |
| 216 | default DEBUG_OPTIMIZATIONS if DEBUG |
| 217 | default SIZE_OPTIMIZATIONS |
| 218 | help |
| 219 | Note that these flags shall only control the compiler |
| 220 | optimization level, and that no extra debug code shall be |
| 221 | conditionally compiled based on them. |
| 222 | |
| 223 | config SIZE_OPTIMIZATIONS |
| 224 | bool "Optimize for size" |
| 225 | help |
| 226 | Compiler optimizations will be set to -Os independently of other |
| 227 | options. |
| 228 | |
| 229 | config SPEED_OPTIMIZATIONS |
| 230 | bool "Optimize for speed" |
| 231 | help |
| 232 | Compiler optimizations will be set to -O2 independently of other |
| 233 | options. |
| 234 | |
| 235 | config DEBUG_OPTIMIZATIONS |
| 236 | bool "Optimize debugging experience" |
| 237 | help |
| 238 | Compiler optimizations will be set to -Og independently of other |
| 239 | options. |
| 240 | |
| 241 | config NO_OPTIMIZATIONS |
| 242 | bool "Optimize nothing" |
| 243 | help |
| 244 | Compiler optimizations will be set to -O0 independently of other |
| 245 | options. |
| 246 | |
| 247 | endchoice |
| 248 | |
| 249 | config COMPILER_OPT |
| 250 | string "Custom compiler options" |
| 251 | help |
| 252 | This option is a free-form string that is passed to the compiler |
| 253 | when building all parts of a project (i.e. kernel). |
| 254 | The compiler options specified by this string supplement the |
| 255 | predefined set of compiler supplied by the build system, |
| 256 | and can be used to change compiler optimization, warning and error |
| 257 | messages, and so on. |
| 258 | |
| 259 | endmenu |
| 260 | |
Anas Nashif | 22b95a2 | 2019-11-24 11:28:38 -0500 | [diff] [blame] | 261 | choice |
| 262 | prompt "Error checking behavior for CHECK macro" |
| 263 | default RUNTIME_ERROR_CHECKS |
| 264 | |
| 265 | config ASSERT_ON_ERRORS |
| 266 | bool "Assert on all errors" |
| 267 | help |
| 268 | Assert on errors covered with the CHECK macro. |
| 269 | |
| 270 | config NO_RUNTIME_CHECKS |
| 271 | bool "No runtime error checks" |
| 272 | help |
| 273 | Do not do any runtime checks or asserts when using the CHECK macro. |
| 274 | |
| 275 | config RUNTIME_ERROR_CHECKS |
| 276 | bool "Enable runtime error checks" |
| 277 | help |
| 278 | Always perform runtime checks covered with the CHECK macro. This |
| 279 | option is the default and the only option used during testing. |
| 280 | |
| 281 | endchoice |
| 282 | |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 283 | menu "Build Options" |
| 284 | |
| 285 | config KERNEL_BIN_NAME |
| 286 | string "The kernel binary name" |
| 287 | default "zephyr" |
| 288 | help |
| 289 | This option sets the name of the generated kernel binary. |
| 290 | |
| 291 | config OUTPUT_STAT |
| 292 | bool "Create a statistics file" |
| 293 | default y |
| 294 | help |
| 295 | Create a stat file using readelf -e <elf> |
| 296 | |
| 297 | config OUTPUT_DISASSEMBLY |
| 298 | bool "Create a disassembly file" |
| 299 | default y |
| 300 | help |
| 301 | Create an .lst file with the assembly listing of the firmware. |
| 302 | |
| 303 | config OUTPUT_PRINT_MEMORY_USAGE |
| 304 | bool "Print memory usage to stdout" |
| 305 | default y |
| 306 | help |
| 307 | If the toolchain supports it, this option will pass |
| 308 | --print-memory-region to the linker when it is doing it's first |
| 309 | linker pass. Note that the memory regions are symbolic concepts |
| 310 | defined by the linker scripts and do not necessarily map |
| 311 | directly to the real physical address space. Take also note that |
| 312 | some platforms do two passes of the linker so the results do not |
| 313 | match exactly to the final elf file. See also rom_report, |
| 314 | ram_report and |
| 315 | https://sourceware.org/binutils/docs/ld/MEMORY.html |
| 316 | |
| 317 | config BUILD_OUTPUT_HEX |
| 318 | bool "Build a binary in HEX format" |
| 319 | help |
| 320 | Build a binary in HEX format. This will build a zephyr.hex file need |
| 321 | by some platforms. |
| 322 | |
| 323 | config BUILD_OUTPUT_BIN |
| 324 | bool "Build a binary in BIN format" |
| 325 | default y |
| 326 | help |
| 327 | Build a binary in BIN format. This will build a zephyr.bin file need |
| 328 | by some platforms. |
| 329 | |
| 330 | config BUILD_OUTPUT_EXE |
| 331 | bool "Build a binary in ELF format with .exe extension" |
| 332 | help |
| 333 | Build a binary in ELF format that can run in the host system. This |
| 334 | will build a zephyr.exe file. |
| 335 | |
| 336 | config BUILD_OUTPUT_S19 |
| 337 | bool "Build a binary in S19 format" |
| 338 | help |
| 339 | Build a binary in S19 format. This will build a zephyr.s19 file need |
| 340 | by some platforms. |
| 341 | |
Håkon Øye Amundsen | c086b93 | 2018-11-26 09:47:16 +0000 | [diff] [blame] | 342 | config BUILD_NO_GAP_FILL |
| 343 | bool "Don't fill gaps in generated hex/bin/s19 files." |
Håkon Øye Amundsen | c086b93 | 2018-11-26 09:47:16 +0000 | [diff] [blame] | 344 | |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 345 | config BUILD_OUTPUT_STRIPPED |
| 346 | bool "Build a stripped binary" |
| 347 | help |
| 348 | Build a stripped binary. This will build a zephyr.stripped file need |
| 349 | by some platforms. |
| 350 | |
| 351 | config APPLICATION_DEFINED_SYSCALL |
| 352 | bool "Scan application folder for any syscall definition" |
| 353 | help |
| 354 | Scan additional folders inside application source folder |
| 355 | for application defined syscalls. |
| 356 | |
Sebastian Bøe | d3a8fd4 | 2019-10-17 14:25:34 +0200 | [diff] [blame] | 357 | config MAKEFILE_EXPORTS |
| 358 | bool "Generate build metadata files named Makefile.exports" |
| 359 | help |
| 360 | Generates a file with build information that can be read by |
| 361 | third party Makefile-based build systems. |
| 362 | |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 363 | endmenu |
| 364 | endmenu |
| 365 | |
| 366 | |
| 367 | menu "Boot Options" |
| 368 | |
| 369 | config IS_BOOTLOADER |
| 370 | bool "Act as a bootloader" |
| 371 | depends on XIP |
| 372 | depends on ARM |
| 373 | help |
| 374 | This option indicates that Zephyr will act as a bootloader to execute |
| 375 | a separate Zephyr image payload. |
| 376 | |
| 377 | config BOOTLOADER_SRAM_SIZE |
| 378 | int "SRAM reserved for bootloader" |
| 379 | default 16 |
| 380 | depends on !XIP || IS_BOOTLOADER |
Rajavardhan Gundi | e584b05 | 2018-12-14 16:55:43 +0530 | [diff] [blame] | 381 | depends on ARM || XTENSA |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 382 | help |
| 383 | This option specifies the amount of SRAM (measure in kB) reserved for |
| 384 | a bootloader image, when either: |
| 385 | - the Zephyr image itself is to act as the bootloader, or |
| 386 | - Zephyr is a !XIP image, which implicitly assumes existence of a |
| 387 | bootloader that loads the Zephyr !XIP image onto SRAM. |
| 388 | |
| 389 | config BOOTLOADER_MCUBOOT |
| 390 | bool "MCUboot bootloader support" |
Ulf Magnusson | 90b9eb3 | 2019-11-16 01:22:16 +0100 | [diff] [blame] | 391 | select USE_DT_CODE_PARTITION |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 392 | help |
| 393 | This option signifies that the target uses MCUboot as a bootloader, |
| 394 | or in other words that the image is to be chain-loaded by MCUboot. |
| 395 | This sets several required build system and Device Tree options in |
| 396 | order for the image generated to be bootable using the MCUboot open |
| 397 | source bootloader. Currently this includes: |
| 398 | |
| 399 | * Setting TEXT_SECTION_OFFSET to a default value that allows space |
| 400 | for the MCUboot image header |
| 401 | * Activating SW_VECTOR_RELAY on Cortex-M0 (or Armv8-M baseline) |
| 402 | targets with no built-in vector relocation mechanisms |
| 403 | * Including dts/common/mcuboot.overlay when building the Device |
| 404 | Tree in order to place and link the image at the slot0 offset |
| 405 | |
| 406 | config BOOTLOADER_ESP_IDF |
| 407 | bool "ESP-IDF bootloader support" |
| 408 | depends on SOC_ESP32 |
| 409 | help |
| 410 | This option will trigger the compilation of the ESP-IDF bootloader |
| 411 | inside the build folder. |
| 412 | At flash time, the bootloader will be flashed with the zephyr image |
| 413 | |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 414 | config BOOTLOADER_KEXEC |
| 415 | bool "Boot using Linux kexec() system call" |
| 416 | depends on X86 |
| 417 | help |
| 418 | This option signifies that Linux boots the kernel using kexec system call |
| 419 | and utility. This method is used to boot the kernel over the network. |
| 420 | |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 421 | config BOOTLOADER_CONTEXT_RESTORE |
| 422 | bool "Boot loader has context restore support" |
| 423 | default y |
Piotr Zięcik | 9cc63e0 | 2019-02-12 11:07:20 +0100 | [diff] [blame] | 424 | depends on SYS_POWER_DEEP_SLEEP_STATES && BOOTLOADER_CONTEXT_RESTORE_SUPPORTED |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 425 | help |
| 426 | This option signifies that the target has a bootloader |
| 427 | that restores CPU context upon resuming from deep sleep |
| 428 | power state. |
| 429 | |
| 430 | config REBOOT |
| 431 | bool "Reboot functionality" |
| 432 | select SYSTEM_CLOCK_DISABLE |
| 433 | help |
| 434 | Enable the sys_reboot() API. Enabling this can drag in other subsystems |
| 435 | needed to perform a "safe" reboot (e.g. SYSTEM_CLOCK_DISABLE, to stop the |
| 436 | system clock before issuing a reset). |
Andy Ross | fe04adf | 2019-02-27 11:53:18 -0800 | [diff] [blame] | 437 | |
| 438 | config MISRA_SANE |
| 439 | bool "MISRA standards compliance features" |
| 440 | help |
| 441 | Causes the source code to build in "MISRA" mode, which |
| 442 | disallows some otherwise-permitted features of the C |
| 443 | standard for safety reasons. Specifically variable length |
| 444 | arrays are not permitted (and gcc will enforce this). |
| 445 | |
Anas Nashif | 86ad37a | 2018-11-02 07:12:07 -0400 | [diff] [blame] | 446 | endmenu |
Carlo Caione | d048faa | 2019-12-17 17:13:47 +0000 | [diff] [blame] | 447 | |
| 448 | menu "Compatibility" |
| 449 | |
| 450 | config COMPAT_INCLUDES |
| 451 | bool "Suppress warnings when using header shims" |
| 452 | default y |
| 453 | help |
| 454 | Suppress any warnings from the pre-processor when including |
| 455 | deprecated header files. |
| 456 | |
| 457 | endmenu |