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-m0 -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_CM0 PLATFORM_CXXFLAGS = $(PLATFORM_CFLAGS) -fno-rtti -fno-exceptions -fno-use-cxa-atexit PLATFORM_LDFLAGS = -nostdlib -nostartfiles -nodefaultlibs -Wl,-static,-gc-sections define CONFIG_TARGETS $(OUTDIR)/$(TARGET_VER).hex: $(OUTDIR)/$(TARGET_VER).elf | $(OUTDIR)/ $(OBJCOPY) -O ihex $(OUTDIR)/$(TARGET_VER).elf $(OUTDIR)/$(TARGET_VER).hex @echo endef include $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/build.mk