Move CRC value out of VCS
authorAsbjørn Sloth Tønnesen <asbjorn@asbjorn.biz>
Fri, 14 Jan 2011 21:26:05 +0000 (21:26 +0000)
committerAsbjørn Sloth Tønnesen <asbjorn@asbjorn.biz>
Fri, 14 Jan 2011 21:26:05 +0000 (21:26 +0000)
Signed-off-by: Asbjørn Sloth Tønnesen <asbjorn@asbjorn.biz>

src/.gitignore
src/Makefile
src/boards/lpc1768/startup.c
src/crc.tmpl.h [new file with mode: 0644]

index c97b852..2650ca0 100644 (file)
@@ -3,3 +3,4 @@
 *.map
 *.elf
 *.bin
+crc.h
index fbc9ad9..0022b3d 100644 (file)
@@ -15,7 +15,7 @@ depend=$(shell sh -c 'b=$$(echo $1|sed -e"s/\\.o$$//g");([ -f $$b.d ] \
        && sed -e":a;N;$$!ba;s/\\\\\\n//g" $$b.d|grep "^$$(basename $1):"\
        | cut -d: -f2)||echo $$b.c')
 
-all: crc
+all: crc.h crc
 
 $(PROJECT).elf: $(OBJECTS)
        $(PLATFORM)-ld -Map $(PROJECT).map $(LDFLAGS) $(OBJECTS) -o $@
@@ -31,10 +31,13 @@ $(PROJECT).elf: $(OBJECTS)
 .PHONY: clean gdb crc
 
 clean:
-       rm -f $(PROJECT).elf $(OBJECTS) $(OBJECTS:.o=.d) $(PROJECT).map
+       rm -f $(PROJECT).elf $(OBJECTS) $(OBJECTS:.o=.d) $(PROJECT).map crc.h
 
 gdb:
        $(PLATFORM)-gdb $(PROJECT).elf
 
 crc:   $(PROJECT).bin
-       ../tools/lpcrc/lpcrc.sh $(PROJECT).bin $(BPATH)/startup.c
+       ../tools/lpcrc/lpcrc.sh $(PROJECT).bin crc.h
+
+crc.h: crc.tmpl.h
+       cp crc.tmpl.h crc.h
index 0888b27..0bb2c69 100644 (file)
@@ -25,6 +25,8 @@
 //
 //*****************************************************************************
 
+#include "../../crc.h"
+
 #define WEAK __attribute__ ((weak))
 
 //*****************************************************************************
@@ -95,8 +97,6 @@ extern int main(void);
 //*****************************************************************************
 static unsigned long pulStack[64];
 
-#define CRC_CHECKSUM 0xeffffcbf
-
 //*****************************************************************************
 //
 // The vector table.  Note that the proper constructs must be placed on this to
diff --git a/src/crc.tmpl.h b/src/crc.tmpl.h
new file mode 100644 (file)
index 0000000..fb3cb14
--- /dev/null
@@ -0,0 +1 @@
+#define CRC_CHECKSUM 0x01234567