Skip to content

Commit 019cfc3

Browse files
de-nordicmbolivar-nordic
authored andcommitted
[nrf fromtree] zephyr: Fix support for single application with serial recovery
The commit fixes compilation error when attempting to build support for single application slot with serial recovery enabled. Upstream commit: e5ecbce Signed-off-by: Dominik Ermel <[email protected]> (cherry picked from commit 10fb108)
1 parent 8919a3b commit 019cfc3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

boot/boot_serial/src/boot_serial.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@
6363

6464
MCUBOOT_LOG_MODULE_DECLARE(mcuboot);
6565

66+
#ifndef BOOT_IMAGE_NUMBER
67+
#define BOOT_IMAGE_NUMBER MCUBOOT_IMAGE_NUMBER
68+
#endif
69+
6670
#define BOOT_SERIAL_INPUT_MAX 512
6771
#define BOOT_SERIAL_OUT_MAX (128 * MCUBOOT_IMAGE_NUMBER)
6872

@@ -77,10 +81,6 @@ MCUBOOT_LOG_MODULE_DECLARE(mcuboot);
7781
#define htons(x) sys_cpu_to_be16(x)
7882
#endif
7983

80-
#ifndef BOOT_IMAGE_NUMBER
81-
#define BOOT_IMAGE_NUMBER MCUBOOT_IMAGE_NUMBER
82-
#endif
83-
8484
#if (BOOT_IMAGE_NUMBER > 1)
8585
#define IMAGES_ITER(x) for ((x) = 0; (x) < BOOT_IMAGE_NUMBER; ++(x))
8686
#else

boot/zephyr/include/mcuboot_config/mcuboot_config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767

6868
#ifdef CONFIG_SINGLE_APPLICATION_SLOT
6969
#define MCUBOOT_SINGLE_APPLICATION_SLOT 1
70+
#define MCUBOOT_IMAGE_NUMBER 1
7071
#else
7172

7273
#ifdef CONFIG_BOOT_SWAP_USING_MOVE

0 commit comments

Comments
 (0)