# # MCUboot Configuration for Serial Recovery over USB-CDC # # Enables serial recovery mode in MCUboot. CONFIG_MCUBOOT_SERIAL=y # Tell MCUboot to check for a trigger to enter recovery CONFIG_BOOT_SERIAL_BOOT_MODE=y # --- USB Stack Configuration --- CONFIG_USB_DEVICE_STACK=y CONFIG_USB_DEVICE_PRODUCT="MCUboot Serial Recovery" # Use USB CDC ACM for MCUboot serial recovery (not UART) CONFIG_BOOT_SERIAL_CDC_ACM=y # --- Disable Zephyr Console to avoid conflicts --- # MCUboot's serial_adapter doesn't work well with the general console subsystem. CONFIG_UART_CONSOLE=n CONFIG_CONSOLE_HANDLER=n CONFIG_CONSOLE=n # --- Flash and Stream Configuration (required for IMG_MANAGER) --- CONFIG_FLASH=y CONFIG_STREAM_FLASH=y # --- mcumgr Configuration --- # MCUMGR requires NET_BUF, even for serial transport. CONFIG_NET_BUF=y CONFIG_NET_LOG=n # Enables the mcumgr library and necessary command handlers CONFIG_MCUMGR=y CONFIG_IMG_MANAGER=y CONFIG_MCUMGR_GRP_IMG=y CONFIG_MCUMGR_GRP_OS=y # --- Retention Configuration --- CONFIG_RETAINED_MEM=y CONFIG_RETENTION=y CONFIG_RETENTION_BOOT_MODE=y # --- Optional: Reduce memory usage --- CONFIG_MAIN_STACK_SIZE=2048 CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1024