fopen hangs with Serial and RTOS

15 Jan 2013

I'm having an issue using the local file system, multiple Serials and mbed-rtos. I have adapted the longer "Hello World!" example from the https://mbed.org/handbook/LocalFileSystem page by adding the lines:

    Serial uartA(p9,p10);   // ADDED
    Serial uartB(p13,p14);   // ADDED
    //Serial uartC(p28,p27);   // ADDED & COMMENTED OUT
    Serial console(USBTX, USBRX);   // ADDED
    console.baud(115200);           // ADDED

to the top of main and importing mbed-rtos (by official). I have imported the mbed-rtos library, but don't make any changes to main.c other than the four lines above.

It hangs on the fopen line (identified by using LED turn on/off). If I use only two Serials it is ok. It crashes if I use any three or all four.

In sumarry to recreate start a new project and import mbed-rtos to the project. Paste in the longer code example from the page https://mbed.org/handbook/LocalFileSystem. Add the lines above to the start of main routine and it will hang. removing mbed-rtos causes it to work again.

24 Jan 2013

I encounter that similar kind of problems too.
The MBED freezes when program execute a function with putc from other library. It works perfectly fine when i hard code the function into the main file. Removing the mbed-rtos library and reverting back to the old program causes the program to work again.

25 Jan 2013

This is probably same problem being discussed over at this thread: http://mbed.org/forum/mbed/topic/3980/

I'm hoping a fix for this will find it's way into the mbed official libraries soon, because I've hit a wall.