1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/boards/spark-core/Makefile.include

48 lines
1.8 KiB
Makefile
Raw Normal View History

2014-09-17 15:08:57 +02:00
## the cpu to build for
export CPU = stm32f1
export CPU_MODEL = stm32f103cb
# set the default port
export PORT ?= /dev/ttyUSB0
export BINFILE = $(patsubst %.elf,%.bin,$(ELFFILE))
# define tools used for building the project
export PREFIX = arm-none-eabi-
export CC = $(PREFIX)gcc
2014-11-18 18:15:51 +01:00
export CXX = $(PREFIX)g++
2014-09-17 15:08:57 +02:00
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
export FLASHER = dfu-util
2014-09-17 15:08:57 +02:00
export DEBUGGER = # spark core has no debugger
export RESET = # dfu-util has no support for resetting the device
# 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 -mno-thumb-interwork -nostartfiles
2014-09-17 15:08:57 +02:00
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 -mno-thumb-interwork -nostartfiles
2014-09-17 15:08:57 +02:00
# $(LINKERSCRIPT) is specified in cpu/Makefile.include
export LINKFLAGS += -T$(LINKERSCRIPT)
export OFLAGS = -O binary
export FFLAGS = -d 1d50:607f -a 0 -s 0x08005000:leave -D "$(HEXFILE)"
2014-09-17 15:08:57 +02:00
export TERMFLAGS = -p $(PORT)
2014-11-18 18:15:51 +01:00
# unwanted (CXXUWFLAGS) and extra (CXXEXFLAGS) flags for c++
export CXXUWFLAGS +=
export CXXEXFLAGS +=
2014-09-17 15:08:57 +02:00
# use the nano-specs of the NewLib when available
ifeq ($(shell $(LINK) -specs=nano.specs -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)
export LINKFLAGS += -specs=nano.specs -lc -lnosys
endif
# export board specific includes to the global includes-listing
export INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include/ -I$(RIOTBASE)/drivers/at86rf231/include -I$(RIOTBASE)/sys/net/include