X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=arm-makefile.inc;h=10b5090accfc57fce04d4aeb1b658877a9df4d39;hb=5e75eafde9b0269aa78395bbeb3e79ff36a1f082;hp=141ed42f91aa2f817bff94faf72dee3544beb9e2;hpb=f59c19cdaa2b415ea72a30083ee7df085c2a6ae9;p=arm-crypto-lib.git diff --git a/arm-makefile.inc b/arm-makefile.inc index 141ed42..10b5090 100644 --- a/arm-makefile.inc +++ b/arm-makefile.inc @@ -1,12 +1,13 @@ - +TOOLCHAIN = arm-none-eabi-# MCU_TARGET = cortex-m3 -OPTIMIZE = -O2 +OPTIMIZE = -O0 +DEBUG = -gdwarf-2 +WARNING = -pedantic -Wall -Wstrict-prototypes -Werror DEFS = -D$(call uc, $(subst -,_,$(MCU_TARGET))) -FLASHCMD = arm-elf-gdb -x gdb-flash # +FLASHCMD = $(TOOLCHAIN)gdb -x gdb-flash # DEP_DIR = deps/ TEST_DIR = test/ BIN_DIR = bin/ -TESTBIN_DIR = test_bin/ TESTSRC_DIR = test_src/ ERASECMD = TESTPORT = /dev/ttyUSB1 @@ -22,30 +23,30 @@ LIST_DIR = listings/# STAT_DIR = stats/# AUTOASM_DIR = autoasm/# AUTOASM_OPT = -S -CC = arm-elf-gcc +CC = $(TOOLCHAIN)gcc CSTD = gnu99 -override CFLAGS_A = -mthumb -ffunction-sections -fdata-sections -MMD \ +override CFLAGS_A = -fomit-frame-pointer \ + -mthumb -ffunction-sections -fdata-sections -MMD \ -MF$(DEP_DIR)$(patsubst %.o,%.d,$(notdir $(1))) \ - -I. -Itest_src -g -pedantic -std=$(CSTD) \ - -Wall $(OPTIMIZE) -Wstrict-prototypes \ - -mcpu=$(MCU_TARGET) $(DEFS) -override CFLAGS = -mthumb -ffunction-sections -fdata-sections -MMD \ + $(DEBUG) $(WARNING) -std=$(CSTD) $(OPTIMIZE) \ + -mcpu=$(MCU_TARGET) -Wa,-mthumb $(DEFS) +override CFLAGS = -fomit-frame-pointer \ + -mthumb -ffunction-sections -fdata-sections -MMD \ -MF$(DEP_DIR)$(patsubst %.o,%.d,$(notdir $@)) \ - -I. -Itest_src -g -pedantic -std=$(CSTD) \ - -Wall $(OPTIMIZE) -Wstrict-prototypes \ - -mcpu=$(MCU_TARGET) $(DEFS) + $(DEBUG) $(WARNING) -std=$(CSTD) $(OPTIMIZE) \ + -mcpu=$(MCU_TARGET) -Wa,-mthumb $(DEFS) override LDFLAGS = -g -T lm3s9b90.ld -Wl,--gc-sections \ -Wl,--entry=reset_isr -lc -lgcc \ - -Wl,-Map,# no space at the end -override ASFLAGS = -mthumb -mcpu=$(MCU_TARGET) -Wa,--g + -Wl,-Map,# no space at the end +override ASFLAGS = -mthumb -mcpu=$(MCU_TARGET) -Wa,--g -Wa,-mthumb SIZESTAT_FILE = sizestats.txt -OBJCOPY = arm-elf-objcopy -OBJDUMP = arm-elf-objdump -SIZE = arm-elf-size +OBJCOPY = $(TOOLCHAIN)objcopy +OBJDUMP = $(TOOLCHAIN)objdump +SIZE = $(TOOLCHAIN)size READELF = readelf RUBY = ruby GET_TEST = host/get_test.rb