⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 public.mk

📁 nios中自定义指令集实现三角函数的软件部分。
💻 MK
字号:
#------------------------------------------------------------------------------#                       BSP "PUBLIC" MAKEFILE CONTENT## This file is intended to be included in an application or library# Makefile that is using this BSP. You can create such a Makefile with# the nios2-app-generate-makefile or nios2-lib-generate-makefile# commands.## The following variables must be defined before including this file:##     ALT_LIBRARY_ROOT_DIR#         Contains the path to the BSP top-level (aka root) directory#------------------------------------------------------------------------------#------------------------------------------------------------------------------#                             LIBRARY INFORMATION#------------------------------------------------------------------------------# Name of system library as provided to application link "-msys-lib" flag:# This one is special to a BSP. A conventional library won't provide# such a thing, but instead will provide its list of .a files in# the ALT_LIBRARY_NAMES, below. This is unique because it goes# onto the link-line in a special place "-msys-lib" rather than "-l"BSP_SYS_LIB := hal_bsp# The name of the library *.a file.BSP_LIB := lib$(BSP_SYS_LIB).a# BSP Operating System NameBSP_OS_TYPE := HAL# Additional libraries to link against:# An application including this file will prefix each library with "-l".# For example, to include the Newlib math library "m" is included, which# becomes "-lm" when linking the application.ALT_LIBRARY_NAMES += m# Additions to linker dependencies:# Add *all* .a files that an application would link against here,# relative to ALT_LIBRARY_ROOT_DIR. An application Makefile will# typically add these directly to the list of dependencies required# to build the executable target(s).ALT_LDDEPS += $(ALT_LIBRARY_ROOT_DIR)/$(BSP_LIB)# Is this library "Makeable"?# Add to list of root library directories that support running 'make'# to build them. Because libraries may or may not have a Makefile in their# root, appending to this variable tells an application to run 'make' in# the library root to build/update this library.MAKEABLE_LIBRARY_ROOT_DIRS += $(ALT_LIBRARY_ROOT_DIR)#------------------------------------------------------------------------------#                                  PATHS#------------------------------------------------------------------------------# Path to the provided linker script.BSP_LINKER_SCRIPT := $(ALT_LIBRARY_ROOT_DIR)/linker.x# Path to the provided C language runtime initialization code.BSP_CRT0 := $(ALT_LIBRARY_ROOT_DIR)/obj/HAL/src/crt0.o# Include paths:# The path to root of all header files that a library wishes to make# available for an application's use is specified here. Note that this# may not be *all* folders within a hierarchy. For example, if it is# desired that the application developer type:#   #include <sockets.h>#   #include <ip/tcpip.h># With files laid out like this:#   <root of library>/inc/sockets.h#   <root of library>/inc/ip/tcpip.h## Then, only <root of library>/inc need be added to the list of include# directories. Alternatively, if you wish to be able to directly include# all files in a hierarchy, separate paths to each folder in that# hierarchy must be defined.# The following are the "base" set of include paths for a HAL BSP.# These paths are appended to the list that individual software# components, drivers, etc., add in the generated portion of this# file (below).ALT_INCLUDE_DIRS_TO_APPEND += \        $(ALT_LIBRARY_ROOT_DIR) \        $(ALT_LIBRARY_ROOT_DIR)/drivers/inc \        $(ALT_LIBRARY_ROOT_DIR)/HAL/inc# Additions to linker library search-path:# Here we provide a path to "our self" for the application to construct a# "-L <path to BSP>" out of. This should contain a list of directories,# relative to the library root, of all directories with .a files to link# against.ALT_LIBRARY_DIRS += $(ALT_LIBRARY_ROOT_DIR)#------------------------------------------------------------------------------#                               COMPILATION FLAGS#------------------------------------------------------------------------------# Default C pre-processor flags for a HAL-based BSP:ALT_CPPFLAGS += -DSYSTEM_BUS_WIDTH=32 \                -DALT_SINGLE_THREADED \                -D__hal__ \                -pipe#------------------------------------------------------------------------------#                              MANAGED CONTENT## All content between the lines "START MANAGED" and "END MANAGED" below is# generated based on variables in the BSP settings file when the# nios2-bsp-generate-files command is invoked. If you wish to persist any# information pertaining to the build process, it is recomended that you# utilize the BSP settings mechanism to do so.#------------------------------------------------------------------------------#START MANAGED

# CPU Name 
# setting CPU_NAME is cpuCPU_NAME = cpu

# Hardware Divider present. 
# setting HARDWARE_DIVIDE is trueALT_CFLAGS += -mhw-div

# Hardware Multiplier present. 
# setting HARDWARE_MULTIPLY is trueALT_CFLAGS += -mhw-mul

# Hardware Mulx present. 
# setting HARDWARE_MULX is falseALT_CFLAGS += -mno-hw-mulx

# Debug Core present. 
# setting HAS_DEBUG_CORE is trueCPU_HAS_DEBUG_CORE = 1

# The SOPC System ID 
# setting SOPC_SYSID is 1572762114SOPC_SYSID_FLAG += --id=1572762114

# The SOPC System ID Base Address 
# setting SOPC_SYSID_BASE_ADDRESS is 0x8000088SOPC_SYSID_FLAG += --sidp=0x8000088

# Small-footprint (polled mode) driver 
# setting altera_avalon_jtag_uart_driver.enable_small_driver is false

# Build a custom version of newlib with the specified space-separated 
# compilerflags. 
# setting hal.custom_newlib_flags is none

# Add C++ support. This option increases code footprint by adding support for 
# C++ constructors. If false, adds -DALT_NO_C_PLUS_PLUS to ALT_CPPFLAGS in 
# public.mk, and reduces code footprint. 
# setting hal.enable_c_plus_plus is true

# When your application exits, close file descriptors, call C++ destructors, 
# etc. Code footprint can be reduced by disabling clean exit. If disabled, adds 
# -DALT_NO_CLEAN_EXIT to ALT_CPPFLAGS and -Wl,--defsym, exit=_exit to 
# ALT_LDFLAGS in public.mk. 
# setting hal.enable_clean_exit is true

# Add exit() support. This option increases code footprint if your "main()" 
# routine does "return" or call "exit()". If false, adds -DALT_NO_EXIT to 
# ALT_CPPFLAGS in public.mk, and reduces footprint. 
# setting hal.enable_exit is true

# Causes code to be compiled with gprof profiling enabled and the application 
# ELF to be linked with the GPROF library. If true, adds -DALT_PROVIDE_GMON to 
# ALT_CPPFLAGS and -pg to ALT_CFLAGS in public.mk. 
# setting hal.enable_gprof is false

# Enables lightweight device driver API. This reduces code and data footprint 
# by removing the HAL layer that maps device names (e.g. /dev/uart0) to file 
# descriptors. Instead, driver routines are called directly. The open(), 
# close(), and lseek() routines will always fail if called. The read(), 
# write(), fstat(), ioctl(), and isatty() routines only work for the stdio 
# devices. If true, adds -DALT_USE_DIRECT_DRIVERS to ALT_CPPFLAGS in public.mk. 
# setting hal.enable_lightweight_device_driver_api is false

# Adds code to emulate multiply and divide instructions in case they are 
# executed but aren't present in the CPU. Normally this isn't required because 
# the compiler won't use multiply and divide instructions that aren't present 
# in the CPU. If false, adds -DALT_NO_INSTRUCTION_EMULATION to ALT_CPPFLAGS in 
# public.mk. 
# setting hal.enable_mul_div_emulation is falseALT_CPPFLAGS += -DALT_NO_INSTRUCTION_EMULATION

# The drivers are compiled with reduced functionality to reduce code footprint. 
# Not all drivers observe this setting. The altera_avalon_uart and 
# altera_avalon_jtag_uart drivers switch to a polled-mode of operation. The 
# altera_avalon_cfi_flash, altera_avalon_epcs_flash_controller, and 
# altera_avalon_lcd_16207 drivers are removed. You can define a symbol provided 
# by each driver to prevent it from being removed. If true, adds 
# -DALT_USE_SMALL_DRIVERS to ALT_CPPFLAGS in public.mk. 
# setting hal.enable_reduced_device_drivers is false

# Turns on HAL runtime stack checking feature. Enabling this setting causes 
# additional code to be placed into each subroutine call to generate an 
# exception if a stack collision occurs with the heap or statically allocated 
# data. If true, adds -DALT_STACK_CHECK and -mstack-check to ALT_CPPFLAGS in 
# public.mk. 
# setting hal.enable_runtime_stack_checking is false

# The BSP is compiled with optimizations to speedup HDL simulation such as 
# initializing the cache, clearing the .bss section, and skipping long delay 
# loops. If true, adds -DALT_SIM_OPTIMIZE to ALT_CPPFLAGS in public.mk. 
# setting hal.enable_sim_optimize is false

# Causes the small newlib (C library) to be used. This reduces code and data 
# footprint at the expense of reduced functionality. Several newlib features 
# are removed such as floating-point support in printf(), stdin input routines, 
# and buffered I/O. If true, adds -msmallc to ALT_LDFLAGS in public.mk. 
# setting hal.enable_small_c_library is false

# Enable SOPC Builder System ID. If a System ID SOPC Builder component is 
# connected to the CPU associated with this BSP, it will be enabled in the 
# creation of command-line arguments to download an ELF to the target. 
# Otherwise, system ID and timestamp values are left out of public.mk for 
# application Makefile "download-elf" target definition. If false, adds 
# --accept-bad-sysid to SOPC_SYSID_FLAG in public.mk. 
# setting hal.enable_sopc_sysid_check is true


#END MANAGED# Append static include paths to paths specified by drivers/sw packagesALT_INCLUDE_DIRS += $(ALT_INCLUDE_DIRS_TO_APPEND)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -