|
| 1 | +# |
| 2 | +# Copyright (c) 2025 Nordic Semiconductor ASA |
| 3 | +# |
| 4 | +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause |
| 5 | +# |
| 6 | + |
| 7 | +# ============================================================================== |
| 8 | +# Optimized minimal configuration for radio_loader |
| 9 | +# ============================================================================== |
| 10 | +# This loader only runs SYS_INIT(load_and_jump_to_firmware, EARLY, 0) which: |
| 11 | +# 1. Copies firmware from MRAM to TCM using memcpy() |
| 12 | +# 2. Jumps to the loaded firmware's reset handler |
| 13 | +# No Zephyr services, threading, or drivers are needed. |
| 14 | +# |
| 15 | +# Memory footprint target: < 4 KB |
| 16 | + |
| 17 | +# ============================================================================== |
| 18 | +# Power Management |
| 19 | +# ============================================================================== |
| 20 | +CONFIG_PM=n |
| 21 | +CONFIG_PM_DEVICE=n |
| 22 | + |
| 23 | +# ============================================================================== |
| 24 | +# Kernel - Threading Disabled |
| 25 | +# ============================================================================== |
| 26 | +# We never reach main() or start the scheduler, so disable all threading |
| 27 | +CONFIG_MULTITHREADING=n |
| 28 | +CONFIG_MAIN_STACK_SIZE=512 |
| 29 | +CONFIG_THREAD_STACK_INFO=n |
| 30 | + |
| 31 | +# Disable kernel features that require threading/scheduler |
| 32 | +CONFIG_EVENTS=n |
| 33 | +CONFIG_POLL=n |
| 34 | +CONFIG_TIMESLICING=n |
| 35 | + |
| 36 | +# ============================================================================== |
| 37 | +# Console, Debug, and Logging |
| 38 | +# ============================================================================== |
| 39 | +# No console output needed - loader jumps immediately to firmware |
| 40 | +CONFIG_CONSOLE=n |
| 41 | +CONFIG_UART_CONSOLE=n |
| 42 | +CONFIG_SERIAL=n |
| 43 | +CONFIG_PRINTK=n |
| 44 | +CONFIG_EARLY_CONSOLE=n |
| 45 | +CONFIG_LOG=n |
| 46 | + |
| 47 | +# Banners and debug features |
| 48 | +CONFIG_NCS_BOOT_BANNER=n |
| 49 | +CONFIG_BOOT_BANNER=n |
| 50 | +CONFIG_ERRNO=n |
| 51 | + |
| 52 | +# ============================================================================== |
| 53 | +# Device Drivers |
| 54 | +# ============================================================================== |
| 55 | +# No peripheral drivers needed - we only use memcpy and jump |
| 56 | +CONFIG_GPIO=n |
| 57 | +CONFIG_PINCTRL=n |
| 58 | +CONFIG_I2C=n |
| 59 | +CONFIG_SPI=n |
| 60 | +CONFIG_WATCHDOG=n |
| 61 | + |
| 62 | +# ============================================================================== |
| 63 | +# Interrupt Management |
| 64 | +# ============================================================================== |
| 65 | +CONFIG_DYNAMIC_INTERRUPTS=n |
| 66 | +CONFIG_IRQ_OFFLOAD=n |
| 67 | +CONFIG_GEN_IRQ_VECTOR_TABLE=n |
| 68 | +CONFIG_GEN_ISR_TABLES=n |
| 69 | +CONFIG_GEN_SW_ISR_TABLE=n |
| 70 | + |
| 71 | +# ============================================================================== |
| 72 | +# Hardware Protection |
| 73 | +# ============================================================================== |
| 74 | +CONFIG_HW_STACK_PROTECTION=n |
| 75 | +CONFIG_ARM_MPU=n |
| 76 | + |
| 77 | +# ============================================================================== |
| 78 | +# Security and Crypto |
| 79 | +# ============================================================================== |
| 80 | +# No crypto needed for simple memory copy operation |
| 81 | +CONFIG_NRF_SECURITY=n |
| 82 | +CONFIG_MBEDTLS_PSA_CRYPTO_C=n |
| 83 | +CONFIG_PSA_CRYPTO_DRIVER_OBERON=n |
| 84 | +CONFIG_PSA_CRYPTO=n |
| 85 | +CONFIG_PSA_SSF_CRYPTO_CLIENT=n |
| 86 | + |
| 87 | +# ============================================================================== |
| 88 | +# Memory Optimization |
| 89 | +# ============================================================================== |
| 90 | +CONFIG_HEAP_MEM_POOL_SIZE=0 |
| 91 | +CONFIG_SYS_HEAP_RUNTIME_STATS=n |
| 92 | + |
| 93 | +# Use nano printf for minimal footprint (only used if PRINTK somehow gets enabled) |
| 94 | +CONFIG_CBPRINTF_NANO=y |
0 commit comments