From e486b533c1471247d8ea23c603f4a39042cb4cb8 Mon Sep 17 00:00:00 2001 From: Jerzy Kasenberg Date: Tue, 9 May 2023 10:08:05 +0200 Subject: [PATCH] boot: mynewt: add support for the mcumgr echo command in serial boot mode This allows user to enable echo for mcumgr command in serial boot. Code was enabled in zephyr only so far. Now mynewt build can also have this feature if enabled. No code changes just option in mynewt build to enable existing mcuboot feature. Signed-off-by: Jerzy Kasenberg --- boot/boot_serial/syscfg.yml | 4 ++++ .../mcuboot_config/include/mcuboot_config/mcuboot_config.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/boot/boot_serial/syscfg.yml b/boot/boot_serial/syscfg.yml index 655644286..e479bd59d 100644 --- a/boot/boot_serial/syscfg.yml +++ b/boot/boot_serial/syscfg.yml @@ -90,3 +90,7 @@ syscfg.defs: - '(BOOT_SERIAL_DETECT_PIN != -1) || (BOOT_SERIAL_DETECT_TIMEOUT != 0) || (BOOT_SERIAL_NVREG_INDEX != -1)' + + BOOT_SERIAL_MGMT_ECHO: + description: If enabled, support for the mcumgr echo command is being added. + value: 0 diff --git a/boot/mynewt/mcuboot_config/include/mcuboot_config/mcuboot_config.h b/boot/mynewt/mcuboot_config/include/mcuboot_config/mcuboot_config.h index 7bf42ca57..c7a267149 100644 --- a/boot/mynewt/mcuboot_config/include/mcuboot_config/mcuboot_config.h +++ b/boot/mynewt/mcuboot_config/include/mcuboot_config/mcuboot_config.h @@ -29,6 +29,9 @@ #if MYNEWT_VAL(BOOT_SERIAL) #define MCUBOOT_SERIAL 1 #endif +#if MYNEWT_VAL(BOOT_SERIAL_MGMT_ECHO) +#define MCUBOOT_BOOT_MGMT_ECHO 1 +#endif #if MYNEWT_VAL(BOOTUTIL_VALIDATE_SLOT0) #define MCUBOOT_VALIDATE_PRIMARY_SLOT 1 #endif