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

Subversion Repositories ion

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

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 24 ja_rd
# We'll run the simulation for 2000 clock cycles
6 49 ja_rd
SIM_LENGTH = 20000
7 2 ja_rd
 
8
clean:
9
        -$(RM) *.o *.obj *.map *.lst *.hex *.exe *.axf *.code *.data
10
 
11
hello:
12
        $(AS_MIPS) -o boot.o $(SRC_DIR)/common/boot.s
13
        $(GCC_MIPS) -o no_os.o $(SRC_DIR)/common/no_os.c
14
        $(GCC_MIPS) -o hello.o hello.c
15 49 ja_rd
        $(LD_MIPS) $(LFLAGS_BOOT) -Map hello.map -s -N -o hello.axf boot.o hello.o no_os.o
16 2 ja_rd
        -@$(DUMP_MIPS) -m mips --disassemble hello.axf > hello.lst
17
# Extract object code to be placed in code space (see link script)
18 49 ja_rd
        $(COPY_MIPS) -I elf32-big -O binary hello.axf hello.code
19
#       $(COPY_MIPS) -I elf32-big -j.text -O binary hello.axf hello.code
20 2 ja_rd
# Extract object code to be placed in data space (see link script)
21 49 ja_rd
        $(COPY_MIPS) -I elf32-big -j.data -j.bss -O binary hello.axf hello.data
22 2 ja_rd
 
23 49 ja_rd
 
24
# Create VHDL file for simulation test bench using TB2 template
25 34 ja_rd
hello_sim: hello
26
        $(TO_VHDL) --code hello.code --data hello.data \
27 49 ja_rd
                --code_size $(CODE_BRAM_SIZE) --data_size $(XRAM_SIZE) \
28
                -s $(SIM_LENGTH) -v $(SRC_DIR)\\mips_tb2_template.vhdl \
29
                -o $(TB_DIR)\\mips_tb2.vhdl -e mips_tb2
30 2 ja_rd
 
31 49 ja_rd
 
32 2 ja_rd
# Create VHDL file for hardware demo
33 34 ja_rd
hello_demo: hello
34
        $(TO_VHDL) --code hello.code --data hello.data \
35 49 ja_rd
        --code_size $(CODE_BRAM_SIZE) --data_size $(XRAM_SIZE) \
36
        -v $(SRC_DIR)/mips_mpu1_template.vhdl \
37
        -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.