diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 1decfd3543..abb3771baa 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -279,6 +279,7 @@ config ARCH_CORTEXM7 select ARCH_HAVE_IRQPRIO select ARCH_HAVE_RAMVECTORS select ARCH_HAVE_HIPRI_INTERRUPT + select ARCH_HAVE_COHERENT_DCACHE if ELF || MODULE config ARCH_CORTEXA5 bool @@ -286,7 +287,7 @@ config ARCH_CORTEXA5 select ARCH_HAVE_IRQPRIO select ARCH_HAVE_MMU select ARCH_USE_MMU - select ARCH_HAVE_COHERENT_DCACHE if ELF + select ARCH_HAVE_COHERENT_DCACHE if ELF || MODULE config ARCH_CORTEXA8 bool @@ -294,7 +295,7 @@ config ARCH_CORTEXA8 select ARCH_HAVE_IRQPRIO select ARCH_HAVE_MMU select ARCH_USE_MMU - select ARCH_HAVE_COHERENT_DCACHE if ELF + select ARCH_HAVE_COHERENT_DCACHE if ELF || MODULE config ARCH_FAMILY string diff --git a/arch/arm/src/a1x/Make.defs b/arch/arm/src/a1x/Make.defs index dc7a61b5a1..cd37e623ce 100644 --- a/arch/arm/src/a1x/Make.defs +++ b/arch/arm/src/a1x/Make.defs @@ -112,6 +112,8 @@ endif ifeq ($(CONFIG_ELF),y) CMN_CSRCS += arm_elf.c arm_coherent_dcache.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += arm_elf.c arm_coherent_dcache.c endif ifeq ($(CONFIG_ARCH_FPU),y) diff --git a/arch/arm/src/armv7-a/arm_coherent_dcache.c b/arch/arm/src/armv7-a/arm_coherent_dcache.c index 1cb134c922..b85f2be0ff 100644 --- a/arch/arm/src/armv7-a/arm_coherent_dcache.c +++ b/arch/arm/src/armv7-a/arm_coherent_dcache.c @@ -44,7 +44,7 @@ #include "cp15_cacheops.h" -#include +#include /**************************************************************************** * Pre-processor Definitions diff --git a/arch/arm/src/armv7-m/up_elf.c b/arch/arm/src/armv7-m/up_elf.c index abefae88b5..bf492f1aca 100644 --- a/arch/arm/src/armv7-m/up_elf.c +++ b/arch/arm/src/armv7-m/up_elf.c @@ -48,20 +48,6 @@ #include #include -#ifdef CONFIG_ELF - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Function Prototypes ****************************************************************************/ @@ -498,4 +484,3 @@ int up_init_exidx(Elf32_Addr address, Elf32_Word size) } #endif -#endif /* CONFIG_ELF */ diff --git a/arch/arm/src/c5471/Make.defs b/arch/arm/src/c5471/Make.defs index b1c64bed3a..92320e5d48 100644 --- a/arch/arm/src/c5471/Make.defs +++ b/arch/arm/src/c5471/Make.defs @@ -47,6 +47,8 @@ CMN_CSRCS += up_undefinedinsn.c up_usestack.c up_vfork.c ifeq ($(CONFIG_ELF),y) CMN_CSRCS += up_elf.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += up_elf.c endif ifeq ($(CONFIG_STACK_COLORATION),y) diff --git a/arch/arm/src/calypso/Make.defs b/arch/arm/src/calypso/Make.defs index 009100c43a..c3d6b6b0bb 100644 --- a/arch/arm/src/calypso/Make.defs +++ b/arch/arm/src/calypso/Make.defs @@ -50,6 +50,8 @@ CMN_CSRCS += up_undefinedinsn.c up_usestack.c calypso_power.c up_vfork.c ifeq ($(CONFIG_ELF),y) CMN_CSRCS += up_elf.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += up_elf.c endif ifeq ($(CONFIG_STACK_COLORATION),y) diff --git a/arch/arm/src/dm320/Make.defs b/arch/arm/src/dm320/Make.defs index 530d70bd22..ab9b2afa63 100644 --- a/arch/arm/src/dm320/Make.defs +++ b/arch/arm/src/dm320/Make.defs @@ -48,6 +48,8 @@ CMN_CSRCS += up_undefinedinsn.c up_usestack.c up_vfork.c ifeq ($(CONFIG_ELF),y) CMN_CSRCS += up_elf.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += up_elf.c endif ifeq ($(CONFIG_STACK_COLORATION),y) diff --git a/arch/arm/src/efm32/Make.defs b/arch/arm/src/efm32/Make.defs index 609ac46d14..5e23655f64 100644 --- a/arch/arm/src/efm32/Make.defs +++ b/arch/arm/src/efm32/Make.defs @@ -81,6 +81,8 @@ endif ifeq ($(CONFIG_ELF),y) CMN_CSRCS += up_elf.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += up_elf.c endif ifeq ($(CONFIG_ARCH_FPU),y) diff --git a/arch/arm/src/imx/Make.defs b/arch/arm/src/imx/Make.defs index 46d16d4148..792d6c3244 100644 --- a/arch/arm/src/imx/Make.defs +++ b/arch/arm/src/imx/Make.defs @@ -47,6 +47,8 @@ CMN_CSRCS += up_undefinedinsn.c up_usestack.c up_vfork.c ifeq ($(CONFIG_ELF),y) CMN_CSRCS += up_elf.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += up_elf.c endif ifeq ($(CONFIG_STACK_COLORATION),y) diff --git a/arch/arm/src/kinetis/Make.defs b/arch/arm/src/kinetis/Make.defs index d4bce7b4a7..b8a6bb5cce 100644 --- a/arch/arm/src/kinetis/Make.defs +++ b/arch/arm/src/kinetis/Make.defs @@ -79,6 +79,8 @@ endif ifeq ($(CONFIG_ELF),y) CMN_CSRCS += up_elf.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += up_elf.c endif # Required Kinetis files diff --git a/arch/arm/src/kl/Make.defs b/arch/arm/src/kl/Make.defs index 20d5a64f58..68c58af802 100644 --- a/arch/arm/src/kl/Make.defs +++ b/arch/arm/src/kl/Make.defs @@ -61,6 +61,8 @@ endif ifeq ($(CONFIG_ELF),y) CMN_CSRCS += up_elf.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += up_elf.c endif ifeq ($(CONFIG_DEBUG),y) diff --git a/arch/arm/src/lpc11xx/Make.defs b/arch/arm/src/lpc11xx/Make.defs index 9bde780de7..a40c143545 100644 --- a/arch/arm/src/lpc11xx/Make.defs +++ b/arch/arm/src/lpc11xx/Make.defs @@ -61,6 +61,8 @@ endif ifeq ($(CONFIG_ELF),y) CMN_CSRCS += up_elf.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += up_elf.c endif ifeq ($(CONFIG_DEBUG),y) diff --git a/arch/arm/src/lpc17xx/Make.defs b/arch/arm/src/lpc17xx/Make.defs index daf388a117..ff8285474e 100644 --- a/arch/arm/src/lpc17xx/Make.defs +++ b/arch/arm/src/lpc17xx/Make.defs @@ -94,6 +94,8 @@ endif ifeq ($(CONFIG_ELF),y) CMN_CSRCS += up_elf.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += up_elf.c endif ifeq ($(CONFIG_ARCH_FPU),y) diff --git a/arch/arm/src/lpc214x/Make.defs b/arch/arm/src/lpc214x/Make.defs index 364c2c52ee..ea9bc40449 100644 --- a/arch/arm/src/lpc214x/Make.defs +++ b/arch/arm/src/lpc214x/Make.defs @@ -52,6 +52,8 @@ endif ifeq ($(CONFIG_ELF),y) CMN_CSRCS += up_elf.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += up_elf.c endif ifeq ($(CONFIG_STACK_COLORATION),y) diff --git a/arch/arm/src/lpc2378/Make.defs b/arch/arm/src/lpc2378/Make.defs index 4df2d7eb3e..a79ce91ddd 100644 --- a/arch/arm/src/lpc2378/Make.defs +++ b/arch/arm/src/lpc2378/Make.defs @@ -56,6 +56,8 @@ endif ifeq ($(CONFIG_ELF),y) CMN_CSRCS += up_elf.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += up_elf.c endif ifeq ($(CONFIG_STACK_COLORATION),y) diff --git a/arch/arm/src/lpc31xx/Make.defs b/arch/arm/src/lpc31xx/Make.defs index a8bbcb5087..03c6c0bef6 100644 --- a/arch/arm/src/lpc31xx/Make.defs +++ b/arch/arm/src/lpc31xx/Make.defs @@ -53,6 +53,8 @@ endif ifeq ($(CONFIG_ELF),y) CMN_CSRCS += up_elf.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += up_elf.c endif ifeq ($(CONFIG_STACK_COLORATION),y) diff --git a/arch/arm/src/lpc43xx/Make.defs b/arch/arm/src/lpc43xx/Make.defs index 3b3f8b1948..a8fa5d5b4a 100644 --- a/arch/arm/src/lpc43xx/Make.defs +++ b/arch/arm/src/lpc43xx/Make.defs @@ -78,6 +78,8 @@ endif ifeq ($(CONFIG_ELF),y) CMN_CSRCS += up_elf.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += up_elf.c endif ifeq ($(CONFIG_ARCH_FPU),y) diff --git a/arch/arm/src/moxart/Make.defs b/arch/arm/src/moxart/Make.defs index 1752223114..48b9a21fa0 100644 --- a/arch/arm/src/moxart/Make.defs +++ b/arch/arm/src/moxart/Make.defs @@ -50,6 +50,8 @@ CMN_CSRCS += up_undefinedinsn.c up_usestack.c up_vfork.c up_etherstub.c ifeq ($(CONFIG_ELF),y) CMN_CSRCS += up_elf.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += up_elf.c endif CHIP_ASRCS = moxart_lowputc.S diff --git a/arch/arm/src/nuc1xx/Make.defs b/arch/arm/src/nuc1xx/Make.defs index 753322fb34..3a9f065191 100644 --- a/arch/arm/src/nuc1xx/Make.defs +++ b/arch/arm/src/nuc1xx/Make.defs @@ -61,6 +61,8 @@ endif ifeq ($(CONFIG_ELF),y) CMN_CSRCS += up_elf.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += up_elf.c endif ifeq ($(CONFIG_DEBUG),y) diff --git a/arch/arm/src/sam34/Make.defs b/arch/arm/src/sam34/Make.defs index 551a5cdd68..03b241d632 100644 --- a/arch/arm/src/sam34/Make.defs +++ b/arch/arm/src/sam34/Make.defs @@ -85,6 +85,8 @@ endif ifeq ($(CONFIG_ELF),y) CMN_CSRCS += up_elf.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += up_elf.c endif ifeq ($(CONFIG_ARCH_FPU),y) diff --git a/arch/arm/src/sama5/Make.defs b/arch/arm/src/sama5/Make.defs index 65a203c45f..cb6ac5a784 100644 --- a/arch/arm/src/sama5/Make.defs +++ b/arch/arm/src/sama5/Make.defs @@ -114,6 +114,8 @@ endif ifeq ($(CONFIG_ELF),y) CMN_CSRCS += arm_elf.c arm_coherent_dcache.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += arm_elf.c arm_coherent_dcache.c endif ifeq ($(CONFIG_ARCH_FPU),y) diff --git a/arch/arm/src/samdl/Make.defs b/arch/arm/src/samdl/Make.defs index 9b52be0310..d9a82f959e 100644 --- a/arch/arm/src/samdl/Make.defs +++ b/arch/arm/src/samdl/Make.defs @@ -61,6 +61,8 @@ endif ifeq ($(CONFIG_ELF),y) CMN_CSRCS += up_elf.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += up_elf.c endif ifeq ($(CONFIG_DEBUG),y) diff --git a/arch/arm/src/samv7/Make.defs b/arch/arm/src/samv7/Make.defs index 79559c9380..c614bb95f6 100644 --- a/arch/arm/src/samv7/Make.defs +++ b/arch/arm/src/samv7/Make.defs @@ -102,7 +102,9 @@ endif endif ifeq ($(CONFIG_ELF),y) -CMN_CSRCS += up_elf.c +CMN_CSRCS += up_elf.c up_coherent_dcache.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += up_elf.c up_coherent_dcache.c endif ifeq ($(CONFIG_STACK_COLORATION),y) diff --git a/arch/arm/src/stm32/Make.defs b/arch/arm/src/stm32/Make.defs index e1b4d6d9fd..752069b8db 100644 --- a/arch/arm/src/stm32/Make.defs +++ b/arch/arm/src/stm32/Make.defs @@ -89,6 +89,8 @@ endif ifeq ($(CONFIG_ELF),y) CMN_CSRCS += up_elf.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += up_elf.c endif ifeq ($(CONFIG_ARCH_FPU),y) diff --git a/arch/arm/src/stm32f7/Make.defs b/arch/arm/src/stm32f7/Make.defs index 1fa9d5de13..3239f8d725 100644 --- a/arch/arm/src/stm32f7/Make.defs +++ b/arch/arm/src/stm32f7/Make.defs @@ -99,7 +99,9 @@ endif endif ifeq ($(CONFIG_ELF),y) -CMN_CSRCS += up_elf.c +CMN_CSRCS += up_elf.c up_coherent_dcache.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += up_elf.c up_coherent_dcache.c endif ifeq ($(CONFIG_STACK_COLORATION),y) diff --git a/arch/arm/src/str71x/Make.defs b/arch/arm/src/str71x/Make.defs index 00ce4a3625..00db6c3b8f 100644 --- a/arch/arm/src/str71x/Make.defs +++ b/arch/arm/src/str71x/Make.defs @@ -52,6 +52,8 @@ endif ifeq ($(CONFIG_ELF),y) CMN_CSRCS += up_elf.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += up_elf.c endif ifeq ($(CONFIG_STACK_COLORATION),y) diff --git a/arch/arm/src/tiva/Make.defs b/arch/arm/src/tiva/Make.defs index bd417ea9dc..b8cb81e7e6 100644 --- a/arch/arm/src/tiva/Make.defs +++ b/arch/arm/src/tiva/Make.defs @@ -71,6 +71,8 @@ endif ifeq ($(CONFIG_ELF),y) CMN_CSRCS += up_elf.c +else ifeq ($(CONFIG_MODULE),y) +CMN_CSRCS += up_elf.c endif CHIP_ASRCS =