Hello, I am Ralf Kopsch, Senior Application Engineer at ARM.
In this Video Tutorial I demonstrate how to download, install and setup the Keil Microcontroller Development Kit
the most comprehensive software development solution for Arm-based microcontrollers.
MDK includes all components that you need to create, build, and debug embedded applications.
I show how to install MDK and introduce to you several components like the Pack Installer and the Runtime Environment.
Finally, I show you how to debug an example project in Simulation mode.
Let me start by downloading MDK from the Internet.
The free MDK Lite version is available from this URL.
This site offers also a comprehensive Getting Started Guide, that explains the tool and fundamentals of microcontroller programming.
We recommend that you download this manual - and in this tutorial I will refer to it several times.
Next, I download the MDK-Core here...
...and after the download is completed I start the MDK installer
Then you may select where the Software Packs are installed. But I leave the defaults here.
Here enter your name and email address
The installation has completed. I click the Finish-button
At this point you recognize that the Pack Installer opens.
This tool downloads a catalogue of available SW-Packs, that may be added any time to the MDK-Core.
They contain Device Support, Software component libraries, Board Support and Example Projects.
The Pack Installer shows you the devices that are supported by uVision.
If you know already know the device that you are going to use you may select the related Pack.
When you click on the Boards-tab you see the list of evaluation boards.
For these boards example projects are available.
But you can even work without any Hardware board, as uVision supports Device Simulation.
BTW - you may notice that some icons are green. The green color indicates that the pack is already installed.
You may also use the Search bar to locate packs
Once you click on Examples, you get a list of example projects that are ready to use.
All these examples work with the “uVision Simulator”.
You therefore need no hardware to start learning microcontroller programming.
I decided to select the popular CMSIS-RTOS Blinky project to get started.
Click Copy to start the project…
You need to select a working folder here.
MDK opens and I see on the left the Project Tree.
Most projects contain a file called abstract.txt with important information.
This project simulates a stepper-motor driver using 4 LEDs for each of its phase.
And it is configured for a Simulation
This configuration I get confirmed at the Debug-Options.
The project uses prebuild software components, which are managed by the Runtime Environment.
Just click on the links to see related documentation.
As an example, I open here the documentation on how to Create a RTX 5 Project.
In detail you get introduced to the creation of an application using Keil RTX version 5.
OK, I return to uVision and Build my application
The Build Output Window confirms that there are no errors or warnings
and now I start the integrated MDK Debugger
Btw, the Getting Started Guide that I showed you at the beginning offers a detailed introduction on the Build and Debug process
Let me RUN the simulated Blinky example project…
…and stop it
the program execution halts – in this case at the Idle Thread, a thread that is called if no other thread is at Ready state.
I restart the process flow…
In the Call Stacks and Locals window I can see the various threads that are currently executed.
I again stop my application and open Blinky.c
and open Blinky.c
Let me set a breakpoint at the thread that manages phaseA
I click on Run again and a moment later my application stops at that breakpoint.
Let me add a variable to the Watch Window
...oh, I see its already there – however – I single step through my application and follow the variable change
Let me remove the breakpoint and restart the application.
This is the RTX-RTOS window that shows system state information and running threads for my RTOS application.
I find here again my threads along with details – for example the Stack Usage.
I stop the application and terminate the Debugger.
Let me close that simulated project.
And now let me demonstrate how this works with a real hardware board.
I have available the Keil MCB Development board with a NXP 54000
The Pack Installer confirms the Pack that is required to manage the LPC54000 series.
After completing the Pack installation, I can access the File System Demo Example project that I have selected for my demonstration.
I click on Copy…
…and again, I select a corresponding destination folder.
abstract.txt tells me that this example allows file manipulation.
I power up my board at the USB connector.
…and I insert a SD-Card at the corresponding adapter.
At Options for Target I configure a CMSIS-DAP Debug adapter
…and now I Build and Flash the File System example project.
Oh, I see here that we work with an Evaluation version of MDK, called MDK-Lite
This version is limited to 32Kbyte code size
And does not support the File System Middleware component that is required here with my example project.
The installation of an Evaluation License helps me here.
I re-open uVision with administration rights...
…and select the License Management.
Next, I click on Evaluate MDK Professional
and start an evaluation for 7 days.
The code size limitation is removed now
and the File System Middleware component is supported.
And now I can successfully build my project.
After starting the application, I see that the LCD display confirms the File_Demo example project as active.
At the Debugger I open the Debug-Printf-Viewer.
Here a list of commands is offered
for this demonstration I just decide to format the SD-card.
Well, this ends my tutorial, offering an impression about the Microcontroller Development Kit version 5
that you can download from our website to explore this tool by yourself
I recommend to next see my video, that demonstrates how to blink a LED on a real target with Keil MDK.
If you have additional questions visit keil.com
And if you require further product details, or…
if you are interested in an extension of the evaluation period for the MDK Professional Middleware component
contact our Sales-Team.
Thank you for your attention.