forked from auracaster/openocd
xscale: Move debug handler to contrib/loaders
Avoid special rules to generate array at compile time by shipping the generated file. Convert to Makefile build like the other loaders. Change-Id: I5a05edddcfaff3d395086cd3aa33120f8a7aa9dc Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3864 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
This commit is contained in:
committed by
Paul Fertser
parent
cdba6ba0ad
commit
1039ed3ff2
33
contrib/loaders/debug/xscale/Makefile
Normal file
33
contrib/loaders/debug/xscale/Makefile
Normal file
@@ -0,0 +1,33 @@
|
||||
BIN2C = ../../../../src/helper/bin2char.sh
|
||||
|
||||
CROSS_COMPILE ?= arm-none-eabi-
|
||||
|
||||
CC=$(CROSS_COMPILE)gcc
|
||||
OBJCOPY=$(CROSS_COMPILE)objcopy
|
||||
OBJDUMP=$(CROSS_COMPILE)objdump
|
||||
|
||||
CFLAGS = -static -nostartfiles -mlittle-endian -Wa,-EL
|
||||
LDFLAGS = -Tdebug_handler.ld
|
||||
|
||||
all: debug_handler.inc
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
.INTERMEDIATE: debug_handler.elf
|
||||
|
||||
debug_handler.elf: protocol.h
|
||||
|
||||
%.elf: %.S
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
|
||||
|
||||
%.lst: %.elf
|
||||
$(OBJDUMP) -S $< > $@
|
||||
|
||||
%.bin: %.elf
|
||||
$(OBJCOPY) -Obinary $< $@
|
||||
|
||||
%.inc: %.bin
|
||||
$(BIN2C) < $< > $@
|
||||
|
||||
clean:
|
||||
-rm -f *.elf *.lst *.bin *.inc
|
||||
Reference in New Issue
Block a user