weird printf behavior

09 Mar 2010

hi, i am beginning with mbed. Im trying to get a "hello wolrd" working with the pc.

But the mbed dosent send the expected string back to the pc

here is my code

#include "mbed.h"

DigitalOut myled(LED1);
Serial pc(USBTX, USBRX); // tx, rx

int main()
{
    pc.baud(57600);
    pc.format(8,Serial::None,1);
    pc.printf("Hello world - from MBED");

    while(1) {
    }
}

 

and here is what i get in my console program on the pc : "from MBEDHello wolrd -"

i can't figure out why the string isint in the right order. Can someone give me a hint or explain why?

thanks

 

 

09 Mar 2010

fixed!

i restarted my computer and now i get the expected result!