From c9860e77164dc2201fbfeb930c2dccd0e5090613 Mon Sep 17 00:00:00 2001 From: Mike Smith Date: Mon, 5 Dec 2011 23:01:24 -0800 Subject: [PATCH] Make it possible to build with libopencm3 installed in a nonstandard location --- src/stm32/Makefile.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/stm32/Makefile.inc b/src/stm32/Makefile.inc index f3994e44..ac8f4c63 100644 --- a/src/stm32/Makefile.inc +++ b/src/stm32/Makefile.inc @@ -1,11 +1,12 @@ CROSS_COMPILE ?= arm-none-eabi- CC = $(CROSS_COMPILE)gcc OBJCOPY = $(CROSS_COMPILE)objcopy +LIBOPENCM3 ?= /usr/local/arm-none-eabi -CFLAGS += -Istm32/include -mcpu=cortex-m3 -mthumb -msoft-float -DSTM32F1 +CFLAGS += -Istm32/include -mcpu=cortex-m3 -mthumb -msoft-float -DSTM32F1 -I$(LIBOPENCM3)/include LDFLAGS_BOOT = -lopencm3_stm32f1 -Wl,--defsym,_stack=0x20005000 \ -Wl,-T,stm32/blackmagic.ld -nostartfiles -lc -lnosys -Wl,-Map=mapfile \ - -mthumb -march=armv7 -mfix-cortex-m3-ldrd -msoft-float + -mthumb -march=armv7 -mcpu=cortex-m3 -mfix-cortex-m3-ldrd -msoft-float -L$(LIBOPENCM3)/lib/stm32/f1 LDFLAGS = $(LDFLAGS_BOOT) -Wl,-Ttext=0x8002000 SRC += cdcacm.c \