|
@ -27,14 +27,18 @@ OBJCOPY = $(PREFIX)-objcopy |
|
|
OBJDUMP = $(PREFIX)-objdump |
|
|
OBJDUMP = $(PREFIX)-objdump |
|
|
GDB = $(PREFIX)-gdb |
|
|
GDB = $(PREFIX)-gdb |
|
|
FLASH = $(shell which st-flash) |
|
|
FLASH = $(shell which st-flash) |
|
|
|
|
|
|
|
|
|
|
|
TOOLCHAIN_DIR ?= ../../../../.. |
|
|
ifeq ($(wildcard ../../../../../lib/libopencm3_stm32f4.a),) |
|
|
ifeq ($(wildcard ../../../../../lib/libopencm3_stm32f4.a),) |
|
|
|
|
|
ifneq ($(strip $(shell which $(CC))),) |
|
|
TOOLCHAIN_DIR := $(shell dirname `which $(CC)`)/../$(PREFIX) |
|
|
TOOLCHAIN_DIR := $(shell dirname `which $(CC)`)/../$(PREFIX) |
|
|
|
|
|
endif |
|
|
else |
|
|
else |
|
|
ifeq ($(V),1) |
|
|
ifeq ($(V),1) |
|
|
$(info We seem to be building the example in the source directory. Using local library!) |
|
|
$(info We seem to be building the example in the source directory. Using local library!) |
|
|
endif |
|
|
endif |
|
|
TOOLCHAIN_DIR := ../../../../.. |
|
|
|
|
|
endif |
|
|
endif |
|
|
|
|
|
|
|
|
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \
|
|
|
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \
|
|
|
-fno-common -mcpu=cortex-m4 -mthumb \
|
|
|
-fno-common -mcpu=cortex-m4 -mthumb \
|
|
|
-mfloat-abi=hard -mfpu=fpv4-sp-d16 -MD -DSTM32F4 |
|
|
-mfloat-abi=hard -mfpu=fpv4-sp-d16 -MD -DSTM32F4 |
|
|