Specifications
hal.enable_gprof
• Identifier: ALT_PROVIDE_GMON
• Type: Boolean assignment
• Default Value: 0
• Destination File: public.mk
• Description: Causes code to be compiled with gprof profiling enabled and the application .elf file to
be linked with the GPROF library. If true, adds -DALT_PROVIDE_GMON to ALT_CPPFLAGS and -pg to
ALT_CFLAGS in public.mk.
• Restriction: none
hal.enable_lightweight_device_driver_api
• Identifier: ALT_USE_DIRECT_DRIVERS
• Type: Boolean assignment
• Default Value: 0
• Destination File: public.mk
• Description: 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 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.
• Restriction: The Altera Host and read-only ZIP file systems cannot be used if
hal.enable_lightweight_device_driver_api is true.
hal.enable_mul_div_emulation
• Identifier: ALT_NO_INSTRUCTION_EMULATION
• Type: Boolean assignment
• Default Value: 0
• Destination File: public.mk
• Description: Adds code to the BSP to emulate multiply and divide instructions. This code is
independent of any emulation code added by the C/C++ compiler. If false, adds -DALT_NO_INSTRUC-
TION_EMULATION to ALT_CPPFLAGS in public.mk. You do not normally need to enable this option,
because the C/C++ compiler detects whether the target Nios II processor core supports the multiply
and divide instructions directly. If you compile for a core that lacks support for the instructions, the
HAL includes the required software emulation in its run-time libraries. However, you might need to
enable hal.enable_mul_div_emulation under the following circumstances:
• You expect to run the Nios II software on an implementation of the Nios II processor other than
the one you compiled for. The best solution is to build your program for the correct Nios II
processor implementation. Resort to the hal.enable_mul_div_emulation if it is not possible to
determine the processor implementation at compile time.
• You have assembly language code that uses an implementation-dependent instruction.
• Restriction: none
15-58
Settings Reference
NII5V2
2015.05.14
Altera Corporation
Nios II Software Build Tools Reference
Send Feedback