]> git.cryptolib.org Git - arm-crypto-lib.git/blobdiff - arm-makefile.inc
added arcfour/rc4
[arm-crypto-lib.git] / arm-makefile.inc
index 10b5090accfc57fce04d4aeb1b658877a9df4d39..fe5f5dc58ac8f6641cd40aa5d785d59359824383 100644 (file)
@@ -4,7 +4,12 @@ OPTIMIZE       = -O0
 DEBUG          = -gdwarf-2
 WARNING        = -pedantic -Wall -Wstrict-prototypes -Werror
 DEFS           = -D$(call uc, $(subst -,_,$(MCU_TARGET)))
-FLASHCMD       = $(TOOLCHAIN)gdb -x gdb-flash  #
+FLASHCMD       = $(OPENOCD) -f openocd.cfg \
+                    -c "init" \
+                    -c "halt" \
+                    -c "flash write_image erase $(1) 0 bin" \
+                    -c "reset run" \
+                    -c "shutdown"
 DEP_DIR        = deps/
 TEST_DIR       = test/
 BIN_DIR        = bin/
@@ -30,23 +35,24 @@ override CFLAGS_A   = -fomit-frame-pointer  \
                       -mthumb -ffunction-sections -fdata-sections -MMD \
                       -MF$(DEP_DIR)$(patsubst %.o,%.d,$(notdir $(1)))  \
                       $(DEBUG) $(WARNING) -std=$(CSTD) $(OPTIMIZE)     \
-                      -mcpu=$(MCU_TARGET) -Wa,-mthumb $(DEFS) 
+                      -mcpu=$(MCU_TARGET) $(DEFS) 
 override CFLAGS        = -fomit-frame-pointer   \
                       -mthumb -ffunction-sections -fdata-sections -MMD \
                       -MF$(DEP_DIR)$(patsubst %.o,%.d,$(notdir $@))    \
                       $(DEBUG) $(WARNING) -std=$(CSTD) $(OPTIMIZE)     \
-                      -mcpu=$(MCU_TARGET) -Wa,-mthumb $(DEFS)  
+                      -mcpu=$(MCU_TARGET) $(DEFS) 
 
 override LDFLAGS       = -g -T lm3s9b90.ld -Wl,--gc-sections    \
-                         -Wl,--entry=reset_isr -lc -lgcc        \
+                         -Wl,--entry=reset_isr -lc -lgcc    \
                           -Wl,-Map,# no space at the end
-override ASFLAGS          = -mthumb -mcpu=$(MCU_TARGET) -Wa,--g -Wa,-mthumb
+override ASFLAGS          =  -mcpu=$(MCU_TARGET) 
 
 SIZESTAT_FILE = sizestats.txt
 
 OBJCOPY         = $(TOOLCHAIN)objcopy
 OBJDUMP         = $(TOOLCHAIN)objdump
 SIZE            = $(TOOLCHAIN)size
+OPENOCD         = openocd
 READELF         = readelf
 RUBY            = ruby
 GET_TEST        = host/get_test.rb