Visible to Intel only — GUID: mwh1416946771586
Ixiasoft
Visible to Intel only — GUID: mwh1416946771586
Ixiasoft
7.13. Reducing Code Footprint in Embedded Systems
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”.
Section Content
Enable Compiler Optimizations
Use Reduced Device Drivers
Reduce the File Descriptor Pool
Use /dev/null
Use a Smaller File I/O Library
Use the Lightweight Device Driver API
Use the Minimal Character-Mode API
Eliminate Unused Device Drivers
Eliminate Unneeded Exit Code
Turn off C++ Support