Atmel CAVR-4 Manual De Usuario

Descargar
Página de 323
CAVR-4
Part 1. Using the compiler
The DLIB runtime environment
61
For information about how to fine-tune the formatting capabilities even further, see 
Configuration symbols for printf and scanf, page 69.
Specifying scanf formatter in IAR Embedded Workbench
To specify the 
scanf
 formatter in IAR Embedded Workbench, choose 
Project>Options and select the General Options category. Select the appropriate 
option on the Library options page.
Specifying scanf formatter from the command line
To use any other variant than the default (
_ScanfSmall)
, add one of the following lines 
in the linker command file you are using:
-e_ScanfLarge=_Scanf
-e_ScanfSmall=_Scanf
Overriding library modules
The library contains modules which you probably need to override with your own 
customized modules, for example functions for character-based I/O and 
cstartup
This can be done without rebuilding the entire library. This section describes the 
procedure for including your version of the module in the application project build 
process. The library files that you can override with your own versions are located in the 
avr\src\lib
 directory.
Note: If you override a default I/O library module with your own module, C-SPY 
support for the module is turned off. For example, if you replace the module 
_ _write
 
with your own version, the C-SPY Terminal I/O window will not be supported.
Overriding library modules using IAR Embedded Workbench
This procedure is applicable to any source file in the library, which means 
library_module.c
 in this example can be any module in the library.
1
Copy the appropriate 
library_module.c
 file to your project directory.
2
Make the required additions to the file (or create your own routine, using the default 
file as a model), and make sure that it has the same module name as the original 
module. The easiest way to achieve this is to save the new file under the same name as 
the original file.
3
Add the customized file to your project.
4
Rebuild your project.