blob: 2864b4967b9343eb7fe39e0d3376f51d7afb06c3 [file] [log] [blame]
Harald Welte361ed202019-02-24 21:15:39 +01001STDIO redirection
2=================
3
4The STDIO redirection provides means to redirect standard input/output to HAL
5IO.
6
7On initialization, the HAL IO descriptor is assigned so that all input and
8output is redirected to access it. The IO descriptor can also be changed
9through stdio_io_set_io(). All stdin or stdout access is redirected to the
10IO descriptor. When the IO descriptor is set to NULL, all input and output
11are discarded.
12
13For GCC redirection, the stdout and stdin buffer are turned off, the
14standard _read() and _write() are overridden.
15
16For IAR redirection, the __read() and __write() are overridden.
17
18For Keil redirection, the Retarget.c are modified to override fputc(), fgetc(),
19etc.
20
21Features
22--------
23
24* Standard input/output redirection (e.g., printf to EDBG COM port)
25
26Dependencies
27------------
28
29* HAL IO driver
30
31Limitations
32-----------
33
34* IO read/write operation should be synchronous