OpenCores
URL https://opencores.org/ocsvn/ion/ion/trunk

Subversion Repositories ion

[/] [ion/] [trunk/] [src/] [hello/] [makefile] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ja_rd
 
2
# Get common makefile stuff (toolchain & system config)
3
include ../common/makefile
4
 
5
 
6
clean:
7
        -$(RM) *.o *.obj *.map *.lst *.hex *.exe *.axf *.code *.data
8
 
9
hello:
10
        $(AS_MIPS) -o boot.o $(SRC_DIR)/common/boot.s
11
        $(GCC_MIPS) -o no_os.o $(SRC_DIR)/common/no_os.c
12
        $(GCC_MIPS) -o hello.o hello.c
13
# NOTE: Startup code (boot.o) is linked in the link script;
14
        $(LD_MIPS) $(LFLAGS) -Map hello.map -s -N -o hello.axf hello.o no_os.o
15
        -@$(DUMP_MIPS) -m mips --disassemble hello.axf > hello.lst
16
 
17
 
18
# Extract object code to be placed in code space (see link script)
19
hello.code: hello
20
        $(COPY_MIPS) -I elf32-big -j.text -O binary hello.axf hello.code
21
 
22
# Extract object code to be placed in data space (see link script)
23
hello.data: hello
24
        $(COPY_MIPS) -I elf32-big -j.rodata -j.data -j.bss -O binary hello.axf hello.data
25
 
26
# Create VHDL file for simulation test bench
27
hello_sim: hello.code hello.data
28
        $(TO_VHDL) $(VHDL_FLAGS) --code hello.code --data hello.data \
29
        -v $(SRC_DIR)/mips_tb1_template.vhdl -o $(TB_DIR)/mips_tb1.vhdl -e mips_tb1
30
 
31
# Create VHDL file for hardware demo
32
hello_demo: hello.code hello.data
33
        $(TO_VHDL) $(VHDL_FLAGS) --code hello.code --data hello.data \
34
        -v $(SRC_DIR)/mips_mpu_template.vhdl -o $(DEMO_DIR)/mips_mpu.vhdl -e mips_mpu

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.