summaryrefslogtreecommitdiff
path: root/ecosflash/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'ecosflash/Makefile')
-rw-r--r--ecosflash/Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/ecosflash/Makefile b/ecosflash/Makefile
new file mode 100644
index 00000000..dfff37c2
--- /dev/null
+++ b/ecosflash/Makefile
@@ -0,0 +1,11 @@
+# Create OpenOCD eCos flash driver
+# Syntax: make INSTALL_DIR=ecosinstalldir OUTPUT=outputname
+
+include $(INSTALL_DIR)/include/pkgconf/ecos.mak
+
+all:
+ $(ECOS_COMMAND_PREFIX)gcc $(ECOS_GLOBAL_CFLAGS) $(ECOS_GLOBAL_LDFLAGS) -g -o debug_$(OUTPUT).elf -nostdlib flash.S flash.c -Wl,--gc-sections -I$(INSTALL_DIR)/include -Wl,$(INSTALL_DIR)/lib/libtarget.a -Wl,-Map,flash.map
+ cp debug_$(OUTPUT).elf $(OUTPUT).elf
+ $(ECOS_COMMAND_PREFIX)strip $(OUTPUT).elf
+ echo Flash driver $(OUTPUT).elf
+