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