Commit f84cc4b3 authored by Marti Bolivar's avatar Marti Bolivar Committed by Andrzej Puzdrowski
Browse files

zephyr: enable MULTITHREADING by default except on nRF

CONFIG_MULTITHREADING is generally assumed to be y by the zephyr
kernel, even though that's not reflected in the Kconfig. For example,
semaphores depend on it being y, but CMake will still build sem.c even
if it's n.

The sensible default for this option is thus y.

However, it's a size advantage to disable it if the platform drivers
are all aware of this option, such as nRF.

Let's re-work our use of this option to keep it disabled when we know
it's safe, but enable it by default so more platforms can be expected
to work out of the box.

Signed-off-by: default avatarMarti Bolivar <marti.bolivar@nordicsemi.no>
parent f2a8b78c
Loading
Loading
Loading
Loading
+11 −0
Changes for boot/zephyr/Kconfig: 11 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -271,4 +271,15 @@ config MCUBOOT_DEVICE_CPU_CORTEX_M0

comment "Zephyr configuration options"

# Disabling MULTITHREADING provides a code size advantage, but
# it requires peripheral drivers (particularly a flash driver)
# that works properly with the option enabled.
#
# If you know for sure that your hardware will work, you can default
# it to n here. Otherwise, having it on by default makes the most
# hardware work.
config MULTITHREADING
	default n if SOC_FAMILY_NRF
	default y

source "$ZEPHYR_BASE/Kconfig.zephyr"
+0 −1
Changes for boot/zephyr/boards/intel_s1000_crb.conf: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
CONFIG_DEBUG=n
CONFIG_I2C=n
CONFIG_BOOT_MAX_IMG_SECTORS=512
CONFIG_MULTITHREADING=y
CONFIG_BOOT_WAIT_FOR_USB_DFU=y
+0 −1
Changes for boot/zephyr/boards/nrf52_minimal_footprint.conf: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52832_QFAA=y
CONFIG_ARM=y
CONFIG_ARM_MPU=n
# CONFIG_MULTITHREADING is not set
CONFIG_MAIN_STACK_SIZE=10240
CONFIG_THREAD_STACK_INFO=n
# CONFIG_TICKLESS_KERNEL is not set
+0 −2
Changes for boot/zephyr/prj.conf: 0 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -36,8 +36,6 @@ CONFIG_BOOT_SIGNATURE_KEY_FILE="root-rsa-2048.pem"

CONFIG_FLASH=y

CONFIG_MULTITHREADING=n

### Various Zephyr boards enable features that we don't want.
# CONFIG_BT is not set
# CONFIG_BT_CTLR is not set