mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-09-01 21:08:19 +00:00
unify conf + clean up prod builds
This commit is contained in:
@@ -22,7 +22,9 @@
|
||||
#include <zephyr/logging/log.h>
|
||||
#include <zephyr/drivers/gpio.h>
|
||||
#include <zephyr/drivers/uart.h>
|
||||
#if defined(CONFIG_SOC_NRF52840)
|
||||
#include <nrfx.h>
|
||||
#endif
|
||||
|
||||
LOG_MODULE_REGISTER(zephcore_gps, CONFIG_ZEPHCORE_GPS_LOG_LEVEL);
|
||||
|
||||
|
||||
@@ -15,6 +15,11 @@ CONFIG_BT_TX_PROCESSOR_STACK_SIZE=2048
|
||||
# ESP32 BLE stack requires larger heap (override zephcore_common 2KB default)
|
||||
CONFIG_HEAP_MEM_POOL_SIZE=32768
|
||||
|
||||
# ========== Flash ==========
|
||||
# 4MB is standard for XIAO/LilyGo RISC-V boards.
|
||||
# Station G2 (16MB) overrides in board.conf.
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
||||
# ========== Debug ==========
|
||||
# CONFIG_ASSERT disabled for ESP32: Espressif's closed-source BLE controller
|
||||
# blob leaves IRQs in a state that triggers false "Context switching while
|
||||
|
||||
@@ -22,6 +22,10 @@ CONFIG_BT_CTLR_TX_PWR_PLUS_4=y
|
||||
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
|
||||
|
||||
# ========== Flash: nRF52-specific ==========
|
||||
# QSPI flash — disabled by default (safer — avoids hang if chip missing).
|
||||
# Boards with QSPI (Wio Tracker L1) override in board.conf.
|
||||
CONFIG_NORDIC_QSPI_NOR=n
|
||||
|
||||
# Recover from corrupted NVS sectors (nRF52 flash can develop bad regions)
|
||||
CONFIG_NVS_INIT_BAD_MEMORY_REGION=y
|
||||
|
||||
|
||||
@@ -11,6 +11,12 @@ CONFIG_LOG=n
|
||||
# Disable asserts (saves flash, removes CMake warning)
|
||||
CONFIG_ASSERT=n
|
||||
|
||||
# Disable SEGGER RTT (saves ~4KB RAM ring buffer + init code)
|
||||
CONFIG_USE_SEGGER_RTT=n
|
||||
|
||||
# Disable thread name strings (saves flash — only useful for debug)
|
||||
CONFIG_THREAD_NAME=n
|
||||
|
||||
# Max contacts for production (App protocol limit: 510, encoded as uint8 * 2, so you can set it higher, but the current app can't display it or work with it)
|
||||
# Check board configs for overrides — too low RAM can freeze the device.
|
||||
CONFIG_ZEPHCORE_MAX_CONTACTS=510
|
||||
|
||||
@@ -15,8 +15,3 @@ CONFIG_ZEPHCORE_BOARD_NAME="LilyGo TLoRa C6"
|
||||
# Device Information Service model name
|
||||
CONFIG_BT_DIS_MODEL_NUMBER_STR="LilyGo TLoRa C6"
|
||||
|
||||
# Radio type
|
||||
CONFIG_ZEPHCORE_RADIO_NATIVE=y
|
||||
|
||||
# Flash size (T3-C6 has 4MB, override Zephyr default)
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
||||
@@ -14,9 +14,6 @@
|
||||
CONFIG_ZEPHCORE_BOARD_NAME="Station G2"
|
||||
CONFIG_BT_DIS_MODEL_NUMBER_STR="BQ Station G2"
|
||||
|
||||
# Radio type — SX1262 via Zephyr native LoRa driver
|
||||
CONFIG_ZEPHCORE_RADIO_NATIVE=y
|
||||
|
||||
# TX power limits — Station G2 has ~20dB external PA.
|
||||
# Default 15 dBm → ~35 dBm output (P1dB point).
|
||||
# Cap at 19 dBm → ~39 dBm absolute max (matches Arduino MAX_LORA_TX_POWER).
|
||||
|
||||
@@ -53,11 +53,7 @@
|
||||
dio3-tcxo-voltage = <2>;
|
||||
tcxo-power-startup-delay-ms = <10>;
|
||||
|
||||
/*
|
||||
* RX boosted mode DISABLED — Station G2 wiki warns against it:
|
||||
* "Impact of LoRa node dense areas/high noise environments on RF performance"
|
||||
* https://wiki.uniteng.com/en/meshtastic/station-g2
|
||||
*/
|
||||
rx-boosted;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -15,11 +15,5 @@ CONFIG_ZEPHCORE_BOARD_NAME="XIAO ESP32-C3"
|
||||
# Device Information Service model name
|
||||
CONFIG_BT_DIS_MODEL_NUMBER_STR="XIAO ESP32-C3"
|
||||
|
||||
# Radio type
|
||||
CONFIG_ZEPHCORE_RADIO_NATIVE=y
|
||||
|
||||
# Flash size (XIAO ESP32-C3 has 4MB, override Zephyr default 2MB)
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
||||
# RAM-limited: override prod.conf MAX_CONTACTS (800 overflows DRAM)
|
||||
CONFIG_ZEPHCORE_MAX_CONTACTS=300
|
||||
|
||||
@@ -15,8 +15,3 @@ CONFIG_ZEPHCORE_BOARD_NAME="XIAO ESP32-C6"
|
||||
# Device Information Service model name
|
||||
CONFIG_BT_DIS_MODEL_NUMBER_STR="XIAO ESP32-C6"
|
||||
|
||||
# Radio type
|
||||
CONFIG_ZEPHCORE_RADIO_NATIVE=y
|
||||
|
||||
# Flash size (XIAO ESP32-C6 has 4MB, override Zephyr default 2MB)
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
||||
@@ -30,30 +30,21 @@ CONFIG_ZEPHCORE_BOARD_NAME="My Board"
|
||||
# BLE Device Information Service model name (shown in phone settings)
|
||||
CONFIG_BT_DIS_MODEL_NUMBER_STR="My Board v1"
|
||||
|
||||
# ========== REQUIRED: Radio Type ==========
|
||||
# Pick ONE based on your LoRa chip.
|
||||
CONFIG_ZEPHCORE_RADIO_NATIVE=y # Zephyr native LoRa driver (SX126x, SX127x, LLCC68, STM32WL)
|
||||
# CONFIG_ZEPHCORE_RADIO_LR1110=y # Semtech LR11xx custom driver (LR1110, LR1120, LR1121)
|
||||
|
||||
# ========== OPTIONAL: SPI for LoRa ==========
|
||||
# Only needed if LoRa chip is NOT on the Zephyr lora driver (i.e. LR11xx).
|
||||
# Native driver radios use Zephyr's built-in lora driver and do NOT need this.
|
||||
# CONFIG_SPI=y
|
||||
# ========== Radio Type (auto-selected) ==========
|
||||
# Default: RADIO_NATIVE (SX126x, SX127x, LLCC68, STM32WL) — no setting needed.
|
||||
# Override ONLY for LR11xx boards:
|
||||
# CONFIG_ZEPHCORE_RADIO_LR1110=y # Semtech LR11xx custom driver
|
||||
# CONFIG_SPI=y # LR11xx needs SPI (native driver doesn't)
|
||||
|
||||
# ========== OPTIONAL: QSPI External Flash (nRF52840 only) ==========
|
||||
# nrf52_common.conf defaults QSPI to =n (safer — avoids hang if chip missing).
|
||||
# Uncomment if your board has QSPI flash for expanded storage.
|
||||
# This gives 100 advert blob slots instead of 20.
|
||||
# Only available on nRF52840 — other MCUs don't have QSPI peripheral.
|
||||
#
|
||||
# WARNING: If your board does NOT have a QSPI flash chip, you MUST leave
|
||||
# this disabled (=n) AND disable &qspi in your overlay. The Nordic QSPI
|
||||
# driver hangs forever at boot (k_sem_take K_FOREVER) if no chip responds,
|
||||
# bricking the device with no USB/BLE/logs. The DataStore code handles
|
||||
# missing QSPI gracefully — the driver does not.
|
||||
#
|
||||
# Also add &qspi { status = "disabled"; }; in your overlay and do NOT
|
||||
# include qspi-ext.dtsi. See boards/nrf52840/rak4631/ for an example.
|
||||
CONFIG_NORDIC_QSPI_NOR=n
|
||||
# WARNING: If your board does NOT have a QSPI flash chip, the Nordic QSPI
|
||||
# driver hangs forever at boot (k_sem_take K_FOREVER). Disable &qspi in
|
||||
# your overlay. See boards/nrf52840/rak4631/ for an example.
|
||||
# CONFIG_NORDIC_QSPI_NOR=y
|
||||
# CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
|
||||
|
||||
# ========== OPTIONAL: Display ==========
|
||||
# Display subsystem is enabled universally in zephcore_common.conf.
|
||||
@@ -120,7 +111,8 @@ CONFIG_NORDIC_QSPI_NOR=n
|
||||
# Build with: west build -b <board>/nrf54l15/cpuapp zephcore --no-sysbuild
|
||||
#
|
||||
# --- ESP32 ---
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y # If your board has 4MB flash (default 2MB)
|
||||
# esp32_common.conf defaults to 4MB flash. Override only for boards with more:
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y # Station G2 (16MB flash)
|
||||
|
||||
# ========== OPTIONAL: Max Contacts Override ==========
|
||||
# prod.conf sets MAX_CONTACTS=800 (sized for nRF52840's 256KB SRAM).
|
||||
|
||||
@@ -8,8 +8,5 @@ CONFIG_ZEPHCORE_BOARD_NAME="XIAO MG24"
|
||||
# Device Information Service model name
|
||||
CONFIG_BT_DIS_MODEL_NUMBER_STR="XIAO MG24"
|
||||
|
||||
# Radio type
|
||||
CONFIG_ZEPHCORE_RADIO_NATIVE=y
|
||||
|
||||
# RAM-limited: Silabs BLE blob needs 32KB heap, override prod.conf MAX_CONTACTS
|
||||
CONFIG_ZEPHCORE_MAX_CONTACTS=650
|
||||
|
||||
@@ -21,5 +21,3 @@ CONFIG_BT_DIS_MODEL_NUMBER_STR="Ikoka Nano 30dBm"
|
||||
# SoftDevice firmware ID (XIAO nRF52840 uses S140 v7.3.0)
|
||||
CONFIG_ZEPHCORE_SD_FWID=0x0123
|
||||
|
||||
# Radio type
|
||||
CONFIG_ZEPHCORE_RADIO_NATIVE=y
|
||||
|
||||
@@ -19,9 +19,3 @@ CONFIG_ZEPHCORE_BOARD_NAME="RAK 4631"
|
||||
# Device Information Service model name
|
||||
CONFIG_BT_DIS_MODEL_NUMBER_STR="RAK4631"
|
||||
|
||||
# Radio type
|
||||
CONFIG_ZEPHCORE_RADIO_NATIVE=y
|
||||
|
||||
# QSPI flash — disabled (RAK19003 Mini Base has no QSPI flash)
|
||||
# For base boards with QSPI (RAK19007, RAK5005-O), create a separate variant.
|
||||
CONFIG_NORDIC_QSPI_NOR=n
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
|
||||
&lora {
|
||||
dio1-gpios = <&gpio1 15 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
|
||||
rx-boosted;
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -15,10 +15,7 @@ CONFIG_ZEPHCORE_BOARD_NAME="Wio Tracker L1"
|
||||
# Device Information Service model name
|
||||
CONFIG_BT_DIS_MODEL_NUMBER_STR="Wio Tracker 1110"
|
||||
|
||||
# Radio type
|
||||
CONFIG_ZEPHCORE_RADIO_NATIVE=y
|
||||
|
||||
# QSPI flash present
|
||||
# QSPI flash present (overrides nrf52_common.conf default of =n)
|
||||
CONFIG_NORDIC_QSPI_NOR=y
|
||||
CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
|
||||
|
||||
|
||||
@@ -284,6 +284,7 @@
|
||||
dio3-tcxo-voltage = <SX126X_DIO3_TCXO_1V8>;
|
||||
tcxo-power-startup-delay-ms = <5>;
|
||||
spi-max-frequency = <8000000>;
|
||||
rx-boosted;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -7,8 +7,5 @@ CONFIG_ZEPHCORE_BOARD_NAME="XIAO nRF54L15"
|
||||
# Device Information Service model name
|
||||
CONFIG_BT_DIS_MODEL_NUMBER_STR="XIAO nRF54L15"
|
||||
|
||||
# Radio type
|
||||
CONFIG_ZEPHCORE_RADIO_NATIVE=y
|
||||
|
||||
# RAM-limited: FLPR core reserves 68KB, override prod.conf MAX_CONTACTS
|
||||
CONFIG_ZEPHCORE_MAX_CONTACTS=450
|
||||
|
||||
Reference in New Issue
Block a user