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

Subversion Repositories steelcore

[/] [coremark/] [steel/] [core_portme.mak] - Blame information for rev 11

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 11 rafaelcalc
# Copyright 2018 Embedded Microprocessor Benchmark Consortium (EEMBC)
2
#
3
# Licensed under the Apache License, Version 2.0 (the "License");
4
# you may not use this file except in compliance with the License.
5
# You may obtain a copy of the License at
6
#
7
#    http://www.apache.org/licenses/LICENSE-2.0
8
#
9
# Unless required by applicable law or agreed to in writing, software
10
# distributed under the License is distributed on an "AS IS" BASIS,
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
# See the License for the specific language governing permissions and
13
# limitations under the License.
14
#
15
# Original Author: Shay Gal-on
16
 
17
#File : core_portme.mak
18
 
19
# Flag : OUTFLAG
20
#       Use this flag to define how to to get an executable (e.g -o)
21
OUTFLAG= -o
22
# Flag : CC
23
#       Use this flag to define compiler to use
24
CC              = riscv32-unknown-elf-gcc
25
# Flag : LD
26
#       Use this flag to define compiler to use
27
LD              = riscv32-unknown-elf-ld
28
# Flag : AS
29
#       Use this flag to define compiler to use
30
AS              = riscv32-unknown-elf-as
31
# Flag : CFLAGS
32
#       Use this flag to define compiler options. Note, you can add compiler options from the command line using XCFLAGS="other flags"
33
PORT_CFLAGS = -Ttext 0x00000000 -O2
34
FLAGS_STR = "$(PORT_CFLAGS) $(XCFLAGS) $(XLFLAGS) $(LFLAGS_END)"
35
CFLAGS = $(PORT_CFLAGS) -I$(PORT_DIR) -I. -DFLAGS_STR=\"$(FLAGS_STR)\"
36
#Flag : LFLAGS_END
37
#       Define any libraries needed for linking or other flags that should come at the end of the link line (e.g. linker scripts).
38
#       Note : On certain platforms, the default clock_gettime implementation is supported but requires linking of librt.
39
#SEPARATE_COMPILE=1
40
# Flag : SEPARATE_COMPILE
41
# You must also define below how to create an object file, and how to link.
42
OBJOUT  = -o
43
LFLAGS  =
44
ASFLAGS =
45
OFLAG   = -o
46
COUT    = -c
47
 
48
LFLAGS_END =
49
# Flag : PORT_SRCS
50
#       Port specific source files can be added here
51
#       You may also need cvt.c if the fcvt functions are not provided as intrinsics by your compiler!
52
PORT_SRCS = $(PORT_DIR)/core_portme.c $(PORT_DIR)/ee_printf.c
53
vpath %.c $(PORT_DIR)
54
vpath %.s $(PORT_DIR)
55
 
56
# Flag : LOAD
57
#       For a simple port, we assume self hosted compile and run, no load needed.
58
 
59
# Flag : RUN
60
#       For a simple port, we assume self hosted compile and run, simple invocation of the executable
61
 
62
LOAD = echo "Please set LOAD to the process of loading the executable to the flash"
63
RUN = echo "Please set LOAD to the process of running the executable (e.g. via jtag, or board reset)"
64
 
65
OEXT = .o
66
EXE = .bin
67
 
68
$(OPATH)$(PORT_DIR)/%$(OEXT) : %.c
69
        $(CC) $(CFLAGS) $(XCFLAGS) $(COUT) $< $(OBJOUT) $@
70
 
71
$(OPATH)%$(OEXT) : %.c
72
        $(CC) $(CFLAGS) $(XCFLAGS) $(COUT) $< $(OBJOUT) $@
73
 
74
$(OPATH)$(PORT_DIR)/%$(OEXT) : %.s
75
        $(AS) $(ASFLAGS) $< $(OBJOUT) $@
76
 
77
# Target : port_pre% and port_post%
78
# For the purpose of this simple port, no pre or post steps needed.
79
 
80
.PHONY : port_prebuild port_postbuild port_prerun port_postrun port_preload port_postload
81
port_pre% port_post% :
82
 
83
# FLAG : OPATH
84
# Path to the output folder. Default - current folder.
85
OPATH = ./
86
MKDIR = mkdir -p
87
 

powered by: WebSVN 2.1.0

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