The recently released nRF5 SDK for Bluetooth Mesh does not provide Keil project files for its example projects. Fortunately, it's relatively easy to set up your own project from scratch. This guide will show you how.
While the list of steps below might seem overwhelming, most of the settings used here, such as the linker settings and defines, can be copied from the Segger Embedded Studio project provided with the mesh SDK. The SES project can be used as a template for which files to include and which settings to use when creating Keil projects for other mesh applications.
Note that this guide creates a project for use with nRF52832-based boards. If you want to use nRF51, you will have to adjust the settings accordingly.
In this guide, we will create a project file for the light controller client application, but the same steps can be used for any example. Let's get started!
BOARD_PCA10040 CONFIG_GPIO_AS_PINRESET NRF52 NRF52832 NRF52832_XXAA NRF52_SERIES SD_BLE_API_VERSION=5 S132 SOFTDEVICE_PRESENT __HEAP_SIZE=1024 __STACK_SIZE=4096
At this point you should have a working Light controller client. If you open the J-Link RTT Viewer, you should be able to see some logging output from the application.
If something goes wrong, check the following points:
Hello Enzo.. I am trying run the bt mesh example using keil, but doesnt work!
Do you have any solution for this problem?
hello Kristian Skordal, I follow this blog and create a keil project with mesh 0.10.0 sdk.I have import light_switch client src files.After build there is no error. earse chip , program softdevice and download app code via keil . Program run successfully , but can not provision the server.And catch a 10-second broadcast via sniffer . Do you run these examples successfully via keil? Can you give me some suggestion.
@lalit-tmt, the new version of the nRF5 SDK for Mesh now supports the nRF52840. You can find example project files for Segger Embedded Studio in the various examples' folders in the SDK.
Aha! After downloading the nrf5_SDK_for_Mesh_v0.9.2-Alpha, the example files only contained CMakeLists.txt, no Keil / IAR projects!
Thanks for your time!
-Best Regards, MANGO
hello Kristian Skordal,
I want to create Bluetooth mesh project using keil(same version as yours) on nRF52840 DK.
Please,do let me know if you have any suggestions.It is possibe with nRF5280 DK