7 years, 8 months ago.

I got an error when I'm using printf()

Hello, I faced a problem about using printf. I use LPC1768 mbed original board. I create new project on online compiler and I make a program using printf(). Therefore, I get the following error.

Warning: Function "mbed::FileSystemLike::FileSystemLike(const char *)" (declared at <a href="#" onmousedown="mbed_doc_goto('/DHT11_testextras/mbed_093f2bd7b9eb/drivers/FileSystemLike.h', '47'); return false;">/extras/mbed_093f2bd7b9eb/drivers/FileSystemLike.h:47</a>) was declared "deprecated" in "extras/mbed_093f2bd7b9eb/drivers/LocalFileSystem.h", Line: 99, Col: 53

I compile before created project and I did not get it. I cannot understand what it means and how to resolve it.

I need your help. I'm looking forward to your answer.

3 Answers

7 years, 7 months ago.

It's a warning not an error. It doesn't stop the project from compiling.

The warning is telling you that one of the libraries you are using is using a system call that may not be supported in the future.

It's perfectly safe to ignore it.

Accepted Answer

Thank you very much for your reply and I got a good answer from you. I understood.

posted by Akira Kashihara 28 Mar 2017

hi How to solve the warning?

posted by David Solano 14 Apr 2017
7 years, 8 months ago.

Can you post your full code? It sounds like a typo

Thank you very much for your reply. I copy and paste my code in the following. I think it is not a typo. This code run correctly on older mbed library.

  1. include "mbed.h"

DigitalOut myled(LED1);

int main() { while(1) { myled = 1; wait(0.2); myled = 0; wait(0.2); printf("Hello"); } }

posted by Akira Kashihara 28 Mar 2017

I see the warning you're getting now and as "Andy A" above reports it can be ignored.

posted by Bill Bellis 28 Mar 2017
7 years, 7 months ago.

Kashihara-san,

If you have a problem in the LocalFileSystem itself (not printf), we are already aware that latest mbed library (rev 138) has an issue here: https://github.com/ARMmbed/mbed-os/issues/3983

Possible workaround is to use previous version 137.

I hope this helps.

Toyomasa-san

Thank you very much for your answer and comment. I refer to your pasted url. I did not use LocalFileSystem in the latest version. I revert one before version of mbed.h . This problem is resolved.

posted by Akira Kashihara 28 Mar 2017