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

Subversion Repositories ion

[/] [ion/] [trunk/] [src/] [common/] [makefile] - Blame information for rev 202

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

Line No. Rev Author Line
1 2 ja_rd
#-------------------------------------------------------------------------------
2
# This makefile does not contain any targets, only definitions used by the
3
# makefiles of all the code samples.
4
# It is meant to be included and not used standalone.
5
#-------------------------------------------------------------------------------
6 34 ja_rd
# SYSTEM PARAMETERS
7
#
8 66 ja_rd
# You can define here the default size and address of the memory blocks of the
9
# system as seen by the linker, though you can't change the number and type of
10
# blocks here (see /vhdl/mips_cache_*.vhdl and /vhdl/mips_pkg.vhdl).
11 34 ja_rd
#
12 66 ja_rd
# The samples' makefiles will probably redefine the values, anyway.
13 2 ja_rd
#
14
#-------------------------------------------------------------------------------
15 66 ja_rd
# NOTE:
16
# A link script '/src/ion_noxram.lds' was used in previous versions of the
17
# project. It is no longer used. It is known to be buggy and will be removed.
18 184 ja_rd
#
19
# See info on flag -G0 in ion_noxram.lds
20 66 ja_rd
#-------------------------------------------------------------------------------
21 2 ja_rd
 
22
 
23
### Toolchain config ###########################################################
24
 
25
ifeq ($(LANG),)
26
#****  Customize for Windows/Cygwin
27
 
28
# Some common file commands (Cygwin/sh version, use your own)
29
CP = cp
30
RM = RM
31
DWIN32 = -DWIN32
32
LINUX_PWD =
33
 
34
 
35
# MIPS GCC cross-toolchain: CodeSourcery -- replace with your own
36
 
37 131 ja_rd
BIN_MIPS = C:/dev/embedded/SourceryGpp/mips-elf-11-03.52/bin
38 184 ja_rd
CC = $(BIN_MIPS)/mips-sde-elf-gcc.exe $(CFLAGS)
39
AS = $(BIN_MIPS)/mips-sde-elf-as
40
LD = $(BIN_MIPS)/mips-sde-elf-ld
41
DUMP = $(BIN_MIPS)/mips-sde-elf-objdump
42
COPY = $(BIN_MIPS)/mips-sde-elf-objcopy
43 2 ja_rd
TO_VHDL   = python ../bin2hdl.py
44
 
45
else
46
#**** Customize for Linux
47
 
48
# MIPS GCC cross-toolchain: BuildRoot toolchain in my home directory -- replace with your own
49
# NOTE: we will not use gcc builtin functions or libc
50
 
51
BIN_MIPS = /home/jaruiz/desarrollo/uClinux/MIPS/buildroot/buildroot-2010.11/output/staging/usr/bin
52 184 ja_rd
CC = $(BIN_MIPS)/mips-unknown-linux-uclibc-gcc $(CFLAGS)
53
AS = $(BIN_MIPS)/mips-unknown-linux-uclibc-as
54
LD = $(BIN_MIPS)/mips-unknown-linux-uclibc-ld
55
DUMP = $(BIN_MIPS)/mips-unknown-linux-uclibc-objdump
56
COPY = $(BIN_MIPS)/mips-unknown-linux-uclibc-objcopy
57 2 ja_rd
TO_VHDL = python ../bin2hdl.py
58
 
59
endif
60
 
61 184 ja_rd
### Default system parameters -- to be replaced in application makefile ########
62 2 ja_rd
 
63 34 ja_rd
# 'CODE_BRAM' is meant to be a small BRAM (2 to 4KB) used for bootstrapping.
64
# 'DATA_BRAM' is a small BRAM connected to the data ports, used for debugging.
65
# 'XRAM' is meant to be the main external RAM, either SRAM or SDRAM.
66
 
67
 
68
# Default location of code BRAM is on the reset vector address
69
CODE_BRAM_ADDRESS = 0
70 2 ja_rd
# Default size of code BRAM in 32-bit words
71 34 ja_rd
CODE_BRAM_SIZE = 1024
72 184 ja_rd
# Default size of data BRAM in 32-bit words (meant for simulation only)
73 34 ja_rd
DATA_BRAM_SIZE = 256
74
# Default address of BRAM -- used in some simulation-only tests, see makefiles
75
DATA_BRAM_ADDRESS = 0x10000
76
# Default size of data external RAM (XRAM) in 32-bit words (for simulation)
77
XRAM_SIZE = 2048
78
# Default address of XRAM
79
XRAM_ADDRESS = 0x80000000
80 2 ja_rd
 
81 184 ja_rd
### Project directories -- to be replaced in application makefile ##############
82 34 ja_rd
 
83 184 ja_rd
# Root test code source directory, where python script and vhdl templates are
84
SRC_DIR = ..
85
# VHDL test bench directory, where VHDL output files will be created
86
TB_DIR = ../../vhdl/tb
87
# VHDL DE-1 board demo root directory, for vhdl output
88
DEMO_DIR = ../../vhdl/demo
89
# Path to local libraries
90
LIB_PATH = $(SRC_DIR)/common/libsoc
91
# Link script to be used
92
LINK_SCRIPT = $(SRC_DIR)/common/flash.lds
93 2 ja_rd
 
94 184 ja_rd
### Build options -- to be replaced in application makefile ####################
95
 
96 2 ja_rd
# Don't use gcc builtin functions, and try to target MIPS-I architecture
97 34 ja_rd
# This will prevent usage of unimplemented opcodes but will insert nops after
98
# load instructions, which Ion does not need.
99 2 ja_rd
# (See comment above about -G0 flag)
100 184 ja_rd
CFLAGS = -O2 -Wall -c -s -fno-builtin -mips1 -G0 -nodefaultlibs -nostdlib
101 2 ja_rd
 
102 66 ja_rd
# LFLAGS: linker options are in the respective makefiles

powered by: WebSVN 2.1.0

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