From 93c9d323e05a9131ce51fb7b42b40d9155d4e2d3 Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Fri, 1 Jun 2018 07:58:16 -0600 Subject: [PATCH] configs/stm32f4discovery: Add Load Modules flags to STM32F4Discovery board --- configs/stm32f4discovery/scripts/Make.defs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/configs/stm32f4discovery/scripts/Make.defs b/configs/stm32f4discovery/scripts/Make.defs index e1c6ba52a6..f0270e21ae 100644 --- a/configs/stm32f4discovery/scripts/Make.defs +++ b/configs/stm32f4discovery/scripts/Make.defs @@ -94,6 +94,17 @@ NXFLATLDFLAGS1 = -r -d -warn-common NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections LDNXFLATFLAGS = -e main -s 2048 +# Loadable module definitions + +CMODULEFLAGS = $(CFLAGS) -mlong-calls # --target1-abs + +LDMODULEFLAGS = -r -e module_initialize +ifeq ($(WINTOOL),y) + LDMODULEFLAGS += -T "${shell cygpath -w $(TOPDIR)/libs/libc/modlib/gnu-elf.ld}" +else + LDMODULEFLAGS += -T $(TOPDIR)/libs/libc/modlib/gnu-elf.ld +endif + ASMEXT = .S OBJEXT = .o LIBEXT = .a