You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/11/05 04:22:17 UTC
[incubator-nuttx-apps] branch master updated: boot/mcuboot: Fix
inclusion of more than one example app
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 6942378 boot/mcuboot: Fix inclusion of more than one example app
6942378 is described below
commit 69423786957fcfd44db53b8af4a520baf572d22e
Author: Gustavo Henrique Nihei <gu...@espressif.com>
AuthorDate: Thu Nov 4 15:55:58 2021 -0300
boot/mcuboot: Fix inclusion of more than one example app
Even though the options existed, the second application would override
the values, resulting in the missing first application on the final
binary.
Signed-off-by: Gustavo Henrique Nihei <gu...@espressif.com>
---
boot/mcuboot/Makefile | 38 +++++++++++++++++++++-----------------
1 file changed, 21 insertions(+), 17 deletions(-)
diff --git a/boot/mcuboot/Makefile b/boot/mcuboot/Makefile
index 3fca9bc..9914fee 100644
--- a/boot/mcuboot/Makefile
+++ b/boot/mcuboot/Makefile
@@ -31,23 +31,27 @@ VPATH += :$(MCUBOOT_UNPACK)$(DELIM)src
VPATH += :$(MCUBOOT_SRCDIR)
ifneq ($(CONFIG_MCUBOOT_UPDATE_AGENT_EXAMPLE),)
-MAINSRC = mcuboot_agent_main.c
-
-PROGNAME = mcuboot_agent
-PRIORITY = SCHED_PRIORITY_DEFAULT
-STACKSIZE = $(CONFIG_DEFAULT_TASK_STACKSIZE)
-else ifneq ($(CONFIG_MCUBOOT_SLOT_CONFIRM_EXAMPLE),)
-MAINSRC = mcuboot_confirm_main.c
-
-PROGNAME = mcuboot_confirm
-PRIORITY = SCHED_PRIORITY_DEFAULT
-STACKSIZE = $(CONFIG_DEFAULT_TASK_STACKSIZE)
-else ifneq ($(CONFIG_MCUBOOT_BOOTLOADER),)
-MAINSRC = mcuboot/boot/nuttx/main.c
-
-PROGNAME = mcuboot_loader
-PRIORITY = SCHED_PRIORITY_DEFAULT
-STACKSIZE = $(CONFIG_DEFAULT_TASK_STACKSIZE)
+MAINSRC += mcuboot_agent_main.c
+
+PROGNAME += mcuboot_agent
+PRIORITY += SCHED_PRIORITY_DEFAULT
+STACKSIZE += $(CONFIG_DEFAULT_TASK_STACKSIZE)
+endif
+
+ifneq ($(CONFIG_MCUBOOT_SLOT_CONFIRM_EXAMPLE),)
+MAINSRC += mcuboot_confirm_main.c
+
+PROGNAME += mcuboot_confirm
+PRIORITY += SCHED_PRIORITY_DEFAULT
+STACKSIZE += $(CONFIG_DEFAULT_TASK_STACKSIZE)
+endif
+
+ifneq ($(CONFIG_MCUBOOT_BOOTLOADER),)
+MAINSRC += mcuboot/boot/nuttx/main.c
+
+PROGNAME += mcuboot_loader
+PRIORITY += SCHED_PRIORITY_DEFAULT
+STACKSIZE += $(CONFIG_DEFAULT_TASK_STACKSIZE)
endif
CFLAGS += -Wno-undef