Specifications
completes initialization, run the nios2-terminal command from the Nios II Command Shell to
accept the Altera logging output.
Extra Logging Options
In addition to the default boot messages, logging options are incorporated in Altera logging. Each option
is controlled by a C preprocessor symbol.
Table 6-3: Altera Logging Options and Option Modifiers
Name Description
System clock
log
Purpose Prints out a message from the system clock interrupt handler at a
specified interval. This indicates that the system is still running. The
default interval is every 1 second.
Preprocessor
symbol
ALT_LOG_SYS_CLK_ON_FLAG_SETTING
Modifiers The system clock log has two modifiers, providing two different
ways to specify the logging interval.
• ALT_LOG_SYS_CLK_INTERVAL—Specifies the logging interval in
system clock ticks. The default is <clock ticks per second>, that
is, one second.
• ALT_LOG_SYS_CLK_INTERVAL_MULTIPLIER—Specifies the
logging interval in seconds. The default is 1. When you modify
ALT_LOG_SYS_CLK_INTERVAL_MULTIPLIER, ALT_LOG_SYS_CLK_
INTERVAL is recalculated.
Sample
Output
System Clock On 0
System Clock On 1
Write echo
Purpose Every time alt_write() is called (normally, whenever characters
are sent to stdout), the first <n> characters are echoed to a logging
message. The message starts with the string "Write Echo:". <n> is
specified with ALT_LOG_WRITE_ECHO_LEN. The default is 15
characters.
Preprocessor
symbol
ALT_LOG_WRITE_ON_FLAG_SETTING
Modifiers ALT_LOG_WRITE_ECHO_LEN—Number of characters to echo. Default
is 15.
Sample
Output
Write Echo: Hello from Nio
NII5V2
2015.05.14
Extra Logging Options
6-9
Developing Programs Using the Hardware Abstraction Layer
Altera Corporation
Send Feedback