# OpenPuck Zephyr configuration. # # The RADIO peripheral is driven bare-metal (reverse-engineered SC2 protocol), # so NO Zephyr radio stack may claim it. CONFIG_BT=n CONFIG_IEEE802154=n CONFIG_NRF_802154_RADIO_DRIVER=n # C++ (the ported modes/protocol are C++). CONFIG_CPP=y CONFIG_STD_CPP17=y CONFIG_REQUIRES_FULL_LIBCPP=n CONFIG_CPP_EXCEPTIONS=n CONFIG_CPP_RTTI=n # Console/logging. CONFIG_LOG=y CONFIG_PRINTK=y # USB device stack (next/USBD). The HID pool (app.overlay) + the board CDC ACM # console register as classes; the firmware brings the stack up via the TinyUSB # shim (USBDevice.attach -> opk_usbd_enable), not at boot. CONFIG_USB_DEVICE_STACK_NEXT=y CONFIG_USBD_HID_SUPPORT=y CONFIG_USBD_CDC_ACM_CLASS=y CONFIG_CDC_ACM_SERIAL_INITIALIZE_AT_BOOT=n CONFIG_HWINFO=y CONFIG_USBD_LOG_LEVEL_ERR=y CONFIG_USBD_HID_LOG_LEVEL_ERR=y # Core subsystems used by the port. CONFIG_GPIO=y CONFIG_FLASH=y CONFIG_FLASH_MAP=y CONFIG_REBOOT=y # CRITICAL: link the image at the code partition (0x26000) so it loads where the # Adafruit/nice!nano UF2 bootloader expects the application. Without this Zephyr # links at 0x0 and the UF2 would overwrite the MBR/bootloader region (brick). CONFIG_USE_DT_CODE_PARTITION=y # Persistence: the Arduino tree stored cfg.bin/bonds.bin in the nRF52 internal # LittleFS. We keep LittleFS (Zephyr's fs subsystem on the storage partition) so # the persistence code ports behind a thin Adafruit_LittleFS shim. CONFIG_FILE_SYSTEM=y CONFIG_FILE_SYSTEM_LITTLEFS=y CONFIG_FILE_SYSTEM_MKFS=y # The firmware drives the WDT peripheral directly (NRF_WDT, ported verbatim from # the Arduino setup()/loop()), so Zephyr's watchdog driver is left out to avoid # double-ownership of the peripheral. # Microsecond timing for the RF poll busy-waits comes from a dedicated 1 MHz # nrfx TIMER in the compat layer (the kernel RTC tick is too coarse), so the # kernel clock is left at its board default here. # Reasonable main stack for the cooperative loop + protocol state. CONFIG_MAIN_STACK_SIZE=4096 CONFIG_HEAP_MEM_POOL_SIZE=2048