From: Asbjørn Sloth Tønnesen Date: Fri, 14 Jan 2011 21:26:05 +0000 (+0000) Subject: Move CRC value out of VCS X-Git-Url: http://git.asbjorn.biz/?p=rapper.git;a=commitdiff_plain;h=626209dbba411cb9604a02fcb02cb2c5f6cec0ff Move CRC value out of VCS Signed-off-by: Asbjørn Sloth Tønnesen --- diff --git a/src/.gitignore b/src/.gitignore index c97b852..2650ca0 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -3,3 +3,4 @@ *.map *.elf *.bin +crc.h diff --git a/src/Makefile b/src/Makefile index fbc9ad9..0022b3d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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 diff --git a/src/boards/lpc1768/startup.c b/src/boards/lpc1768/startup.c index 0888b27..0bb2c69 100644 --- a/src/boards/lpc1768/startup.c +++ b/src/boards/lpc1768/startup.c @@ -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 index 0000000..fb3cb14 --- /dev/null +++ b/src/crc.tmpl.h @@ -0,0 +1 @@ +#define CRC_CHECKSUM 0x01234567