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

Subversion Repositories ion

[/] [ion/] [trunk/] [src/] [adventure/] [makefile] - Blame information for rev 164

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

Line No. Rev Author Line
1 90 ja_rd
# External memory test -- build simulation and execution VHDL modules
2
 
3
 
4
# Get common makefile stuff (toolchain & system config)
5
include ..\\common\\makefile
6
 
7
# We'll run the simulation for long enough to complete the test
8 143 ja_rd
SIM_LENGTH = 400000000
9 90 ja_rd
 
10
# FPGA Block RAM parameters
11
BRAM_START = 0xbfc00000
12
CODE_BRAM_SIZE = 2048
13
# External RAM parameters (size in words)
14
XRAM_SIZE = 200000
15
XRAM_START = 0x00000000
16
#
17
FLASH_START = 0xb0000000
18
FLASH_SIM_SIZE = 65536
19
 
20
 
21
LFLAGS_BOOTSTRAP = -Ttext $(BRAM_START) -Tdata $(XRAM_START) -eentry -I elf32-big
22
#LFLAGS_FLASH = -Ttext $(FLASH_START) -Tdata $(XRAM_START) -eentry -I elf32-big
23
LFLAGS_FLASH = -Tflash.lds -eentry -I elf32-big
24
 
25
 
26
clean:
27
        -$(RM) *.o *.obj *.map *.lst *.hex *.exe *.axf *.code *.data *.bin
28
 
29
 
30
adventure: actions1.c actions2.c main.c init.c misc.c score.c adv_baremetal.c
31
        $(AS_MIPS) -o startup.o $(SRC_DIR)/common/startup.s
32
        $(GCC_MIPS) $(CFLAGS) -o baremetal.o $(SRC_DIR)/common/baremetal.c
33
        $(GCC_MIPS) $(CFLAGS) -o actions1.o actions1.c
34
        $(GCC_MIPS) $(CFLAGS) -o main.o main.c
35
        $(GCC_MIPS) $(CFLAGS) -o actions2.o actions2.c
36
        $(GCC_MIPS) $(CFLAGS) -o init.o init.c
37
        $(GCC_MIPS) $(CFLAGS) -c -g -Wa,-a,-ad -o init.o init.c > init.lst
38
        $(GCC_MIPS) $(CFLAGS) -o misc.o misc.c
39
        $(GCC_MIPS) $(CFLAGS) -o score.o score.c
40
        $(GCC_MIPS) $(CFLAGS) -o adv_baremetal.o adv_baremetal.c
41
        $(LD_MIPS) $(LFLAGS_FLASH) -Map adventure.map -s -N -o adventure.axf startup.o \
42
            main.o actions1.o actions2.o init.o misc.o score.o baremetal.o adv_baremetal.o
43
        -@$(DUMP_MIPS) -m mips --disassemble adventure.axf > adventure.lst
44
# Extract object code to be placed in code space
45
        $(COPY_MIPS) -I elf32-big -O binary adventure.axf adventure.bin
46
 
47
 
48
 
49
bootstrap: bootstrap.s
50
        $(AS_MIPS) -defsym XRAM_BASE=$(XRAM_START) -o bootstrap.o bootstrap.s
51
        $(LD_MIPS) $(LFLAGS_BOOTSTRAP) -Map bootstrap.map -s -N -o bootstrap.axf bootstrap.o
52
        -@$(DUMP_MIPS) -I elf32-big --disassemble bootstrap.axf > bootstrap.lst
53
        $(COPY_MIPS) -I elf32-big -j .text -j .rodata -O binary bootstrap.axf bootstrap.code
54
        $(COPY_MIPS) -I elf32-big -j .sbss -j .data -j .bss -O binary bootstrap.axf bootstrap.data
55
 
56
 
57
 
58
# Create VHDL file for simulation test bench using TB2 template
59
adventure_sim: bootstrap adventure
60 143 ja_rd
        $(TO_VHDL) --code bootstrap.code --log_trigger=b0000000 \
61 90 ja_rd
                --flash adventure.bin --flash_size $(FLASH_SIM_SIZE) \
62
                --code_size $(CODE_BRAM_SIZE) --data_size $(XRAM_SIZE) \
63
                -s $(SIM_LENGTH) -v $(SRC_DIR)\\mips_tb2_template.vhdl \
64
                -o $(TB_DIR)\\mips_tb2.vhdl -e mips_tb2
65
 
66
 
67
# Create VHDL file for hardware demo
68
adventure_demo: bootstrap adventure
69
        $(TO_VHDL) --code bootstrap.code \
70
        --code_size $(CODE_BRAM_SIZE) --data_size $(XRAM_SIZE) \
71
        -v $(SRC_DIR)/mips_mpu1_template.vhdl \
72
        -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.