Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samples: fix bootloaders warnings #642

Merged
merged 2 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions samples/sid_end_device/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ config DFU_MULTI_IMAGE_PACKAGE_BUILD
config DFU_MULTI_IMAGE_PACKAGE_APP
default y

config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY
default y if BOARD_NRF52840DK_NRF52840 || BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_THINGY53_NRF5340_CPUAPP

if (BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_THINGY53_NRF5340_CPUAPP)

config MCUBOOT_UPDATEABLE_IMAGES
Expand Down Expand Up @@ -46,12 +49,15 @@ config DFU_MULTI_IMAGE_PACKAGE_NET

endif # (BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_THINGY53_NRF5340_CPUAPP)

config PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY
default y if BOARD_NRF52840DK_NRF52840 || BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_THINGY53_NRF5340_CPUAPP
if (BOARD_NRF54L15DK_NRF54L15_CPUAPP || BOARD_NRF54L15DK_NRF54L15_CPUAPP_NS)

# TODO: NCSDK-28931: Cannot use fprotect twice, so disable it in MCUboot to
# test protecting factory data. It can be enabled while there is a support
# for protection more than one region.
config MCUBOOT_FPROTECT_ALLOW_COMBINED_REGIONS
default n

# override the mcuboot pad size, because it is not set globally for NS build.
config PM_MCUBOOT_PAD
default 0x800
endif # (BOARD_NRF54L15DK_NRF54L15_CPUAPP || BOARD_NRF54L15DK_NRF54L15_CPUAPP_NS)

endif # BOOTLOADER_MCUBOOT

Expand Down
10 changes: 7 additions & 3 deletions samples/sid_end_device/sysbuild/ipc_radio/prj.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#
# Copyright (c) 2024 Nordic Semiconductor ASA
# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# RAM usage configuration
CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
Expand All @@ -17,6 +19,7 @@ CONFIG_BT_MAX_CONN=1
CONFIG_BT_BUF_ACL_RX_SIZE=502
CONFIG_BT_BUF_ACL_TX_SIZE=251
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
CONFIG_BT_CTLR_PHY_2M=n

# IPC
CONFIG_IPC_SERVICE=y
Expand All @@ -25,10 +28,11 @@ CONFIG_MBOX=y
# Debug
CONFIG_LOG=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_ASSERT=y
CONFIG_DEBUG_INFO=y
CONFIG_EXCEPTION_STACK_TRACE=y
CONFIG_RESET_ON_FATAL_ERROR=y
CONFIG_RESET_ON_FATAL_ERROR=n
CONFIG_REBOOT=n

# ipc_radio
CONFIG_IPC_RADIO_BT=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@
CONFIG_NORDIC_QSPI_NOR=y
CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=16

# Disable the Flash Patch and Breakpoint (FPB) feature
# to increase the security of the device.
CONFIG_DISABLE_FLASH_PATCH=y
CONFIG_REBOOT=y
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,4 @@ CONFIG_FLASH_SIMULATOR=y
CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y
CONFIG_FLASH_SIMULATOR_STATS=n

# Enable custom command to erase settings partition.
CONFIG_ENABLE_MGMT_PERUSER=y
CONFIG_ZCBOR=y
CONFIG_BOOT_MGMT_CUSTOM_STORAGE_ERASE=y
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#
# Copyright (c) 2021 Nordic Semiconductor ASA
# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# TODO: NCSDK-28931: Cannot use fprotect twice, so disable it in MCUboot to
# test protecting Matter factory data. It can be enabled while there is a support
# test protecting factory data. It can be enabled while there is a support
# for protection more than one region.
CONFIG_FPROTECT=n

# TODO: Workaround, disable memory guard to avoid false faults in application after boot
CONFIG_HW_STACK_PROTECTION=n

Expand All @@ -20,38 +21,9 @@ CONFIG_TICKLESS_KERNEL=y

CONFIG_BOOT_WATCHDOG_FEED=n

# Disable all debug features
CONFIG_USE_SEGGER_RTT=n
CONFIG_SHELL=n
CONFIG_OPENTHREAD_SHELL=n
CONFIG_CONSOLE=n
CONFIG_UART_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_LOG=n
CONFIG_LOG_MODE_MINIMAL=n
CONFIG_ASSERT_VERBOSE=n
CONFIG_ASSERT_NO_FILE_INFO=y
CONFIG_PRINTK=n
CONFIG_PRINTK_SYNC=n
CONFIG_THREAD_NAME=n
CONFIG_BOOT_BANNER=n
CONFIG_NCS_BOOT_BANNER=n

CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y

# Ensure that the qspi driver is disabled by default
CONFIG_GPIO=n
CONFIG_SPI=n
CONFIG_SPI_NOR=n
CONFIG_NORDIC_QSPI_NOR=n
CONFIG_MULTITHREADING=n

# Others
CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y


# Workaroud: fprotect and watchdog feed
# are not supported in NCS v2.6.0
CONFIG_FPROTECT=n
CONFIG_BOOT_WATCHDOG_FEED=n
CONFIG_POWEROFF=y

This file was deleted.

This file was deleted.

14 changes: 7 additions & 7 deletions samples/sid_end_device/sysbuild/mcuboot/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

CONFIG_MAIN_STACK_SIZE=10240

Expand All @@ -12,26 +13,25 @@ CONFIG_PM=n
CONFIG_FLASH=y
CONFIG_FPROTECT=y

CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h"

CONFIG_BOOT_MAX_IMG_SECTORS=256

# Use minimal C library instead of the Picolib
CONFIG_MINIMAL_LIBC=y

# Disable logs
CONFIG_NCS_BOOT_BANNER=n
CONFIG_BOOT_BANNER=n
CONFIG_CONSOLE=n
CONFIG_NCS_BOOT_BANNER=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_CONSOLE_HANDLER=n
CONFIG_USE_SEGGER_RTT=n
CONFIG_LOG=n
CONFIG_LOG_MODE_MINIMAL=n
CONFIG_PRINTK=n
CONFIG_ASSERT=n

# Bootloader size optimization
CONFIG_CONSOLE=n
CONFIG_CONSOLE_HANDLER=n
CONFIG_UART_CONSOLE=n
CONFIG_USE_SEGGER_RTT=n
CONFIG_RESET_ON_FATAL_ERROR=n
CONFIG_GPIO=n
CONFIG_TIMESLICING=n
Expand Down