MODSERIAL and missing serial_api.h

14 Feb 2013

Dear all,

I am trying to use MODSERIAL (https://mbed.org/cookbook/MODSERIAL) in my program. This program used to compile, but when I import the MODSERIAL library and make the required adjustments I get the following error and therefore it won't compile properly:

Compiler Output Error:

Quote:

cannot open source input file "serial_api.h": No such file or directory

I also tried it with the very simple example provided:

#include "mbed.h"
#include "MODSERIAL.h"
MODSERIAL pc(USBTX, USBRX); // tx, rx

int main() {
      pc.printf("Hello World!");
      while(1) {
          pc.putc(pc.getc() + 1);
      }
 }

but this gives me exactly the same result.

The error explanation states that this could mean that the default mbed library is accidentaly removed. But this isn't the case.

Furthermore I have looked for an additional library called 'serial_api' that I might needed to import but I couldn't find anything.

What did I miss to import and use the MODSERIAL library properly?

Much thanks in advance

p.s. I also posted this under the section 'question'. I am not sure where it is placed best.

14 Feb 2013

Tbh then better place it in one spot.

Check that all libraries you use, including the mbed library, are up to date. Click on them in the compiler, at the right side it gives you update option if required.

24 Feb 2014

This happens also to me... Two identical programs, one compiles and the other one doesn't, giving this error!

EDIT: Ok, now I've updated the mBed library one more time and it's working!