From bf6558918359a4aa81514f56168cdd8fe5c28efa Mon Sep 17 00:00:00 2001 From: Tomaz Solc Date: Mon, 5 Mar 2012 15:51:31 +0100 Subject: Support for exception handling in linker scripts. This is needed even in plain C when 64 bit variable (e.g. long long int) arithmetic is used. For example it is required when newlib is compiled with --enable-newlib-io-long-long. Conflicts: lib/stm32/f1/libopencm3_stm32f1.ld lib/stm32/f2/libopencm3_stm32f2.ld --- examples/stm32/f1/Makefile.include | 3 ++- examples/stm32/f2/Makefile.include | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/stm32/f1/Makefile.include b/examples/stm32/f1/Makefile.include index b60bfb9..92ad689 100644 --- a/examples/stm32/f1/Makefile.include +++ b/examples/stm32/f1/Makefile.include @@ -31,7 +31,8 @@ TOOLCHAIN_DIR = ../../../../.. CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \ -fno-common -mcpu=cortex-m3 -mthumb -msoft-float -MD -DSTM32F1 LDSCRIPT ?= $(BINARY).ld -LDFLAGS += -lc -lnosys -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib/stm32/f1 \ +LDFLAGS += -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group \ + -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib/stm32/f1 \ -T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections \ -mthumb -march=armv7 -mfix-cortex-m3-ldrd -msoft-float OBJS += $(BINARY).o diff --git a/examples/stm32/f2/Makefile.include b/examples/stm32/f2/Makefile.include index 4faa27e..f68da43 100644 --- a/examples/stm32/f2/Makefile.include +++ b/examples/stm32/f2/Makefile.include @@ -32,8 +32,8 @@ TOOLCHAIN_DIR = ../../../../.. CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \ -fno-common -mcpu=cortex-m3 -mthumb -msoft-float -MD -DSTM32F2 LDSCRIPT ?= $(BINARY).ld -LDFLAGS += -lc -lnosys -L$(TOOLCHAIN_DIR)/lib \ - -L$(TOOLCHAIN_DIR)/lib/stm32/f2 \ +LDFLAGS += -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 OBJS += $(BINARY).o -- cgit v1.2.3