I m trying to program mBED LPC1768 board using mBED CE platform. What I have done is I followed the steps for installation of Visual studio and required extension. I installed CMake and GNU also. But I am getting the error: cannot open source file mbed.h. Kindly help me anyone.
OK, so the build variant was not set, you can not start CMake and that is the reason of the error. Then go two steps back, point 5. The file cmake-variants.yaml is probably missing in your project or it is not filled correctly.
It should look like
buildType:
default: Develop
choices:
Develop:
short: Develop
long: Emit debug information but also optimize
buildType: Develop
Debug:
short: Debug
long: Emit debug information and don't optimize
buildType: Debug
Release:
short: Release
long: Optimize generated code
buildType: Release
board:
default: LPC1768
choices:
YOUR_MBED_TARGET:
short: LPC1768
settings:
MBED_TARGET: LPC1768
# Fill your upload method according to variants below
# - universal: NONE, MBED, JLINK, PYOCD, OPENOCD
# - target specific: STLINK, STM32CUBE, LINKSERVER, PICOTOOL, ARDUINO_BOSSAC
# For more visit - https://github.com/mbed-ce/mbed-os/wiki/Upload-Methods#upload-method-list
UPLOAD_METHOD: NONE
I chose the Upload method as MBED
And now the variant is also showing as Develop + MBED LPC1768. But still it is exit with 1.## cannot open source file mbed.h
This error is I am seeing. And I did not follow step 6 which I did not understand.
In the CMakeLists Text document, at include(mbed-os/tools/cmake/app.cmake), I am seeing the error of “include could not fine requested file”. How to add mbed-os folder to my project?