mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-09-02 12:13:44 +00:00
96 lines
3.6 KiB
Plaintext
96 lines
3.6 KiB
Plaintext
# ZephCore Native Linux Platform Configuration
|
|
#
|
|
# Auto-applied by zephcore/CMakeLists.txt when BOARD matches native_sim.
|
|
# Runs the full ZephCore stack as a native Linux process via Zephyr's
|
|
# native_sim board, talking to real SPI/GPIO via /dev/spidev + libgpiod v2.
|
|
#
|
|
# See LINUX_NATIVE.md for prerequisites and per-device wiring.
|
|
|
|
# ========== Disable BLE — Linux uses TCP transport instead ==========
|
|
# zephcore_common.conf turns CONFIG_BT=y; override here. None of the BT
|
|
# child Kconfigs survive without CONFIG_BT, so this single line is enough.
|
|
CONFIG_BT=n
|
|
CONFIG_BT_SETTINGS=n
|
|
CONFIG_BT_DIS=n
|
|
CONFIG_BT_PERIPHERAL=n
|
|
CONFIG_BT_SMP=n
|
|
|
|
# ========== Disable Zephyr's emulated SPI/GPIO from native_sim ==========
|
|
# native_sim's base DTS has emulated SPI/GPIO controllers; we replace them
|
|
# with our native_linux drivers via the board.overlay paired with this conf.
|
|
CONFIG_GPIO_EMUL=n
|
|
CONFIG_SPI_EMUL=n
|
|
|
|
# ========== Enable our native Linux drivers ==========
|
|
CONFIG_SPI=y
|
|
CONFIG_SPI_NATIVE_LINUX=y
|
|
CONFIG_GPIO=y
|
|
CONFIG_GPIO_NATIVE_LINUX=y
|
|
|
|
# ========== TCP companion transport ==========
|
|
CONFIG_ZEPHCORE_TRANSPORT_TCP=y
|
|
CONFIG_ZEPHCORE_LINUX_TCP_PORT=5000
|
|
|
|
# NSOS: native_sim socket offload — Zephyr zsock_* calls go straight to
|
|
# host Linux sockets. No native IP stack, no TAP device, no root needed.
|
|
# Matches Zephyr's samples/net/sockets/echo_server/overlay-nsos.conf.
|
|
CONFIG_NETWORKING=y
|
|
CONFIG_ETH_NATIVE_TAP=n
|
|
CONFIG_NET_DRIVERS=y
|
|
CONFIG_NET_SOCKETS=y
|
|
CONFIG_NET_SOCKETS_OFFLOAD=y
|
|
CONFIG_NET_NATIVE_OFFLOADED_SOCKETS=y
|
|
|
|
# ========== Storage — back LittleFS with a host file ==========
|
|
# native_sim has zephyr,sim-flash that gives us a flash-emulated backing
|
|
# store. We can stay on LittleFS so the existing ZephyrDataStore code
|
|
# works unchanged. Disable bond settings (BT off).
|
|
CONFIG_SETTINGS_FILE_PATH="/lfs/settings"
|
|
|
|
# ========== Repeater CLI over native PTY ==========
|
|
# native_sim's default uart0 is zephyr,native-pty-uart — at boot Zephyr
|
|
# prints "UART_0 connected to pseudotty: /dev/pts/N". screen /dev/pts/N
|
|
# to attach. Remote: socat /dev/pts/N TCP-LISTEN:6000,fork
|
|
CONFIG_UART_NATIVE_PTY=y
|
|
CONFIG_UART_INTERRUPT_DRIVEN=y
|
|
|
|
# ========== Output binary name ==========
|
|
# zephyr.exe → zephcore_native_linux.exe (the .exe suffix is native_sim
|
|
# convention; the file is a normal Linux ELF executable).
|
|
CONFIG_KERNEL_BIN_NAME="zephcore_native_linux"
|
|
|
|
# ========== Heap ==========
|
|
# Larger than MCU baseline — we have host RAM to spare and the SPI
|
|
# transceive path allocates flat scatter/gather buffers per call.
|
|
CONFIG_HEAP_MEM_POOL_SIZE=131072
|
|
|
|
# ========== Disable MCU-specific options that don't apply ==========
|
|
CONFIG_USB_DEVICE_STACK_NEXT=n
|
|
CONFIG_USB_DEVICE_STACK=n
|
|
# native_sim provides hwinfo / reboot / poweroff stubs; keep them on so
|
|
# ZephyrBoard.cpp and main_companion's reset-cause code link cleanly.
|
|
CONFIG_HWINFO=y
|
|
CONFIG_REBOOT=y
|
|
CONFIG_POWEROFF=y
|
|
# native_sim has no ADC hardware; battery readback is N/A.
|
|
CONFIG_ADC=n
|
|
|
|
# Headless SBC: no display, no buzzer, no buttons.
|
|
# Keep UI_BUTTONS=y so the helpers/ui/ include path is added (CompanionMesh
|
|
# unconditionally includes ui_task.h). The display/buzzer/LED hardware
|
|
# isn't present so the actual UI code paths are no-ops at runtime.
|
|
CONFIG_ZEPHCORE_UI_DISPLAY=n
|
|
CONFIG_ZEPHCORE_UI_BUTTONS=y
|
|
CONFIG_ZEPHCORE_UI_BUZZER=n
|
|
CONFIG_ZEPHCORE_UI_DESIGN_BUTTON=n
|
|
CONFIG_ZEPHCORE_UI_DESIGN_JOYSTICK=n
|
|
CONFIG_ZEPHCORE_UI_MULTI_TAP=n
|
|
|
|
# Disable I2C + sensors (no I2C bus on a headless SBC, and oled_power.c
|
|
# references native_sim's i2c0 emul controller which has no real driver).
|
|
CONFIG_I2C=n
|
|
CONFIG_SENSOR=n
|
|
CONFIG_GNSS=n
|
|
CONFIG_MODEM_MODULES=n
|
|
# Crypto: native_sim runs PSA in software, same as MCU.
|