aboutsummaryrefslogtreecommitdiff
path: root/AT91SAM7S256/armdebug/Host/libnxt-0.3/flash_write/Makefile
diff options
context:
space:
mode:
authorTC Wan2010-12-23 18:32:16 +0800
committerTC Wan2010-12-23 18:32:16 +0800
commit2ce74d88a2a894799dfb025e92806c61c5dd9612 (patch)
tree1c53d2b62e0ca58719813970259eaec90baa496b /AT91SAM7S256/armdebug/Host/libnxt-0.3/flash_write/Makefile
parent60c29d8cd77da30a72b3bbdab4472ad2ff987836 (diff)
parentc351d60d912c121b3c4e22b8b53e5d946bb5f748 (diff)
Merge branch 'master' of ssh://svc.cs.usm.my/~/gitrepo-bare/armdebug
Diffstat (limited to 'AT91SAM7S256/armdebug/Host/libnxt-0.3/flash_write/Makefile')
-rw-r--r--AT91SAM7S256/armdebug/Host/libnxt-0.3/flash_write/Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/AT91SAM7S256/armdebug/Host/libnxt-0.3/flash_write/Makefile b/AT91SAM7S256/armdebug/Host/libnxt-0.3/flash_write/Makefile
new file mode 100644
index 0000000..93bb888
--- /dev/null
+++ b/AT91SAM7S256/armdebug/Host/libnxt-0.3/flash_write/Makefile
@@ -0,0 +1,19 @@
+#all:
+# gcc -Wall -O0 -mcpu=arm7tdmi-s -mapcs -mthumb-interwork -o flash.o flash.c -nostartfiles -nodefaultlibs -nostdlib -Wl,-e,main
+# objcopy -Obinary -j.text flash.o flash.bin
+# objdump --disassemble-all -bbinary -marm7tdmi flash.bin > flash.asm
+#
+
+CC=`which arm-elf-gcc`
+AS=`which arm-elf-as`
+LD=`which arm-elf-ld`
+OBJCOPY=`which arm-elf-objcopy`
+
+all:
+ $(CC) -W -Wall -O3 -msoft-float -mcpu=arm7tdmi -mapcs -c -o flash.o flash.c
+ $(AS) --warn -mfpu=softfpa -mcpu=arm7tdmi -mapcs-32 -o crt0.o crt0.s
+ $(LD) -O3 --gc-sections crt0.o flash.o -o flash.elf
+ $(OBJCOPY) -O binary flash.elf flash.bin
+
+clean:
+ rm -f flash.o crt0.o flash.elf flash.bin