## the cpu to build for export CPU = stm32f1 export CPU_MODEL = stm32f103re # set the default port export PORT ?= /dev/ttyUSB0 # define tools used for building the project export PREFIX = arm-none-eabi- export CC = $(PREFIX)gcc export AR = $(PREFIX)ar export AS = $(PREFIX)as export LINK = $(PREFIX)gcc export SIZE = $(PREFIX)size export OBJCOPY = $(PREFIX)objcopy export TERMPROG = $(RIOTBASE)/dist/tools/pyterm/pyterm.py export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh export DEBUGGER = $(RIOTBOARD)/$(BOARD)/dist/debug.sh # define build specific options export CPU_USAGE = -mcpu=cortex-m3 export FPU_USAGE = export CFLAGS += -ggdb -g3 -std=gnu99 -Os -Wall -Wstrict-prototypes $(CPU_USAGE) $(FPU_USAGE) -mlittle-endian -mthumb -mthumb-interwork -nostartfiles export CFLAGS += -ffunction-sections -fdata-sections -fno-builtin export ASFLAGS += -ggdb -g3 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endian export LINKFLAGS += -ggdb -g3 -std=gnu99 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endian -static -lgcc -mthumb -mthumb-interwork -nostartfiles # $(LINKERSCRIPT) is specified in cpu/Makefile.include export LINKFLAGS += -T$(LINKERSCRIPT) export OFLAGS = -O ihex export FFLAGS = $(HEXFILE) export DEBUGGER_FLAGS = $(ELFFILE) # use the nano-specs of the NewLib when available ifeq ($(shell $(LINK) -specs=nano.specs -E - 2>/dev/null >/dev/null