2 years, 5 months ago.

Output is not showing on the console

#include "mbed.h"

DigitalOut myled(LED1);
Serial pc(USBTX,USBRX);

int main() {
    while(1) {
        myled = 1;
        myled = 0;

Today I created the sample project as shown in above and I selected the wiznet device w7500 but printing the data on console is not working and I used "Cool Term" as console. if I used the old project printing the data on console is working fine.

1 Answer

2 years, 5 months ago.

Hi Irayya, Since you have defined a serial object, it is recommended that you invoke printf on the same object throughout the program.


Also, could you please point us to your old project that prints data to the console that you used as reference?

Thanks, Naveen, team mbed

Also, it would be helpful to know if you used Online compiler or Command Line Compiler for this exercise.

posted by Naveen Kaje 11 Sep 2018


I tried your code with suggested modifiacations with ARM compiler with mbed-os tip at 920db63453b6aae7ccaa992fe7c9107f6664347f (As of 9/9). It worked as expected. Please let us know if that works for you.

Thanks, Naveen

posted by Naveen Kaje 17 Sep 2018