In this tutorial, we will be discussing the steps to set up the Software Build Toolchain [ Windows OS ] in ARM KEIL MDK v5 for nRF52840. We will also set up the Toolchain for CMSIS-DAPLink Flashing and Debugging. We will concentrate on the Seeedstudio Grove Mesh Kit nRF52840-MDK IOT Development Kit which has a DAPLink for Flashing and Debugging compared to the Official Development Kit from Nordic Semiconductor which has a J-Link Debugger. I will also Explain the ARM GCC ToolChain setup also in case you don’t want to use the ARM KEIL Microcontroller Development Tools.
I will explain to you how to modify and use the nRF5 SDK from Official Release of Nordic Semiconductor as well as I will explain to you how to use the nRF52840-MDK release from makerdiary especially for the hardware.
Setting Up ARM Keil MDK and µVision® IDE
MDK helps us to create embedded applications for ARM Cortex-M Processor based devices. MDK is a powerful, yet easy to learn and use development system. It consists of MDK-Core and software packs, which can be downloaded and installed based on the requirements of our application. MDK-Core consists of the genuine Keil µVision IDE and debugger with leading support for Cortex-M processor-based microcontroller. MDK includes two ARM C/C++ Compilers with assembler, linker, and highly optimize run-time libraries tailored for optimum code size and performance.
There are different editions of MDK Available :
MDK-Lite is code size restricted to 32 KByte and intended for product evaluation, small projects, and the educational market.
MDK-Essential supports Cortex-M processor-based microcontrollers up to Cortex-M7 and non-secure programming of Cortex-M23 and M33 targets.
MDK-Plus adds middleware libraries for IPv4 networking, USB Device, File System, and Graphics. It supports ARM Cortex-M, selected ARM Cortex-R, ARM7, and ARM9 processor-based microcontrollers. It also includes DS-MDK for programming heterogeneous devices.
MDK-Professional contains all features of MDK-Plus. In addition, it supports IPv4/IPv6 dual-stack networking, IoT connectivity, and a USB Host stack. It also offers secure and non-secure programming of Cortex-M23 and M33 targets as well as multicore debugging of heterogeneous devices including the Linux kernel and Streamlines performance analysis.
Out of all these MDK-Lite is free and all other requires a License to Use. I recommend you to use the Lite Version if you are not making very big applications. It is enough for Learning Purpose.
1. Download the latest Installer of MDK-ARM from the Below Link.
4. Start the Installer and follow the instructions to install the Device Family Pack.
5. Once both the MDK-Core and Device Tree is Installed, start the Keil uVision5 Application. You should see something like below.
6. If you click the Pack Installer Button you will get a window like below. You should be able to find Nordic Semiconductor -> nRF52 Series -> nRF52840_xxAA. You should also be able to find ARM::CMSIS, Keil::ARM_Compiler, Keil::MDK-Middleware. These are important components for the projects to build.
Setting Up the nRF5 SDK from Nordic Semiconductor
Software development kit for the nRF52 series and the nRF51 series SoC. The nRF5 SDK is your first stop for building fully featured, reliable and secure applications with the nRF52 and nRF51 Series. It offers developers a wealth of varied modules and examples right across the spectrum including numerous Bluetooth Low Energy profiles, Device Firmware Upgrade (DFU), GATT serializer and driver support for all peripherals on all nRF5 Series devices. The nRF5 SDK will almost certainly have something for your needs in developing exciting yet robust wireless products.
1. Download the latest ZIP of nRF5 SDK from the Below Link