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

Subversion Repositories riscv_vhdl

[/] [riscv_vhdl/] [trunk/] [examples/] [dhrystone21/] [makefiles/] [make_arm] - Blame information for rev 5

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 sergeykhbr
include makeutil.mak
2
 
3
CC=arm-none-eabi-gcc
4
CPP=arm-none-eabi-gcc
5
OBJDUMP=arm-none-eabi-objdump
6
 
7
CFLAGS= -c -g -fPIC -O0 -marm -mfloat-abi=soft -mcpu=cortex-r5 -DCONFIG_RISCV64
8
LDFLAGS=-static -T test_arm.ld -nostartfiles -DCONFIG_RISCV64
9
INCL_KEY=-I
10
DIR_KEY=-B
11
 
12
INCL_PATH=\
13
        $(TOP_DIR)common \
14
        $(TOP_DIR)dhrystone21/src
15
 
16
# source files directories list:
17
SRC_PATH = \
18
        $(TOP_DIR)dhrystone21/src \
19
        $(TOP_DIR)dhrystone21/src/dhry
20
 
21
LIB_NAMES = \
22
        gcc \
23
        stdc++ \
24
        c \
25
        m
26
 
27
VPATH = $(SRC_PATH)
28
 
29
SOURCES = uart \
30
        dhry_1 \
31
        dhry_2 \
32
        stdtool \
33
        main
34
 
35
OBJ_FILES = $(addsuffix .o,$(SOURCES))
36
EXECUTABLE = dhrystone21
37
ELFFILE = $(EXECUTABLE).elf
38
DUMPFILE = $(EXECUTABLE).dump
39
HEXFILE = $(EXECUTABLE).hex
40
LSTFILE = $(EXECUTABLE).lst
41
 
42
all: arm
43
 
44
.PHONY: $(EXECUTABLE) $(DUMPFILE)
45
 
46
 
47
arm: $(ELFFILE) $(DUMPFILE) $(HEXFILE)
48
$(HEXFILE): $(ELFFILE)
49
        echo elf2raw32 $(addprefix $(ELF_DIR)/,$<) -h -f 262144 -l 8 -o $(addprefix $(ELF_DIR)/,$(EXECUTABLE).hex)
50
        elf2raw32 $(addprefix $(ELF_DIR)/,$<) -h -f 262144 -l 8 -o $(addprefix $(ELF_DIR)/,$(EXECUTABLE).hex)
51
 
52
$(DUMPFILE): $(ELFFILE)
53
        echo $(OBJDUMP) --disassemble-all --disassemble-zeroes --section=.text --section=.text.startup --section=.data $(addprefix $(ELF_DIR)/,$<) > $(addprefix $(ELF_DIR)/,$@)
54
        $(OBJDUMP) --disassemble-all --disassemble-zeroes --section=.text --section=.text.startup --section=.data $(addprefix $(ELF_DIR)/,$<) > $(addprefix $(ELF_DIR)/,$@)
55
        $(OBJDUMP) -S $(addprefix $(ELF_DIR)/,$<) > $(addprefix $(ELF_DIR)/,$(LSTFILE))
56
 
57
 
58
$(ELFFILE): $(OBJ_FILES)
59
        echo $(CPP) $(LDFLAGS) $(addprefix $(OBJ_DIR)/,$(OBJ_FILES)) -o $(addprefix $(ELF_DIR)/,$@) $(addprefix -l,$(LIB_NAMES))
60
        $(CPP) $(LDFLAGS) $(addprefix $(OBJ_DIR)/,$(OBJ_FILES)) -o $(addprefix $(ELF_DIR)/,$@) $(addprefix -l,$(LIB_NAMES))
61
        $(ECHO) "\n  Dhrystone v2.1 Coretx-R5 has been built successfully.\n"
62
 
63
#.cpp.o:
64
%.o: %.cpp
65
        echo $(CPP) $(CFLAGS) $(addprefix $(INCL_KEY),$(INCL_PATH)) $< -o $(addprefix $(OBJ_DIR)/,$@)
66
        $(CPP) $(CFLAGS) $(addprefix $(INCL_KEY),$(INCL_PATH)) $< -o $(addprefix $(OBJ_DIR)/,$@)
67
 
68
#.c.o:
69
%.o: %.c
70
        echo $(CC) $(CFLAGS) $(addprefix $(INCL_KEY),$(INCL_PATH)) $< -o $(addprefix $(OBJ_DIR)/,$@)
71
        $(CC) $(CFLAGS) $(addprefix $(INCL_KEY),$(INCL_PATH)) $< -o $(addprefix $(OBJ_DIR)/,$@)
72
 
73
%.o: %.s
74
        echo $(CC) $(CFLAGS) -D__ASSEMBLY__=1 $(addprefix $(INCL_KEY),$(INCL_PATH)) $< -o $(addprefix $(OBJ_DIR)/,$@)
75
        $(CC) $(CFLAGS) -D__ASSEMBLY__=1 $(addprefix $(INCL_KEY),$(INCL_PATH)) $< -o $(addprefix $(OBJ_DIR)/,$@)
76
 

powered by: WebSVN 2.1.0

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