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

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [fpga/] [altera_de0_nano_soc/] [doc/] [Terasic/] [DE0_NANO_SOC/] [Demonstrations/] [FPGA/] [DE0_NANO_SOC_ADC/] [software/] [DE0_NANO_SOC_ADC_bsp/] [public.mk] - Blame information for rev 221

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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