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 thedevelopment system.
Create an Assembly Project
Start up Keil μVision 5
- Start up Keil µVision5 by clicking on the icon from the desktop or form "Start" menu or "All Programs" on your computer. The following screen is what you will see.
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.
- Click on the "Project" menu form the μVision main window and select "New µVision Project"
- Select the project folder that you prepared for, give project a name "MyFirstASM", then click on "save" button
- From the "Select Device for Target 'Target1'... " dialog, you now have to select which processor family and which version you are going to use
- Texas Instruments➤Tiva C Series➤TM4C123x Series and then from the new list select TM4C123GH6PM. Click on OK 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 board: from the list of devices select
- 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
Create and Add Source File to the Project
Next, you will create an assembly source file to your first project.
- 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'..."
- In the pop-up dialog, select file type to Asm File (.s), enter Name "main". Click on "Add" button
- 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.