Had a short look at it: getc of Modserial already works with RTOS + IRQs (at least I assume that was the issue, reading/writing from/to serial in an IRQ). Putc was the issue that prevents the example from working. I don't know why my initial attempt didn't work, because it seems it works fine now: I redefined the standard putc to directly send everything to _putc: The MODSERIAL putc, which has no mutexes and similar stuff.
I had hopes that it would mean printf/puts would also work directly, but no joy there. Puts was simple fix, simply manually add puts function that writes characters in a loop. Printf is a bit more of a problem for me, but should be doable if I spend some time on it :P.
It isn't really a finished situation currently, but from your post I get the idea you can really use it (if this was indeed the issue, writing from an IRQ), so for now I made a fork with these changes. If/when it is finished I will put it together with the other one:
MODSERIAL with support for KL25Z + RTOS (beta, putc + puts currently)
If you need printf before I got that added (no timeframe ;) ), use sprintf to write it to a buffer, and then puts to write that buffer. I only tested it on the LPC1768, but should work same on KL25Z. Example1 works with rtos included.
I am wondering whether anyone has been successful in getting any of the buffered serial libraries working on the FRDM-KL25Z platform?
I have found a number of libraries available, including MODSERIAL, BufferedSerial and SerialBuffered.
I originally looked at MODSERIAL, but this seems to have been written previous to mbed support for the Freedom board being released. Most recently I have been looking at the BufferedSerial example, from Sam Grove.
Any thoughts/suggestions would be greatly appreciated.
Thanks, Cameron