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