mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-09-02 17:43:46 +00:00
51 lines
2.2 KiB
Plaintext
51 lines
2.2 KiB
Plaintext
# ZephCore - Main Project Configuration
|
|
#
|
|
# This file contains ONLY console/logging setup and includes common configs.
|
|
# Platform-specific configs are in boards/common/<platform>_common.conf
|
|
# Board-specific configs (pins only) are in boards/<board>.conf
|
|
#
|
|
# Include hierarchy:
|
|
# prj.conf (this file - logging/console)
|
|
# → boards/common/zephcore_common.conf (app features, crypto, sensors)
|
|
# → boards/common/<platform>_common.conf (BLE, flash, storage)
|
|
# → boards/<board>.conf (pins, board-specific features)
|
|
|
|
# ========== Console & Logging ==========
|
|
CONFIG_CONSOLE=y
|
|
CONFIG_UART_CONSOLE=y
|
|
CONFIG_UART_INTERRUPT_DRIVEN=y
|
|
CONFIG_RING_BUFFER=y
|
|
|
|
# Production by default — add boards/common/debug.conf to enable logging.
|
|
CONFIG_LOG=n
|
|
CONFIG_ASSERT=n
|
|
CONFIG_USE_SEGGER_RTT=n
|
|
CONFIG_THREAD_NAME=n
|
|
|
|
# Reboot on any fatal error (stack overflow, hard fault, etc.) instead of
|
|
# spinning forever. Asserts are disabled so they won't reach here, but all
|
|
# other fatal paths (k_panic, CPU exceptions) still get a clean reboot.
|
|
CONFIG_ZEPHCORE_RESET_ON_FATAL_ERROR=y
|
|
|
|
# ========== Power Management ==========
|
|
# Device PM only — CONFIG_PM (system PM) stays off. nRF52/nRF54L have no
|
|
# devicetree power-states in Zephyr 4.4 (WFI in the idle thread is already
|
|
# the low-power System ON state); ESP32/STM32WL do have states but need
|
|
# their own bring-up (BLE/WiFi/radio wake paths) before CONFIG_PM can go on.
|
|
#
|
|
# CONFIG_PM_DEVICE alone suspends nothing automatically: PM actions run only
|
|
# when we call pm_device_action_run() (always from the main thread). The
|
|
# system-managed auto-suspend (PM_DEVICE_SYSTEM_MANAGED) is compiled only
|
|
# under CONFIG_PM; it is pinned off here so a platform that later enables
|
|
# CONFIG_PM can't silently start suspending devices from the idle thread.
|
|
#
|
|
# Why device PM is on:
|
|
# - gnss-nmea-generic inits pm_device_init_suspended() under CONFIG_PM_DEVICE
|
|
# and never opens its modem pipe until resumed; ZephyrGPSManager resumes it
|
|
# once at boot (this was the old "PM broke GPS" trap).
|
|
# - GPS standby suspends the GNSS UARTE — an armed UARTE RX holds HFCLK
|
|
# (~0.5-1 mA continuous on nRF52840) even with the GPS module powered off.
|
|
# See adapters/gps/ZephyrGPSManager.cpp for the full strategy.
|
|
CONFIG_PM_DEVICE=y
|
|
CONFIG_PM_DEVICE_SYSTEM_MANAGED=n
|