In this exercise, you will execute assembly code on the Nucleo-F401RE
board using the Keil MDK Debugger
to examine its execution at the processor level.
This exercise is from the Efficient Embedded Systems Education Kit .
Please make sure to read and go through the Getting Started with MDK documentation or Learning Path if you are unfamiliar with its usage.
Open the CMSIS Pack Installer
and install the necessary CMSIS Packs
for the STM32F401
and Nucleo
boards.
Close the Pack installer and return to the uVision IDE.
Go to ‘Project’ > ‘New uVision Project’, and create a project.
A window will show up requesting you to select the target device for the project. select STM32F401RE
, as shown in this image:
Next, you will be required to select software components/packages that you wish to include in your project.
Add CMSIS
> Core
and Device
> Startup
.
Your project should now look like this:
Next you need to configure some options for the target. Select the Options for target
icon shown below.
Then under the C/C++
tab set the Language C
option to c99
and the Optimization
level to -O1
.
Also, under the Debug
tab, make sure to set the debugger to ST-Link Debugger
.
You are ready to start writing the program.