# ZephCore - Main Project Configuration # # This file contains ONLY console/logging setup and includes common configs. # Platform-specific configs are in boards/common/_common.conf # Board-specific configs (pins only) are in boards/.conf # # Include hierarchy: # prj.conf (this file - logging/console) # → boards/common/zephcore_common.conf (app features, crypto, sensors) # → boards/common/_common.conf (BLE, flash, storage) # → boards/.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