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

Subversion Repositories ion

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

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
SIM_LENGTH = 2000
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
# NOTE: Startup code (boot.o) is linked in the link script;
16 34 ja_rd
        $(LD_MIPS) $(LFLAGS_BARE) -Map hello.map -s -N -o hello.axf hello.o no_os.o
17 2 ja_rd
        -@$(DUMP_MIPS) -m mips --disassemble hello.axf > hello.lst
18
# Extract object code to be placed in code space (see link script)
19
        $(COPY_MIPS) -I elf32-big -j.text -O binary hello.axf hello.code
20
# Extract object code to be placed in data space (see link script)
21
        $(COPY_MIPS) -I elf32-big -j.rodata -j.data -j.bss -O binary hello.axf hello.data
22
 
23
# Create VHDL file for simulation test bench
24 34 ja_rd
hello_sim: hello
25
        $(TO_VHDL) --code hello.code --data hello.data \
26
                --code_size $(CODE_BRAM_SIZE) --data_size $(DATA_BRAM_SIZE) \
27 24 ja_rd
                -s $(SIM_LENGTH) -v $(SRC_DIR)/mips_tb1_template.vhdl \
28
                -o $(TB_DIR)/mips_tb1.vhdl -e mips_tb1
29 2 ja_rd
 
30
# Create VHDL file for hardware demo
31 34 ja_rd
hello_demo: hello
32
        $(TO_VHDL) --code hello.code --data hello.data \
33
                --code_size $(CODE_BRAM_SIZE) --data_size $(DATA_BRAM_SIZE) \
34
                -v $(SRC_DIR)/mips_mpu_template.vhdl \
35 24 ja_rd
                -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.