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-m7 -mthumb -mlittle-endian -mfpu=fpv5-sp-d16 -mfloat-abi=hard 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_CM7 PLATFORM_CXXFLAGS = $(PLATFORM_CFLAGS) -fno-rtti -fno-exceptions -fno-use-cxa-atexit PLATFORM_LDFLAGS = -nostdlib -nostartfiles -nodefaultlibs -Wl,-static,-gc-sections GEN_SYM = yes GEN_LST = yes GEN_SIZE = yes STRIP_ELF = no include $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/build.mk $(OUTDIR)/$(TARGET_VER).hex: $(OUTDIR)/$(TARGET_VER).elf | $(OUTDIR)/ $(OBJCOPY) -O ihex $(OUTDIR)/$(TARGET_VER).elf $(OUTDIR)/$(TARGET_VER).hex @echo