TOOLCHAIN_PREFIX = /opt/gcc-arm-none-eabi/bin/arm-none-eabi- TOOLCHAIN_SUFFIX = CC = $(TOOLCHAIN_PREFIX)gcc$(TOOLCHAIN_SUFFIX) GDB = $(TOOLCHAIN_PREFIX)gdb$(TOOLCHAIN_SUFFIX) SIZE = $(TOOLCHAIN_PREFIX)size$(TOOLCHAIN_SUFFIX) OBJCOPY = $(TOOLCHAIN_PREFIX)objcopy$(TOOLCHAIN_SUFFIX) OBJDUMP = $(TOOLCHAIN_PREFIX)objdump$(TOOLCHAIN_SUFFIX) STRIP = $(TOOLCHAIN_PREFIX)strip$(TOOLCHAIN_SUFFIX) READELF = $(TOOLCHAIN_PREFIX)readelf$(TOOLCHAIN_SUFFIX) NM = $(TOOLCHAIN_PREFIX)nm$(TOOLCHAIN_SUFFIX) #environment variables ARCH_CFLAGS = -mcpu=cortex-m3 -mthumb -mlittle-endian -mfloat-abi=soft OPT_CFLAGS = -fdata-sections -ffunction-sections PLATFORM_CFLAGS = -Wno-unused-parameter -nostdinc -ffreestanding -fno-builtin -fsigned-char -fno-common -Wno-main -I$(shell $(CC) -print-search-dirs | $(AWK) '$$1 == "install:" {print $$NF}')include PLATFORM_CFLAGS += -DARM_MATH_CM3 PLATFORM_CXXFLAGS = $(PLATFORM_CFLAGS) -fno-rtti -fno-exceptions -fno-use-cxa-atexit PLATFORM_LDFLAGS = -nostdlib -nostartfiles -nodefaultlibs -Wl,-static,-gc-sections define CONFIG_TARGETS $(BINDIR)/$(TARGET_VER).hex: $(BINDIR)/$(TARGET_VER).elf | $(BINDIR)/ $(OBJCOPY) -O ihex $(BINDIR)/$(TARGET_VER).elf $(BINDIR)/$(TARGET_VER).hex @echo endef include $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/build.mk