Quick Guide to Using the Keil ARM Simulator
1. Run the IDE package that you have downloaded and installed from Kiel’s website I am using µVision V220.127.116.11
2. Click Project, select New Microvision Project Note that on this page I have used bold blue font to indicate your input to the computer and bold red indicates the computer’s response (or option).
3. Enter filename in the File name box. Say, MyFirstExample
4. Click on Save.
5. This causes a box labelled Select Device for Target ‘Target 1’ to pop up. You now have to say which processor family and which version you are going to use.
6. From the list of devices select ARM and then from the new list select ARM7 (Big Endian)
7. Click on OK. The box disappears. You are returned to the main µVision window.
8. We need to enter the source program. Click File. Select New and click it. This brings up an edit box labeled Text1. We can now enter a simple program. I suggest:
AREA MyFirstExample, CODE, READONLY
MOV r0,#4 ;load 4 into r0
MOV r1,#5 ;load 5 into r1
ADD r2,r0,e1 ;add r0 to r1 and put the result in r2
S B S ;force infinite loop by branching to this line
END ;end of program
9. When you’ve entered the program select File then Save from the menu. This prompts you for a File name. Use MyFirstExample.s The suffix .s indicates source code.
10. This returns you to the window now called MyFirstExample and with the code set out using ARM’s conventions to highlight code, numbers, and comments.
11. We now have to set up the environment. Click Project in the main menu. From the pulldown list select Manage. That will give you a new list. Select Components, Environment,Books..
12. You now get a form with three windows. Below the right hand window, select Add Files.
13. This gives you the normal Windows file view. Click on the File of type expansion arrow and select Asm Source file (*.s*; *.src; *.a*). You should now see your own file MyFirstExample.s appear in the window. Select this and click the Add tab. This adds your source file to the project. Then click Close. You will now see your file in the rightmost window. Click OK to exit.
14. That’s it. You are ready to assemble the file.
15. Select Project from the top line and then click on Built target.
16. In the bottom window labeled Build Output you will see the result of the assembly process.
17. You should see something like:
Build target 'Target 1'
Program Size: Code=16 RO-
18. The magic phrase is “0 Error(s)”. If you don’t get this you have to re-