I am playing with a kwikstik and MQX.
I found that printf() (or _io_printf() ) does NOT print anymore on eclipse console if I include <mfs.h>
Did anyone faced the same?
Any way around it?
Oh yes I did, but the printf in that examples never prints on my eclipse console either (codewarrior 10.1).
It only prints there when mfs.h is not included.
I suspect that <stdio.h> gets replaced by <io.h> included from <mfs.h>... and that causes the problem...
I thought that you said about the console where captures UART data...
In MQX, the standard formatted I/O library fuctions is overrided by MQX functions (defined in fio.h).
For printf, it is replaced by _io_printf, that will out data at BSP_DEFAULT_IO_CHANNEL (kwikstik-k40x256.h)
All MQX examples should be used in that way (mean include fio.h in the file)
In case the fio.h file is not included in any your files, it may use the standard I/O function but I think Freescale will not warrant it work in that case...
BTW, in the future, if you have question in MQX, you should ask in MQX forum. There may be many MQX guru there and they may have better solutions...
first of all you are right: this should have been more a question for MQX forum...
thanks for your explanation.
I have tried to change values in kwikstik-k20x256.h for the BSP_DEFAULT_IO_CHANNEL, to:
"ttyd:" , "ttya:", "ttyb:"
Unfortunately no success yet... I will search for another solution.
Change to "ttyd:" , "ttya:", "ttyb:" will not help you to have it worked as you expected because is represented for different UART port but not for debug console.
You can try to change MQX_SUPPRESS_STDIO_MACROS to 1 in mqx_cnfg.h. I guess it will work as you want but that is not suggested.
I tried this:
"MQX_SUPPRESS_STDIO_MACROS to 1 in mqx_cnfg.h."
without success again.
I am thinking I am missing the obvious: do people get the printf out somewhere else when using the kwikstik?
I will move this discussion in MQX, thanks for your help.