11 years, 2 months ago.

trouble compiling

Hello.

This is my first day with mbed and with the kl25Z. I was working my way through the start guide, and then I decided to load the program for the accelerometer.

Then I returned to continue the start guide, and loaded the program "Serial_HelloWorld_Mbed.

When I tried to compile it I received this error: "cannot open source input file "device.h": No such file or directory" in file "mbed.bldplatform.h", Line: 27, Col: 19'

Can someone help me know why this will not compile?

I can still compile the other short programs that I did earlier, but not this one.

Tom

3 Answers

11 years, 2 months ago.

Did you import the libraries referenced by the examples? Just because you '#include "device.h"' doesn't mean the file is available within the scope of your project. You have to import it to make it part of the local project.

10 years, 10 months ago.

For some reason I had a hard time finding it too even though I knew what I was looking for.

Go here: http://mbed.org/users/mbed_official/code/mbed-src/file/f9e72c209510/vendor/Freescale

and import the KL25Z library.

10 years, 10 months ago.

Hi Tom,

The version of the mbed library that comes with the program you imported may not be the latest, and therefore does not support the KL25z . You can try updating the mbed library using the 'update' button in the compiler.