# Define the cpu used by the CC2538DK board: export CPU = cc2538 export CPU_MODEL ?= cc2538nf53 # 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 OBJDUMP = $(PREFIX)objdump export TERMPROG ?= $(RIOTBASE)/dist/tools/pyterm/pyterm # Define the flash-tool and default port: export FLASHER ?= python $(RIOTBOARD)/$(BOARD)/dist/cc2538-bsl.py export PORT ?= /dev/ttyUSB1 # Define build specific options: export CPU_USAGE = -mcpu=cortex-m3 export ASFLAGS += -ggdb -g3 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endian export CFLAGS += $(ASFLAGS) -std=gnu99 -mthumb -mthumb-interwork -nostartfiles -Os -Wall -Wstrict-prototypes -ffunction-sections -fdata-sections -fno-builtin export LINKFLAGS += $(CFLAGS) -static -lgcc -T$(LINKERSCRIPT) -L$(RIOTCPU)/$(CPU) export OFLAGS += -O binary --gap-fill 0xff export FFLAGS += -p "$(PORT)" -e -w -v bin/$(BOARD)/$(APPLICATION).hex export TERMFLAGS += -p "$(PORT)" export OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb # Use the nano-specs of the NewLib when available: ifeq ($(shell $(LINK) -specs=nano.specs -E - 2>/dev/null >/dev/null