URL
https://opencores.org/ocsvn/ion/ion/trunk
[/] [ion/] [trunk/] [src/] [hello/] [makefile] - Blame information for rev 26
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 |
|
|
$(LD_MIPS) $(LFLAGS) -Map hello.map -s -N -o hello.axf hello.o no_os.o
|
17 |
|
|
-@$(DUMP_MIPS) -m mips --disassemble hello.axf > hello.lst
|
18 |
|
|
|
19 |
|
|
|
20 |
|
|
# Extract object code to be placed in code space (see link script)
|
21 |
|
|
hello.code: hello
|
22 |
|
|
$(COPY_MIPS) -I elf32-big -j.text -O binary hello.axf hello.code
|
23 |
|
|
|
24 |
|
|
# Extract object code to be placed in data space (see link script)
|
25 |
|
|
hello.data: hello
|
26 |
|
|
$(COPY_MIPS) -I elf32-big -j.rodata -j.data -j.bss -O binary hello.axf hello.data
|
27 |
|
|
|
28 |
|
|
# Create VHDL file for simulation test bench
|
29 |
|
|
hello_sim: hello.code hello.data
|
30 |
|
|
$(TO_VHDL) $(VHDL_FLAGS) --code hello.code --data hello.data \
|
31 |
24 |
ja_rd |
-s $(SIM_LENGTH) -v $(SRC_DIR)/mips_tb1_template.vhdl \
|
32 |
|
|
-o $(TB_DIR)/mips_tb1.vhdl -e mips_tb1
|
33 |
2 |
ja_rd |
|
34 |
|
|
# Create VHDL file for hardware demo
|
35 |
|
|
hello_demo: hello.code hello.data
|
36 |
|
|
$(TO_VHDL) $(VHDL_FLAGS) --code hello.code --data hello.data \
|
37 |
24 |
ja_rd |
-v $(SRC_DIR)/mips_mpu_template.vhdl
|
38 |
|
|
-o $(DEMO_DIR)/mips_mpu.vhdl -e mips_mpu
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.