The discussion of standard IO dynamic switching among semihost, UARTx, and NULL on STM32
Hi all friends,
I had quick experiment of using semihost on OpenSTM32 toolchain. It is a nice feature on ARM processor, by define the standard device to semihosting debug channel, the standard IO functions are available before many other device initializations to be done. However, there are downsides to using semihosting. One of them is that in the code once enable/using semihosting, there has to be a debugger connected and turned on the debugging message channel, or the processor will hanging.
Considering over those disadvantages, I’m thinking to implement a set of enhanced standard IO, which can dynamic remap the standard Input/Output among semihost, UARTx and NULL. This will help different phase of developing, in field event logging, release version performance optimizing etc.
I believe this is viable. Most of the work would be patch the newlib and supply an override version of _read() and _write() function.
Would someone willing help me and working together?
Any comments and suggestions are welcome.
-Andy.