Lösung des ESY6/A Praktikums "signal_processing".
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

public.mk 18KB

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