mBed Studio code compile errors in code which has not changed

All of a sudden my project will not compile and is giving the following errors, which were fine before. i.e. nothing has changed in my code. What is causing this new issue? Was some library updated or something?

These are the new errors found in the code which hasn’t changed:

  1. Cannot initialize object parameter of type ‘mbed::Stream’ with an expression of type ‘mbed::Serial’
    ACTUAL CODE: serial_flush = UART.getc();

  2. No matching member function for call to ‘attach_us’
    ACTUAL CODE: biojet_timeout.attach_us(&BioJetOFF, open_time);

Hi John,

Do you have a public repository we could look at so we can look into the issue further? You can post it on this thread or send it to mbed-support@arm.com.

Many thanks


double check your MbedOS version, it seems like the Mbed library of your project was updated, probably from version 5.x to a 6.x

BR, Jan

1 Like

That was actually the problem. I have a 5 project that requires 5.12.4 and I mistakenly clicked to update to the latest mbed.lib, which was a 6 version.

Thank you so much, Johnny.

Yeah, that happens sometimes. Good luck :slight_smile:

BR, Jan