aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Sokolovsky2012-09-25 00:31:31 +0300
committerPaul Sokolovsky2012-09-25 00:31:31 +0300
commitd6e0e6e976916f7a72abf92318b65ab96b291b78 (patch)
tree59cd5557969de718e5c583bdea021482f4e2867a
parent7851515c5c749294e82ce20cb23c6d528fb804b5 (diff)
Explicitly link example binaries statically.
This allow good share of binaries be linkable (and actually run) with a typical distro-packaged ARM toolchain (Cortex-A and Linux targetted).
-rw-r--r--examples/stm32/f1/Makefile.include2
-rw-r--r--examples/stm32/f2/Makefile.include2
-rw-r--r--examples/stm32/f4/Makefile.include2
3 files changed, 3 insertions, 3 deletions
diff --git a/examples/stm32/f1/Makefile.include b/examples/stm32/f1/Makefile.include
index b315fac..60f44e7 100644
--- a/examples/stm32/f1/Makefile.include
+++ b/examples/stm32/f1/Makefile.include
@@ -37,7 +37,7 @@ ARCH_FLAGS = -mthumb -mcpu=cortex-m3 -msoft-float
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \
-fno-common $(ARCH_FLAGS) -MD -DSTM32F1
LDSCRIPT ?= $(BINARY).ld
-LDFLAGS += -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group \
+LDFLAGS += --static -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group \
-L$(TOOLCHAIN_DIR)/lib \
-T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections \
$(ARCH_FLAGS) -mfix-cortex-m3-ldrd
diff --git a/examples/stm32/f2/Makefile.include b/examples/stm32/f2/Makefile.include
index 3e338af..690f8c4 100644
--- a/examples/stm32/f2/Makefile.include
+++ b/examples/stm32/f2/Makefile.include
@@ -37,7 +37,7 @@ endif
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \
-fno-common -mcpu=cortex-m3 -mthumb -msoft-float -MD -DSTM32F2
LDSCRIPT ?= $(BINARY).ld
-LDFLAGS += -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group \
+LDFLAGS += --static -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group \
-L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib/stm32/f2 \
-T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections \
-mthumb -march=armv7 -mfix-cortex-m3-ldrd -msoft-float
diff --git a/examples/stm32/f4/Makefile.include b/examples/stm32/f4/Makefile.include
index b735aa6..8fa9391 100644
--- a/examples/stm32/f4/Makefile.include
+++ b/examples/stm32/f4/Makefile.include
@@ -38,7 +38,7 @@ endif
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \
-fno-common -mcpu=cortex-m4 -mthumb -msoft-float -MD -DSTM32F4
LDSCRIPT ?= $(BINARY).ld
-LDFLAGS += -lc -lnosys -L$(TOOLCHAIN_DIR)/lib \
+LDFLAGS += --static -lc -lnosys -L$(TOOLCHAIN_DIR)/lib \
-L$(TOOLCHAIN_DIR)/lib/stm32/f4 \
-T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections \
-mthumb -mcpu=cortex-m4 -march=armv7 -mfix-cortex-m3-ldrd -msoft-float