Suddenly compiler doesn't find PinNames.h

This code has been compiling and running fine, but today I get a new error when compiling:

#5: cannot open source input file “mbed2/336/TARGET_DISCO_F429ZI/TOOLCHAIN_ARM_STD/PinNames.h”: No such file or directory

Any ideas why this line suddenly causes an error? Has this file been moved maybe?


Hi there,

if the compilatation was Ok yesterday and Nok today for same target, then it seems like the mbed library version was changed.
In general it mens this target is not supported in this version of mbed library I think.

BR, Jan

Yes, hopefully someone from Keil will be along to shed some light on it.


As per Jan’s suggestion above, could you please check that you didn’t update the library to a later version?


Would be good to describe how did you create the project or from where you imported necessary source files. I believe the Studio team needs to know how to reproduce your issue or identified potential source of issue.

I tried create just Mbed2-example-blinky in KeilStudio and all seems be OK, also seems to be not possible to change Mbed2 revision.
Moreover, because the Mbed2 is obsolate and not maintained for years, then it doesn’t seem likely that anyone would change anything about it.

I do not know if this is still source ARMmbed/mbed-dev: Snapshot of mbed-dev (Mbed2) source code (, but how you can see, nothing has changed since this repo was created.

BR, Jan

I haven’t done that knowingly. Is there any way it can update automatically?
What is the current location of those files if they are no longer in that sub-folder?

Commenting out the two lines (in main.cpp file):
// #include “mbed2/336/TARGET_DISCO_F429ZI/TOOLCHAIN_ARM_STD/PinNames.h”
// #include “mbed2/336/drivers/DigitalIn.h”

gets rid of the compile errors and the code still runs as before.

Be so kind visit - Arm Keil Studio Cloud User Guide - Change the Mbed2 version for your project

Why do you have this in the main?

BR, Jan

Thanks for the replies.

I included both these lines as they were part of examples which I used as the basis for my code. I can understand the PinNames.h isn’t required if I’m specifying the pins directly using PA_0 type notation.

The DigitalIn.h was included as part of another example code piece for the interrupt I’m using, I believe. All the code still compiles and works, including the interrupt. I don’t understand why the compiler complains about the lines when it didn’t before.

At the moment I can carry on prototyping as the code compiles and runs still and I’m short on time.
I’ll look into it again and follow your suggestion if something breaks again. Many thanks for your help.



The issue in that include can be the path, because the number 336 does not look like valid part of the path - #include “mbed2/336/TARGET_DISCO_F429ZI...

But from my understanding, these files are included automatically via #include"mbed.h" thanks to build system. So, it is not necessary to do it like that. I suppose you had maybe much more older Mbed2 version or something like that.

BTW It might not be a bad idea to think about switching to MbedOS6, for the future.

BR, Jan

Yes, I started this code in the old Mbed and used some old examples to get going. The code was expanded from there. Any new project will use the latest compiler as you suggest.