Keil™, An ARM® Company

Discussion Forum

explain

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
shivaram cunchala
Posted
16-May-2008 00:21
Toolset
ARM
New! explain

i am working in arm7/ 9 boards..
IDE IS keil3 version..
in all sample program..they given the retarget option..
what is the need of that..

Read-Only
Author
Tamir Michael
Posted
16-May-2008 01:33
Toolset
ARM
New! RE: explain

The higher-level input/output, such as the functions fscanf() and fprintf(), and the C++ object std::cout, are not target-dependent. However, the higher-level functions perform input/output by calling lower-level functions that are target-dependent. To retarget input/output, you can either avoid these higher-level functions or redefine the lower-level functions.
You can provide your own implementation of C Library functions that make use of target hardware, and that are automatically linked in to your image in favor of the C library implementations. For example, you might have a peripheral I/O device such as a UART, and you might want to override the library implementation of fputc(), that writes to the debugger console, with one that outputs to the UART. Because this implementation of fputc() is linked in to the final image, the entire printf() family of functions prints out to the
UART.

Next Thread | Thread List | Previous Thread Start a Thread | Settings