mbed PowerControl Library - compile error

28 Apr 2017

I am trying to turn off the physical ethernet interface on the LPC1768 board. As well as the official mbed SDK, I have imported Michael Wei's Power Control library (containing the files EthernetPowerControl.cpp, EthernetPowerControl.h and PowerControl.h)

The top of my main.cpp file shows the following:

#include "mbed.h"
#include "PowerControl/EthernetPowerControl.h"

The main function starts:

int main() {
    PHY_PowerDown();  //does this line turn off the ethernet physical interface?
    //other code
}

When I try to compile this, I get an error message:

Quote:

Error: Cannot open source input file "TARGET_LPC1768/LPC17xx.h": No such file or directory in "PowerControl/PowerControl.h", Line: 9, Col: 37

Please can someone suggest a solution? If I have to find the file LPC17xx.h, where should I import it from?

29 Apr 2017

Try if it works if you remove that include. I would have no idea what should be in there.

03 May 2017

Thanks Erik.

In the end, I went into the PowerControl.h file and changed TARGET_LPC1768/LPC17xx.h to simply LPC17xx.h.

That worked! My program now compiles without errors.

I guess that Michael Wei's library probably needs some tweaks after recent mbed SDK updates?