Lesson 06: Create an ARM Assembly Language Program (Keil MDK-ARM)

You will learn how to create an ARM assembly language program with the basics of the Keil MDK-ARM development system.

Procedures

Create an Assembly Project

Start up Keil μVision 5
  • Start up Keil µVision5 by clicking on the icon Icon Keil from the desktop or form "Start" menu or "All Programs" on your computer. The following screen is what you will see.
    00 Keil uVision5 s
Create a Project

Next, you will use Keil μVision to create an assembly project and execute this program on your target Tiva board.

Before you create an new project, you are recommended that you create a folder to hold all your projects and files. For example: you can have a folder "EE3450_Lab" ready before hand.

Let's create your first ARM μVision project now.

  1. Click on the "Project" menu form the μVision main window and select "New µVision Project"
  2. Select the project folder that you prepared for, give project a name "MyFirstASM", then click on "save" button
    01 NewProjectName s
  3. From the "Select Device for Target 'Target1'... " dialog, you now have to select which processor family and which version you are going to use
    1. EK-TM4C1231GXL board: from the list of devices select Texas Instruments➤Tiva C Series➤TM4C123x Series and then from the new list select TM4C123GH6PM. Click on OK
    2. EK-TM4C1294XL board: from the list of devices select Texas Instruments➤Tiva C Series➤TM4C129x Series, and then from the new list select TM4C1294NCPDT. Click on OK
    02 SelectCPU s
  4. Do not select any software component from Manage Run-Time Environment dialog. Just click on OK and you will return to the main µVision 5 windows
    03 Run time Environment s
Create and Add Source File to the Project

Next, you will create an assembly source file to your first project.

  1. Expand the Target 1 on the Project Windows, right click on "Source Group 1" and then select "Add New Item to Group 'Source Group 1'..."
    04 AddNewFile s
  2. In the pop-up dialog, select file type to Asm File (.s), enter Name "main". Click on "Add" button
    05 NewASM s
  3. Now, you've created an assembly project for Tiva board, and you will see the "main.s" edit window on the main screen. This is the place you will write your ARM assembly language program. Next, you will copy and paste the Assembly Sample Firmware code into this window.
    06 uVisionMainWindow s

  

© 2024 Air Supply Information Center (Air Supply BBS)