mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-09-17 01:24:21 +00:00
Production (LOG=n, ASSERT=n, RTT=n, reboot-on-fatal) is now the prj.conf default; debug.conf is the opt-in bundle. Removed prod.conf and the logging.conf auto-include; relocated RTT/ASSERT out of the always-on platform confs so they no longer override the prod defaults. Add CONFIG_ZEPHCORE_COMPANION_USB so the USB CDC companion transport compiles independently of logging (default-y on USB-capable companions, opt-in on ESP32-S3 via esp32s3_usb.conf). Gate all USB sites behind one ZEPHCORE_USB_STACK macro. Rework BLE/USB interface arbitration to first-come-first-served: neither transport evicts a live session. Make active_iface mutation thread-safe (mutex + atomic claim) across the BLE callback thread and USB workqueue. Share the ESP32-S3 USB OTG / console DTS via common dtsi includes; enable uart0 (GPIO43/44) on station_g2 and xiao so the console reroute works.
41 lines
1.4 KiB
Plaintext
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_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_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
|