# ***************** Makefile ****************************************** # SBC-DBG sample program for ARMCortex-A9. # The program demonstrates program running at Elcore dsp core. # # (c) OJSC ELVEES, multicore.ru # # ******************************************************************* PROC=arm TYPE=none-eabi LDSCRIPT=final.xl TARGET = test # arm tools CC=$(PROC)-$(TYPE)-gcc AS=$(PROC)-$(TYPE)-as AR=$(PROC)-$(TYPE)-ar LD=$(PROC)-$(TYPE)-ld NM=$(PROC)-$(TYPE)-nm OBJDUMP=$(PROC)-$(TYPE)-objdump OBJCOPY=$(PROC)-$(TYPE)-objcopy CPPFLAGS= CFLAGS=-g -O0 -c -mcpu=cortex-a9 -std=gnu99 #elcore tools DSP_LD = elcore-elvis-elf-ld DSP_AS = elcore-elvis-elf-as ELCOPY = elcopy DSP_OBJCOPY = elcore-elvis-elf-objcopy DSP_OBJDUMP = elcore-elvis-elf-objdump $(TARGET): arm dsp Makefile $(LDSCRIPT) $(LD) -g -v -T $(LDSCRIPT) -Map $@.map -o $@ startup.o reset.o udsp $(OBJDUMP) -D $@ > $@.dis arm: $(CC) $(CFLAGS) -g -c -o startup.o startup.c $(CC) -g -c -mcpu=cortex-a9 -mfpu=neon -o reset.o reset.s dsp: $(DSP_AS) -mcx7 -o dsp.o dsp.s $(DSP_LD) -e 0 -t -N -T dspu.xl dsp.o -o udsp.o $(ELCOPY) -L xxx --arm udsp.o udsp .PHONY: compile all clean arm dsp all: compile compile: $(TARGET) clean: rm -rf udsp *.o $(TARGET) $(TARGET).dis $(TARGET).map