diff --git a/zephcore/Kconfig b/zephcore/Kconfig index 3509ae9..b767cb6 100644 --- a/zephcore/Kconfig +++ b/zephcore/Kconfig @@ -52,6 +52,27 @@ config GNSS_LUATOS_AIR530Z_NAV_MODE default ZEPHCORE_GPS_NAV_MODE depends on GNSS_LUATOS_AIR530Z +# Defaults rather than conf-file assignments for symbols that exist only on some +# builds: an assignment to an invisible symbol is a Kconfig warning on every +# other build. Ahead of Kconfig.zephyr so they beat the upstream defaults. Each +# repeats the upstream `depends on`: a definition without it would make the +# symbol exist on every build (Kconfig ORs the dependencies of all definitions). +# USB device stack at WRN when logging is on: INF logs every CH9 control transfer. +choice USBD_LOG_LEVEL_CHOICE + default USBD_LOG_LEVEL_WRN +endchoice + +# QSPI NOR boards: 4 KB sector erase instead of the 64 KB block default, which +# suits LittleFS on small partitions. +config NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE + depends on NORDIC_QSPI_NOR + default 4096 + +# Power-off wherever the SoC supports it (not on MG24). +config POWEROFF + depends on HAS_POWEROFF + default y + source "$(ZEPHYR_BASE)/Kconfig.zephyr" # DT-driven PSRAM auto-enable for ESP32 boards (see Kconfig.psram). diff --git a/zephcore/boards/common/nrf52_common.conf b/zephcore/boards/common/nrf52_common.conf index 4a4ea51..d58b622 100644 --- a/zephcore/boards/common/nrf52_common.conf +++ b/zephcore/boards/common/nrf52_common.conf @@ -49,11 +49,7 @@ CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE=y # QSPI flash — auto-detected from devicetree. Boards with a nordic,qspi-nor # node get the driver automatically (Zephyr default y when DT node exists). # Boards without QSPI in DTS stay disabled — no override needed either way. -# -# Page size: 4096 (sector erase) instead of Zephyr default 65536 (block erase). -# LittleFS works much better with 4KB erase granularity on small partitions. -# Silently ignored when QSPI is not present (Kconfig guard: if NORDIC_QSPI_NOR). -CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096 +# Page size 4096 instead of the 64 KB block default: zephcore/Kconfig. # ========== Debug ========== # SEGGER RTT and CONFIG_ASSERT are debug-only and live in boards/common/debug.conf diff --git a/zephcore/boards/common/zephcore_common.conf b/zephcore/boards/common/zephcore_common.conf index fd5e03f..426f388 100644 --- a/zephcore/boards/common/zephcore_common.conf +++ b/zephcore/boards/common/zephcore_common.conf @@ -221,12 +221,8 @@ CONFIG_INPUT_MODE_SYNCHRONOUS=y # ========== Logging ========== # Log backend tuning lives in boards/common/debug.conf (opt-in). -# Silence USB CH9 control-transfer spam (dozens of INF lines during enumeration). -# WRN keeps real USB errors visible. -CONFIG_USBD_LOG_LEVEL_WRN=y - # ========== Power Management ========== -CONFIG_POWEROFF=y +# CONFIG_POWEROFF: default y where the SoC has it (zephcore/Kconfig). # ========== LoRa Power Saving ========== # RX duty cycle defaults are in Kconfig: diff --git a/zephcore/boards/nrf52840/lilygo_techo/board.conf b/zephcore/boards/nrf52840/lilygo_techo/board.conf index 682a971..179fe32 100644 --- a/zephcore/boards/nrf52840/lilygo_techo/board.conf +++ b/zephcore/boards/nrf52840/lilygo_techo/board.conf @@ -26,9 +26,6 @@ CONFIG_ZEPHCORE_SD_FWID=0x00B6 # Default heap (2048) is sized for SSD1306 128x64 (1024 bytes). CONFIG_HEAP_MEM_POOL_SIZE=6144 -# Shrink RTT buffer to free RAM (4096 → 1024, saves 3KB). -CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=1024 - # ========== Display cosmetics ========== # 200x200 SSD1681 — the default 6x8 font is too small to read comfortably. # Switch to the smallest Zephyr built-in CFB font >= 16 px (typically 10x16). diff --git a/zephcore/boards/nrf52840/thinknode_m1/board.conf b/zephcore/boards/nrf52840/thinknode_m1/board.conf index 6c0771b..7fcc4f7 100644 --- a/zephcore/boards/nrf52840/thinknode_m1/board.conf +++ b/zephcore/boards/nrf52840/thinknode_m1/board.conf @@ -22,10 +22,6 @@ CONFIG_ZEPHCORE_SD_FWID=0x00B6 # Default heap (2048) is sized for SSD1306 128x64 (1024 bytes). CONFIG_HEAP_MEM_POOL_SIZE=6144 -# Shrink RTT buffer to free RAM (4096 → 1024, saves 3KB). -# Only used during J-Link debugging, 1KB is Zephyr's default. -CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=1024 - # ========== UI / display ========== # 200x200 SSD1681 — the default 6x8 font is too small to read comfortably. # Switch to the smallest Zephyr built-in CFB font >= 16 px (typically 10x16). diff --git a/zephcore/helpers/ui/ui_mesh_actions.h b/zephcore/helpers/ui/ui_mesh_actions.h index fa3ba14..f855b18 100644 --- a/zephcore/helpers/ui/ui_mesh_actions.h +++ b/zephcore/helpers/ui/ui_mesh_actions.h @@ -14,6 +14,8 @@ #include #include +struct k_event; + #ifdef __cplusplus extern "C" { #endif diff --git a/zephcore/sysbuild/mcuboot.conf b/zephcore/sysbuild/mcuboot.conf index 7c39c16..b5e39e5 100644 --- a/zephcore/sysbuild/mcuboot.conf +++ b/zephcore/sysbuild/mcuboot.conf @@ -33,8 +33,3 @@ CONFIG_POWER_DOMAIN=n # auto-propagation logic in sysbuild/CMakeLists.txt which appends # mcuboot_flashsize_mb.conf when the app's board.conf sets a larger size. CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y - -# ESP32 HAL's mcuboot_config.h is patched (patches/modules/hal/espressif/...) -# to respect Zephyr Kconfig: mbedTLS detection, AUTO sector count, slot0 validation. -CONFIG_BOOT_RSA_PSA=y -CONFIG_BOOT_RSA_TF_PSA_CRYPTO_LEGACY=n