prj.conf 2.0 KB

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