Specifications
Null)) < 0)
{
printf ("Failed to post transmit request, reason = %i\n", rc);
exit (1);
}
/* Post the receive request */
if ((rc = alt_dma_rxchan_prepare (rxchan,
rx_buffer,
128,
done,
NULL}} < 0)
{
printf ("Failed to post read request, reason = %i\n", rc);
exit (1);
}
/* wait for transfer to complete */
while (!rx_done);
printf ("Transfer successful!\n");
return 0;
}
Using Interrupt Controllers
The HAL supports two types of interrupt controllers:
• The Nios II internal interrupt controller
• An external interrupt controller component
For more information about working with interrupt controllers, refer to the "Exception Handling"
chapter.
Related Information
Exception Handling on page 8-1
Reducing Code Footprint in Embedded Systems
Code size is always a concern for embedded systems developers, because there is a cost associated with the
memory device that stores code. The ability to control and reduce code size is important in controlling
this cost.
The HAL environment is designed to include only those features that you request, minimizing the total
code footprint. If your Nios II hardware system contains exactly the peripherals used by your program,
the HAL contains only the drivers necessary to control the hardware.
The following sections describe options to consider when you need to further reduce code size. The
hello_world_small example project demonstrates the use of some of these options to reduce code size to
the absolute minimum.
Implementing the options in the following sections entails making changes to BSP settings.
For more information about manipulating BSP settings, refer to the “HAL BSP Settings”.
Related Information
HAL BSP Settings on page 6-1
NII5V2
2015.05.14
Using Interrupt Controllers
6-27
Developing Programs Using the Hardware Abstraction Layer
Altera Corporation
Send Feedback