| 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 |
|
|
#-------------------------------------------------------------------------------
|
| 19 |
2 |
ja_rd |
|
| 20 |
|
|
|
| 21 |
|
|
### Toolchain config ###########################################################
|
| 22 |
|
|
|
| 23 |
|
|
ifeq ($(LANG),)
|
| 24 |
|
|
#**** Customize for Windows/Cygwin
|
| 25 |
|
|
|
| 26 |
|
|
# Some common file commands (Cygwin/sh version, use your own)
|
| 27 |
|
|
CP = cp
|
| 28 |
|
|
RM = RM
|
| 29 |
|
|
DWIN32 = -DWIN32
|
| 30 |
|
|
LINUX_PWD =
|
| 31 |
|
|
|
| 32 |
|
|
|
| 33 |
|
|
# MIPS GCC cross-toolchain: CodeSourcery -- replace with your own
|
| 34 |
|
|
|
| 35 |
|
|
BIN_MIPS = C:/desarrollo/SourceryGpp/bin
|
| 36 |
|
|
GCC_MIPS = $(BIN_MIPS)/mips-sde-elf-gcc.exe $(CFLAGS)
|
| 37 |
|
|
AS_MIPS = $(BIN_MIPS)/mips-sde-elf-as
|
| 38 |
|
|
LD_MIPS = $(BIN_MIPS)/mips-sde-elf-ld
|
| 39 |
|
|
DUMP_MIPS = $(BIN_MIPS)/mips-sde-elf-objdump
|
| 40 |
|
|
COPY_MIPS = $(BIN_MIPS)/mips-sde-elf-objcopy
|
| 41 |
|
|
TO_VHDL = python ../bin2hdl.py
|
| 42 |
|
|
|
| 43 |
|
|
else
|
| 44 |
|
|
#**** Customize for Linux
|
| 45 |
|
|
|
| 46 |
|
|
# MIPS GCC cross-toolchain: BuildRoot toolchain in my home directory -- replace with your own
|
| 47 |
|
|
# NOTE: we will not use gcc builtin functions or libc
|
| 48 |
|
|
|
| 49 |
|
|
BIN_MIPS = /home/jaruiz/desarrollo/uClinux/MIPS/buildroot/buildroot-2010.11/output/staging/usr/bin
|
| 50 |
|
|
GCC_MIPS = $(BIN_MIPS)/mips-unknown-linux-uclibc-gcc $(CFLAGS)
|
| 51 |
|
|
AS_MIPS = $(BIN_MIPS)/mips-unknown-linux-uclibc-as
|
| 52 |
|
|
LD_MIPS = $(BIN_MIPS)/mips-unknown-linux-uclibc-ld
|
| 53 |
|
|
DUMP_MIPS = $(BIN_MIPS)/mips-unknown-linux-uclibc-objdump
|
| 54 |
|
|
COPY_MIPS = $(BIN_MIPS)/mips-unknown-linux-uclibc-objcopy
|
| 55 |
|
|
TO_VHDL = python ../bin2hdl.py
|
| 56 |
|
|
|
| 57 |
|
|
endif
|
| 58 |
|
|
|
| 59 |
|
|
### System parameters ##########################################################
|
| 60 |
|
|
|
| 61 |
34 |
ja_rd |
# FIXME clean up parameter names
|
| 62 |
|
|
# 'CODE_BRAM' is meant to be a small BRAM (2 to 4KB) used for bootstrapping.
|
| 63 |
|
|
# 'DATA_BRAM' is a small BRAM connected to the data ports, used for debugging.
|
| 64 |
|
|
# 'XRAM' is meant to be the main external RAM, either SRAM or SDRAM.
|
| 65 |
|
|
|
| 66 |
|
|
|
| 67 |
|
|
# Default location of code BRAM is on the reset vector address
|
| 68 |
|
|
CODE_BRAM_ADDRESS = 0
|
| 69 |
2 |
ja_rd |
# Default size of code BRAM in 32-bit words
|
| 70 |
34 |
ja_rd |
CODE_BRAM_SIZE = 1024
|
| 71 |
2 |
ja_rd |
# Default size of data BRAM in 32-bit words
|
| 72 |
34 |
ja_rd |
DATA_BRAM_SIZE = 256
|
| 73 |
|
|
# Default address of BRAM -- used in some simulation-only tests, see makefiles
|
| 74 |
|
|
DATA_BRAM_ADDRESS = 0x10000
|
| 75 |
|
|
# Default size of data external RAM (XRAM) in 32-bit words (for simulation)
|
| 76 |
|
|
XRAM_SIZE = 2048
|
| 77 |
|
|
# Default address of XRAM
|
| 78 |
|
|
XRAM_ADDRESS = 0x80000000
|
| 79 |
2 |
ja_rd |
|
| 80 |
34 |
ja_rd |
|
| 81 |
2 |
ja_rd |
### Build options ##############################################################
|
| 82 |
|
|
|
| 83 |
|
|
# Don't use gcc builtin functions, and try to target MIPS-I architecture
|
| 84 |
34 |
ja_rd |
# This will prevent usage of unimplemented opcodes but will insert nops after
|
| 85 |
|
|
# load instructions, which Ion does not need.
|
| 86 |
2 |
ja_rd |
# (See comment above about -G0 flag)
|
| 87 |
|
|
CFLAGS = -O2 -Wall -c -s -fno-builtin -mips1 -G0
|
| 88 |
|
|
|
| 89 |
66 |
ja_rd |
# LFLAGS: linker options are in the respective makefiles
|
| 90 |
34 |
ja_rd |
|
| 91 |
2 |
ja_rd |
### Project directories ########################################################
|
| 92 |
|
|
|
| 93 |
|
|
# VHDL test bench directory, where VHDL output files will be created
|
| 94 |
|
|
TB_DIR = ../../vhdl/tb
|
| 95 |
|
|
# VHDL DE-1 board demo root directory, for vhdl output
|
| 96 |
|
|
DEMO_DIR = ../../vhdl/demo
|
| 97 |
|
|
# Root test code source directory, where python script and vhdl templates are
|
| 98 |
|
|
SRC_DIR = ..
|