aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordave2007-01-03 09:31:32 +0000
committerdave2007-01-03 09:31:32 +0000
commitdf0b8b6664b3b8c41b49b23ecedf530ccc2a4e4c (patch)
tree8e53262592ff8b526de9565f893a2c4f4a09c1e4
parentf863a32b28ca56e92ca816c45d9ac483f304d44a (diff)
Move the Atmel-provided register definition file to support/, and
tweak crt0's Makefile to work with this setup.
-rw-r--r--crt0/Makefile9
-rw-r--r--support/at91sam7s256.h (renamed from crt0/at91sam7s256.h)0
2 files changed, 6 insertions, 3 deletions
diff --git a/crt0/Makefile b/crt0/Makefile
index a03ea96..45a3eeb 100644
--- a/crt0/Makefile
+++ b/crt0/Makefile
@@ -13,16 +13,19 @@ LD=$(TOOL_PREFIX)ld
OBJCOPY=$(TOOL_PREFIX)objcopy
OBJDUMP=$(TOOL_PREFIX)objdump
+CCFLAGS=-W -Wall -O2 -mcpu=arm7tdmi -mapcs -mthumb-interwork -I../support
+ASFLAGS=-W -Wall -O2 -Wa,-mcpu=arm7tdmi,-mapcs-32,-mthumb-interwork
+
all: crt0.o
crt0.o: crt0_s.o crt0_c.o crt0.lds
$(LD) -N -O2 -T crt0.lds -r crt0_s.o crt0_c.o -o crt0.o
crt0_s.o: crt0_s.S
- $(GCC) -W -Wall -O2 -Wa,-mcpu=arm7tdmi,-mapcs-32,-mthumb-interwork -c -o $@ $<
+ $(GCC) $(ASFLAGS) -c -o $@ $<
crt0_c.o: crt0_c.c
- $(GCC) -W -Wall -O2 -mcpu=arm7tdmi -mapcs -mthumb-interwork -c -o $@ $<
+ $(GCC) $(CCFLAGS) -c -o $@ $<
%.bin: %.elf
$(OBJCOPY) -O binary -R .bss $< $@
@@ -33,7 +36,7 @@ crt0_c.o: crt0_c.c
$(OBJDUMP) --disassemble-all -m arm7tdmi $@ > $@.asm
%.o: %.c
- $(GCC) -W -Wall -O2 -mcpu=arm7tdmi -mapcs -mthumb-interwork -c -o $@ $<
+ $(GCC) $(CCFLAGS) -c -o $@ $<
clean:
rm -f *.o *.asm *.bin *.elf *~
diff --git a/crt0/at91sam7s256.h b/support/at91sam7s256.h
index 3c5d544..3c5d544 100644
--- a/crt0/at91sam7s256.h
+++ b/support/at91sam7s256.h