OpenCores
URL https://opencores.org/ocsvn/usb_ft232h_avalon-mm_interface/usb_ft232h_avalon-mm_interface/trunk

Subversion Repositories usb_ft232h_avalon-mm_interface

[/] [usb_ft232h_avalon-mm_interface/] [trunk/] [testbench/] [altera_project/] [test_usb_ft232h/] [software/] [usb_ft232h_bsp/] [public.mk] - Blame information for rev 6

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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