]> git.cryptolib.org Git - arm-crypto-lib.git/blob - arm-makefile.inc
adding trivium
[arm-crypto-lib.git] / arm-makefile.inc
1 TOOLCHAIN      = arm-none-eabi-#
2 MCU_TARGET     = cortex-m3  
3 OPTIMIZE       = -O0
4 DEBUG          = -gdwarf-2
5 WARNING        = -pedantic -Wall -Wstrict-prototypes -Werror
6 DEFS           = -D$(call uc, $(subst -,_,$(MCU_TARGET)))
7 FLASHCMD       = $(OPENOCD) -f openocd.cfg \
8                      -c "init" \
9                      -c "halt" \
10                      -c "flash write_image erase $(1) 0 bin" \
11                      -c "reset run" \
12                      -c "shutdown"
13 DEP_DIR        = deps/
14 TEST_DIR       = test/
15 BIN_DIR        = bin/
16 TESTSRC_DIR    = test_src/
17 ERASECMD       =
18 TESTPORT       = /dev/ttyUSB1
19 TESTPORTBAUDR  = 115200
20 TESTLOG_DIR    = testlog/#
21 TESTPREFIX     = nessie-
22 SPEEDTOOL      = host/get_performance.rb
23 SPEEDLOG_DIR   = speed_log/
24 SPEEDPREFIX    =
25 SPEEDCMD       = performance
26 SIZE_DIR       = size_log/#
27 LIST_DIR       = listings/#
28 STAT_DIR       = stats/#
29 AUTOASM_DIR    = autoasm/#
30 AUTOASM_OPT    = -S
31 CC             = $(TOOLCHAIN)gcc
32 CSTD           = gnu99
33
34 override CFLAGS_A       = -fomit-frame-pointer  \
35                       -mthumb -ffunction-sections -fdata-sections -MMD \
36                       -MF$(DEP_DIR)$(patsubst %.o,%.d,$(notdir $(1)))  \
37                       $(DEBUG) $(WARNING) -std=$(CSTD) $(OPTIMIZE)     \
38                       -mcpu=$(MCU_TARGET) $(DEFS) 
39 override CFLAGS         = -fomit-frame-pointer   \
40                       -mthumb -ffunction-sections -fdata-sections -MMD \
41                       -MF$(DEP_DIR)$(patsubst %.o,%.d,$(notdir $@))    \
42                       $(DEBUG) $(WARNING) -std=$(CSTD) $(OPTIMIZE)     \
43                       -mcpu=$(MCU_TARGET) $(DEFS) 
44
45 override LDFLAGS       = -g -T lm3s9b90.ld -Wl,--gc-sections    \
46                          -Wl,--entry=reset_isr -lc -lgcc    \
47                           -Wl,-Map,# no space at the end
48 override ASFLAGS           =  -mcpu=$(MCU_TARGET) 
49
50 SIZESTAT_FILE = sizestats.txt
51
52 OBJCOPY         = $(TOOLCHAIN)objcopy
53 OBJDUMP         = $(TOOLCHAIN)objdump
54 SIZE            = $(TOOLCHAIN)size
55 OPENOCD         = openocd
56 READELF         = readelf
57 RUBY            = ruby
58 GET_TEST        = host/get_test.rb
59 MAKE            = make
60 MAKE2GRAPH      = ~/bin/make2graph.rb
61 TWOPI           = twopi