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

Subversion Repositories ao486

[/] [ao486/] [trunk/] [syn/] [soc/] [firmware/] [exe_bsp/] [public.mk] - Blame information for rev 2

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

Line No. Rev Author Line
1 2 alfik
#------------------------------------------------------------------------------
2
#                       BSP "PUBLIC" MAKEFILE CONTENT
3
#
4
# This file is intended to be included in an application or library
5
# Makefile that is using this BSP. You can create such a Makefile with
6
# the nios2-app-generate-makefile or nios2-lib-generate-makefile
7
# commands.
8
#
9
# The following variables must be defined before including this file:
10
#
11
#     ALT_LIBRARY_ROOT_DIR
12
#         Contains the path to the BSP top-level (aka root) directory
13
#------------------------------------------------------------------------------
14
 
15
#------------------------------------------------------------------------------
16
#                                  PATHS
17
#------------------------------------------------------------------------------
18
 
19
 
20
 
21
# Path to the provided linker script.
22
BSP_LINKER_SCRIPT := $(ALT_LIBRARY_ROOT_DIR)/linker.x
23
 
24
# Include paths:
25
# The path to root of all header files that a library wishes to make
26
# available for an application's use is specified here. Note that this
27
# may not be *all* folders within a hierarchy. For example, if it is
28
# desired that the application developer type:
29
#   #include 
30
#   #include 
31
# With files laid out like this:
32
#   /inc/sockets.h
33
#   /inc/ip/tcpip.h
34
#
35
# Then, only /inc need be added to the list of include
36
# directories. Alternatively, if you wish to be able to directly include
37
# all files in a hierarchy, separate paths to each folder in that
38
# hierarchy must be defined.
39
 
40
# The following are the "base" set of include paths for a BSP.
41
# These paths are appended to the list that individual software
42
# components, drivers, etc., add in the generated portion of this
43
# file (below).
44
ALT_INCLUDE_DIRS_TO_APPEND += \
45
        $(ALT_LIBRARY_ROOT_DIR) \
46
        $(ALT_LIBRARY_ROOT_DIR)/drivers/inc
47
 
48
# Additions to linker library search-path:
49
# Here we provide a path to "our self" for the application to construct a
50
# "-L " out of. This should contain a list of directories,
51
# relative to the library root, of all directories with .a files to link
52
# against.
53
ALT_LIBRARY_DIRS += $(ALT_LIBRARY_ROOT_DIR)
54
 
55
 
56
#------------------------------------------------------------------------------
57
#                               COMPILATION FLAGS
58
#------------------------------------------------------------------------------
59
# Default C pre-processor flags for a BSP:
60
ALT_CPPFLAGS += -DSYSTEM_BUS_WIDTH=32 \
61
                -pipe
62
 
63
 
64
#------------------------------------------------------------------------------
65
#                              MANAGED CONTENT
66
#
67
# All content between the lines "START MANAGED" and "END MANAGED" below is
68
# generated based on variables in the BSP settings file when the
69
# nios2-bsp-generate-files command is invoked. If you wish to persist any
70
# information pertaining to the build process, it is recomended that you
71
# utilize the BSP settings mechanism to do so.
72
#------------------------------------------------------------------------------
73
#START MANAGED
74
 
75
# The following TYPE comment allows tools to identify the 'type' of target this
76
# makefile is associated with.
77
# TYPE: BSP_PUBLIC_MAKEFILE
78
 
79
# This following VERSION comment indicates the version of the tool used to
80
# generate this makefile. A makefile variable is provided for VERSION as well.
81
# ACDS_VERSION: 13.1
82
ACDS_VERSION := 13.1
83
 
84
# This following BUILD_NUMBER comment indicates the build number of the tool
85
# used to generate this makefile.
86
# BUILD_NUMBER: 162
87
 
88
# Qsys--generated SOPCINFO file. Required for resolving node instance ID's with
89
# design component names.
90
SOPCINFO_FILE := $(ABS_BSP_ROOT_DIR)/../../system.sopcinfo
91
 
92
# Big-Endian operation.
93
# setting BIG_ENDIAN is false
94
 
95
 
96
# Path to the provided C language runtime initialization code.
97
BSP_CRT0 := $(ALT_LIBRARY_ROOT_DIR)/obj/HAL/src/crt0.o
98
 
99
# Name of BSP library as provided to linker using the "-msys-lib" flag or
100
# linker script GROUP command.
101
# setting BSP_SYS_LIB is hal_bsp
102
BSP_SYS_LIB := hal_bsp
103
ELF_PATCH_FLAG  += --thread_model hal
104
 
105
# Type identifier of the BSP library
106
# setting BSP_TYPE is hal
107
ALT_CPPFLAGS += -D__hal__
108
BSP_TYPE := hal
109
 
110
# CPU Name
111
# setting CPU_NAME is nios2
112
CPU_NAME = nios2
113
ELF_PATCH_FLAG  += --cpu_name $(CPU_NAME)
114
 
115
# Hardware Divider present.
116
# setting HARDWARE_DIVIDE is false
117
ALT_CFLAGS += -mno-hw-div
118
 
119
# Hardware Multiplier present.
120
# setting HARDWARE_MULTIPLY is false
121
ALT_CFLAGS += -mno-hw-mul
122
 
123
# Hardware Mulx present.
124
# setting HARDWARE_MULX is false
125
ALT_CFLAGS += -mno-hw-mulx
126
 
127
# Debug Core present.
128
# setting HAS_DEBUG_CORE is true
129
CPU_HAS_DEBUG_CORE = 1
130
 
131
# Qsys generated design
132
# setting QSYS is 1
133
QSYS := 1
134
ELF_PATCH_FLAG += --qsys true
135
 
136
# Design Name
137
# setting SOPC_NAME is system
138
SOPC_NAME := system
139
 
140
# SopcBuilder Simulation Enabled
141
# setting SOPC_SIMULATION_ENABLED is false
142
ELF_PATCH_FLAG  += --simulation_enabled false
143
 
144
# Enable JTAG UART driver to recover when host is inactive causing buffer to
145
# full without returning error. Printf will not fail with this recovery. none
146
# setting altera_avalon_jtag_uart_driver.enable_jtag_uart_ignore_fifo_full_error is false
147
 
148
# Small-footprint (polled mode) driver none
149
# setting altera_avalon_jtag_uart_driver.enable_small_driver is false
150
 
151
# Build a custom version of newlib with the specified space-separated compiler
152
# flags. The custom newlib build will be placed in the <bsp root>/newlib
153
# directory, and will be used only for applications that utilize this BSP.
154
# setting hal.custom_newlib_flags is none
155
 
156
# Enable support for a subset of the C++ language. This option increases code
157
# footprint by adding support for C++ constructors. Certain features, such as
158
# multiple inheritance and exceptions are not supported. If false, adds
159
# -DALT_NO_C_PLUS_PLUS to ALT_CPPFLAGS in public.mk, and reduces code
160
# footprint. none
161
# setting hal.enable_c_plus_plus is 0
162
ALT_CPPFLAGS += -DALT_NO_C_PLUS_PLUS
163
 
164
# When your application exits, close file descriptors, call C++ destructors,
165
# etc. Code footprint can be reduced by disabling clean exit. If disabled, adds
166
# -DALT_NO_CLEAN_EXIT to ALT_CPPFLAGS -D'exit(a)=_exit(a)' in public.mk. none
167
# setting hal.enable_clean_exit is 0
168
ALT_CPPFLAGS += -DALT_NO_CLEAN_EXIT -D'exit(a)=_exit(a)'
169
 
170
# Add exit() support. This option increases code footprint if your "main()"
171
# routine does "return" or call "exit()". If false, adds -DALT_NO_EXIT to
172
# ALT_CPPFLAGS in public.mk, and reduces footprint none
173
# setting hal.enable_exit is 0
174
ALT_CPPFLAGS += -DALT_NO_EXIT
175
 
176
# Causes code to be compiled with gprof profiling enabled and the application
177
# ELF to be linked with the GPROF library. If true, adds -DALT_PROVIDE_GMON to
178
# ALT_CPPFLAGS and -pg to ALT_CFLAGS in public.mk. none
179
# setting hal.enable_gprof is 0
180
 
181
# Enables lightweight device driver API. This reduces code and data footprint
182
# by removing the HAL layer that maps device names (e.g. /dev/uart0) to file
183
# descriptors. Instead, driver routines are called directly. The open(),
184
# close(), and lseek() routines will always fail if called. The read(),
185
# write(), fstat(), ioctl(), and isatty() routines only work for the stdio
186
# devices. If true, adds -DALT_USE_DIRECT_DRIVERS to ALT_CPPFLAGS in public.mk.
187
# The Altera Host and read-only ZIP file systems can't be used if
188
# hal.enable_lightweight_device_driver_api is true.
189
# setting hal.enable_lightweight_device_driver_api is 1
190
ALT_CPPFLAGS += -DALT_USE_DIRECT_DRIVERS
191
 
192
# Adds code to emulate multiply and divide instructions in case they are
193
# executed but aren't present in the CPU. Normally this isn't required because
194
# the compiler won't use multiply and divide instructions that aren't present
195
# in the CPU. If false, adds -DALT_NO_INSTRUCTION_EMULATION to ALT_CPPFLAGS in
196
# public.mk. none
197
# setting hal.enable_mul_div_emulation is 0
198
ALT_CPPFLAGS += -DALT_NO_INSTRUCTION_EMULATION
199
 
200
# Certain drivers are compiled with reduced functionality to reduce code
201
# footprint. Not all drivers observe this setting. The altera_avalon_uart and
202
# altera_avalon_jtag_uart drivers switch from interrupt-driven to polled
203
# operation. CAUTION: Several device drivers are disabled entirely. These
204
# include the altera_avalon_cfi_flash, altera_avalon_epcs_flash_controller, and
205
# altera_avalon_lcd_16207 drivers. This can result in certain API (HAL flash
206
# access routines) to fail. You can define a symbol provided by each driver to
207
# prevent it from being removed. If true, adds -DALT_USE_SMALL_DRIVERS to
208
# ALT_CPPFLAGS in public.mk. none
209
# setting hal.enable_reduced_device_drivers is 1
210
ALT_CPPFLAGS += -DALT_USE_SMALL_DRIVERS
211
 
212
# Turns on HAL runtime stack checking feature. Enabling this setting causes
213
# additional code to be placed into each subroutine call to generate an
214
# exception if a stack collision occurs with the heap or statically allocated
215
# data. If true, adds -DALT_STACK_CHECK and -fstack-check to ALT_CPPFLAGS in
216
# public.mk. none
217
# setting hal.enable_runtime_stack_checking is 0
218
 
219
# The BSP is compiled with optimizations to speedup HDL simulation such as
220
# initializing the cache, clearing the .bss section, and skipping long delay
221
# loops. If true, adds -DALT_SIM_OPTIMIZE to ALT_CPPFLAGS in public.mk. When
222
# this setting is true, the BSP shouldn't be used to build applications that
223
# are expected to run real hardware.
224
# setting hal.enable_sim_optimize is 0
225
 
226
# Causes the small newlib (C library) to be used. This reduces code and data
227
# footprint at the expense of reduced functionality. Several newlib features
228
# are removed such as floating-point support in printf(), stdin input routines,
229
# and buffered I/O. The small C library is not compatible with Micrium
230
# MicroC/OS-II. If true, adds -msmallc to ALT_LDFLAGS in public.mk. none
231
# setting hal.enable_small_c_library is 1
232
ALT_LDFLAGS += -msmallc
233
ALT_CPPFLAGS += -DSMALL_C_LIB
234
 
235
# Enable SOPC Builder System ID. If a System ID SOPC Builder component is
236
# connected to the CPU associated with this BSP, it will be enabled in the
237
# creation of command-line arguments to download an ELF to the target.
238
# Otherwise, system ID and timestamp values are left out of public.mk for
239
# application Makefile "download-elf" target definition. With the system ID
240
# check disabled, the Nios II EDS tools will not automatically ensure that the
241
# application .elf file (and BSP it is linked against) corresponds to the
242
# hardware design on the target. If false, adds --accept-bad-sysid to
243
# SOPC_SYSID_FLAG in public.mk. none
244
# setting hal.enable_sopc_sysid_check is 0
245
SOPC_SYSID_FLAG += --accept-bad-sysid
246
 
247
# Enable BSP generation to query if SOPC system is big endian. If true ignores
248
# export of 'ALT_CFLAGS += -meb' to public.mk if big endian system. none
249
# setting hal.make.ignore_system_derived.big_endian is 0
250
 
251
# Enable BSP generation to query if SOPC system has a debug core present. If
252
# true ignores export of 'CPU_HAS_DEBUG_CORE = 1' to public.mk if a debug core
253
# is found in the system. If true ignores export of 'CPU_HAS_DEBUG_CORE = 0' if
254
# no debug core is found in the system. none
255
# setting hal.make.ignore_system_derived.debug_core_present is 0
256
 
257
# Enable BSP generation to query if SOPC system has FPU present. If true
258
# ignores export of 'ALT_CFLAGS += -mhard-float' to public.mk if FPU is found
259
# in the system. If true ignores export of 'ALT_CFLAGS += -mhard-soft' if FPU
260
# is not found in the system. none
261
# setting hal.make.ignore_system_derived.fpu_present is 0
262
 
263
# Enable BSP generation to query if SOPC system has hardware divide present. If
264
# true ignores export of 'ALT_CFLAGS += -mno-hw-div' to public.mk if no
265
# division is found in system. If true ignores export of 'ALT_CFLAGS +=
266
# -mhw-div' if division is found in the system. none
267
# setting hal.make.ignore_system_derived.hardware_divide_present is 0
268
 
269
# Enable BSP generation to query if SOPC system floating point custom
270
# instruction with a divider is present. If true ignores export of 'ALT_CFLAGS
271
# += -mcustom-fpu-cfg=60-2' and 'ALT_LDFLAGS += -mcustom-fpu-cfg=60-2' to
272
# public.mk if the custom instruction is found in the system. none
273
# setting hal.make.ignore_system_derived.hardware_fp_cust_inst_divider_present is 0
274
 
275
# Enable BSP generation to query if SOPC system floating point custom
276
# instruction without a divider is present. If true ignores export of
277
# 'ALT_CFLAGS += -mcustom-fpu-cfg=60-1' and 'ALT_LDFLAGS +=
278
# -mcustom-fpu-cfg=60-1' to public.mk if the custom instruction is found in the
279
# system. none
280
# setting hal.make.ignore_system_derived.hardware_fp_cust_inst_no_divider_present is 0
281
 
282
# Enable BSP generation to query if SOPC system has multiplier present. If true
283
# ignores export of 'ALT_CFLAGS += -mno-hw-mul' to public.mk if no multiplier
284
# is found in the system. If true ignores export of 'ALT_CFLAGS += -mhw-mul' if
285
# multiplier is found in the system. none
286
# setting hal.make.ignore_system_derived.hardware_multiplier_present is 0
287
 
288
# Enable BSP generation to query if SOPC system has hardware mulx present. If
289
# true ignores export of 'ALT_CFLAGS += -mno-hw-mulx' to public.mk if no mulx
290
# is found in the system. If true ignores export of 'ALT_CFLAGS += -mhw-mulx'
291
# if mulx is found in the system. none
292
# setting hal.make.ignore_system_derived.hardware_mulx_present is 0
293
 
294
# Enable BSP generation to query if SOPC system has simulation enabled. If true
295
# ignores export of 'ELF_PATCH_FLAG += --simulation_enabled' to public.mk. none
296
# setting hal.make.ignore_system_derived.sopc_simulation_enabled is 0
297
 
298
# Enable BSP generation to query SOPC system for system ID base address. If
299
# true ignores export of 'SOPC_SYSID_FLAG += --sidp=
' and
300
# 'ELF_PATCH_FLAG += --sidp=
' to public.mk. none
301
# setting hal.make.ignore_system_derived.sopc_system_base_address is 0
302
 
303
# Enable BSP generation to query SOPC system for system ID. If true ignores
304
# export of 'SOPC_SYSID_FLAG += --id=' and 'ELF_PATCH_FLAG +=
305
# --id=' to public.mk. none
306
# setting hal.make.ignore_system_derived.sopc_system_id is 0
307
 
308
# Enable BSP generation to query SOPC system for system timestamp. If true
309
# ignores export of 'SOPC_SYSID_FLAG += --timestamp=' and
310
# 'ELF_PATCH_FLAG += --timestamp=' to public.mk. none
311
# setting hal.make.ignore_system_derived.sopc_system_timestamp is 0
312
 
313
# Slave descriptor of STDERR character-mode device. This setting is used by the
314
# ALT_STDERR family of defines in system.h. none
315
# setting hal.stderr is none
316
ELF_PATCH_FLAG  += --stderr_dev none
317
 
318
# Slave descriptor of STDIN character-mode device. This setting is used by the
319
# ALT_STDIN family of defines in system.h. none
320
# setting hal.stdin is none
321
ELF_PATCH_FLAG  += --stdin_dev none
322
 
323
# Slave descriptor of STDOUT character-mode device. This setting is used by the
324
# ALT_STDOUT family of defines in system.h. none
325
# setting hal.stdout is jtag_uart
326
ELF_PATCH_FLAG  += --stdout_dev jtag_uart
327
 
328
 
329
#------------------------------------------------------------------------------
330
#                 SOFTWARE COMPONENT & DRIVER INCLUDE PATHS
331
#------------------------------------------------------------------------------
332
 
333
ALT_INCLUDE_DIRS += $(ALT_LIBRARY_ROOT_DIR)/HAL/inc
334
 
335
#------------------------------------------------------------------------------
336
#        SOFTWARE COMPONENT & DRIVER PRODUCED ALT_CPPFLAGS ADDITIONS
337
#------------------------------------------------------------------------------
338
 
339
ALT_CPPFLAGS += -DALT_SINGLE_THREADED
340
 
341
#END MANAGED
342
 
343
 
344
#------------------------------------------------------------------------------
345
#                             LIBRARY INFORMATION
346
#------------------------------------------------------------------------------
347
# Assemble the name of the BSP *.a file using the BSP library name
348
# (BSP_SYS_LIB) in generated content above.
349
BSP_LIB := lib$(BSP_SYS_LIB).a
350
 
351
# Additional libraries to link against:
352
# An application including this file will prefix each library with "-l".
353
# For example, to include the Newlib math library "m" is included, which
354
# becomes "-lm" when linking the application.
355
ALT_LIBRARY_NAMES += m
356
 
357
# Additions to linker dependencies:
358
# An application Makefile will typically add these directly to the list
359
# of dependencies required to build the executable target(s). The BSP
360
# library (*.a) file is specified here.
361
ALT_LDDEPS += $(ALT_LIBRARY_ROOT_DIR)/$(BSP_LIB)
362
 
363
# Is this library "Makeable"?
364
# Add to list of root library directories that support running 'make'
365
# to build them. Because libraries may or may not have a Makefile in their
366
# root, appending to this variable tells an application to run 'make' in
367
# the library root to build/update this library.
368
MAKEABLE_LIBRARY_ROOT_DIRS += $(ALT_LIBRARY_ROOT_DIR)
369
 
370
# Additional Assembler Flags
371
# -gdwarf2 flag is required for stepping through assembly code
372
ALT_ASFLAGS += -gdwarf2
373
 
374
#------------------------------------------------------------------------------
375
#                       FINAL INCLUDE PATH LIST
376
#------------------------------------------------------------------------------
377
# Append static include paths to paths specified by OS/driver/sw package
378
# additions to the BSP thus giving them precedence in case a BSP addition
379
# is attempting to override BSP sources.
380
ALT_INCLUDE_DIRS += $(ALT_INCLUDE_DIRS_TO_APPEND)
381
 
382
 
383
 

powered by: WebSVN 2.1.0

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