Files
ZephCore/zephcore/boards/common/debug.conf
T
liquidraver ff705b0d5d fix: unbreak the production (CONFIG_LOG=n) build
553b71c made production the default but broke configure+link:
- ZEPHCORE_COMPANION_USB sat inside the role choice (recursive dep)
- CONFIG_RESET_ON_FATAL_ERROR was an undefined, unimplemented symbol
- USB companion sources still gated on CONFIG_LOG, not ZEPHCORE_USB_STACK

Move the USB toggle out of the choice, add a real
ZEPHCORE_RESET_ON_FATAL_ERROR Kconfig + k_sys_fatal_error_handler that
cold-reboots, and match the CMake USB guard to ZEPHCORE_USB_STACK.
2026-05-31 15:36:10 +02:00

41 lines
1.4 KiB
Plaintext

# Debug Config — opt-in logging and diagnostics.
#
# Production is the default. Pass this conf to get the full debug experience:
#
# west build -b rak4631 zephcore --pristine -- \
# -DEXTRA_CONF_FILE="boards/common/debug.conf"
#
# # With repeater role:
# west build -b rak4631 zephcore --pristine -- \
# -DEXTRA_CONF_FILE="boards/common/repeater.conf;boards/common/debug.conf"
# ========== Core debug features ==========
CONFIG_LOG=y
CONFIG_ASSERT=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=4096
CONFIG_THREAD_NAME=y
# Halt-and-inspect on fatal faults instead of the production reboot-on-fatal
# (prj.conf sets CONFIG_ZEPHCORE_RESET_ON_FATAL_ERROR=y). A debugger needs the
# core stopped at the fault with a stack dump, not rebooted out from under it.
CONFIG_ZEPHCORE_RESET_ON_FATAL_ERROR=n
# ========== Log tuning ==========
# ZephCore BLE modules at INF level (connection lifecycle, pairing, TX/RX).
CONFIG_ZEPHCORE_BLE_LOG_LEVEL_INF=y
# Deferred logging — non-blocking so BLE/LoRa timing is not disturbed.
CONFIG_LOG_BUFFER_SIZE=8192
CONFIG_LOG_PROCESS_TRIGGER_THRESHOLD=1
CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=2048
# RTT backend only — no UART backend on nRF52.
# UART backend stalls on uart_poll_out() when the USB host disconnects;
# RTT DROP mode discards messages without blocking.
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_RTT_MODE_DROP=y
# Silence noisy subsystems
CONFIG_CFB_LOG_LEVEL_ERR=y