Download User Manual - KPIT GNU Tools

Transcript
GNUSH (ELF) Toolchain
2.4.8.2
User Manual
Optimized Libraries
KPIT GNU Tools provide Optimized Libraries along with the GNUSH Toolchain
for all the SH targets. When linked with an application, the optimized libraries
produce approximately 30% less code as compared to the newlib libraries.
To use these Optimized Libraries, user needs to pass ‗-loptc‘ and ‗-loptm‘ while
compiling any application. Also, user needs to pass the options ‗–nostbinc‘ (to
restrain the Optimized Libraries from using the default headers). The Optimized
Libraries have their own set of header files placed at the following path,
<Toolchain Install Directory\sh-elf\sh-elf\lib\optinc>
User needs to pass this path to application while compiling it with Optimized
Libraries. Use ‗–I‘ option for the same.
For Example:
#sh-elf-gcc test.c –loptc –loptm –lgcc –nostdinc
–I ―<Toolchain Install Directory\sh-elf\shelf\lib\optinc>‖
In HEW, select the option "Settings" from ―Category‖ drop down box under
"Library Generator"-tab to use optimized libraries.
Page 149 of 385