From 0367ad6214b0923d9e01ec758e1e10bc1a482f4f Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 14 Jan 2014 23:48:11 +0000 Subject: [PATCH] stm: Include libgcc for __aeabi_d2f and __aeabi_f2d functions. Thanks to Dave Hylands for this. --- stm/Makefile | 3 ++- stm/main.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/stm/Makefile b/stm/Makefile index 03e0e261bc..d4dbd960a6 100644 --- a/stm/Makefile +++ b/stm/Makefile @@ -33,6 +33,7 @@ CFLAGS += -Os -DNDEBUG endif LDFLAGS = --nostdlib -T stm32f405.ld +LIBS = $(shell $(CC) -print-libgcc-file-name) SRC_C = \ main.c \ @@ -145,7 +146,7 @@ $(BUILD)/flash1.bin: $(BUILD)/flash.elf $(BUILD)/flash.elf: $(OBJ) $(ECHO) "LINK $@" - $(Q)$(LD) $(LDFLAGS) -o $@ $(OBJ) + $(Q)$(LD) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) $(Q)$(SIZE) $@ $(BUILD)/%.o: %.s diff --git a/stm/main.c b/stm/main.c index c5e9d76d4d..ab8cced6a9 100644 --- a/stm/main.c +++ b/stm/main.c @@ -1180,6 +1180,7 @@ soft_reset: goto soft_reset; } +/* now supplied by libgcc library double __aeabi_f2d(float x) { // TODO return 0.0; @@ -1189,6 +1190,7 @@ float __aeabi_d2f(double x) { // TODO return 0.0; } +*/ double sqrt(double x) { // TODO