How to redirect stdio?
Posted: Fri Apr 22, 2011 9:50 am
Firstly I have read somewhere that when I use printf and such in my programs the processor goes into a debug mode. All threads are halted and the IO is performed, which I eventually get to see in my Eclipse console. When done debug mode is exited and all threads started again. So:
1) Is this description correct?
2) How can I intercept this and redirect stdio to my own uarts or other IO devices?
3) How can do the same for the file system, fopen, fread, fwrite, fclose etc etc. When I implement my own block drivers and file system?
4) How can I remove that debug mode code from my builds?
1) Is this description correct?
2) How can I intercept this and redirect stdio to my own uarts or other IO devices?
3) How can do the same for the file system, fopen, fread, fwrite, fclose etc etc. When I implement my own block drivers and file system?
4) How can I remove that debug mode code from my builds?