Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Creating a program using ARM assembly language (Keil uVision5). For this and the next few assignments, Target memory should be configured to use only the

Creating a program using ARM assembly language (Keil uVision5).

For this and the next few assignments, Target memory should be configured to use only the on-chip RAM of the microcontroller, with half (64K bytes) used for the program code area, beginning at address 0x20000000, and half used for the data area, beginning at 0x20010000. Write and test a short assembly language program to perform the following computation.

Bob = (Sue - Joe) + (Ann - 13)

a. Create a Data Area and allocate space for one 32-bit word for each of the four variables Sue, Joe, Ann, and Bob (in that order). These should be initialized to the following values: Sue = 100, Joe = -200, Ann = 300, Bob = -1

b. The program is to set up and use a separate memory pointer register for each variable, to read/write the variables.

c. In the memory window of the debugger, you will likely see all 0s, which reflects the random state of RAM when the actual microcontroller powers on. You can create the above test values for your debug session as follows. With a debug initialization file:

1. On the Debug tab of Options for Target, select an Initialization File, which contains commands to be performed by the debugger with it starts.

2. My debug initialization file (debug.ini) contains the following: PC=0x20000000 //Starting PC Counter Address xPSR=0x01000000 //Set Condition Register to Thumb Mode E INT 0x20010000 = 100,-200,300,-1 //Initial memory data values In the last line, E tells the debugger to Enter values into memory, as INT types (32-bit integers), beginning at address 0x20010000, with a list of four values to be inserted into successive words of memory.

3. In lieu of a debug initialization file, the above commands can be entered in the command window of the debugger at any time during the debug session. Interactively, in the Memory 1 window:

1. Select the data memory starting address of 0x20010000 in the Memory 1 window.

2. Right click in the Memory 1 window, and change its format to display memory contents as 32- bit signed decimal numbers, by selecting Decimal and also Signed > Int.

3. Right click on the first data value in memory to be changed (at address 0x20010000) and select Modify Memory at 0x20010000. In the dialog box that appears, enter the list of values you want to place in memory words, using the signed decimal format you selected in Step 2, and beginning at that address. (Ex. 100, -200, 300, -1, etc.)

4. Alternatively, you can double click on any memory value that you want to enter, which highlights it, and then change it to the desired value.

d. Open a Watch window and display the values of the four variables Sue, Joe, Ann, and Bob.

e. Execute the program one step at a time, watching the values of the registers, memory locations, and watch variables.

f. After executing the last instruction, copy and paste the debugger window to a Word document (ALTPrint Screen will capture the debug window to the Windows clip board, and then paste in a Word document). In the debuggers Memory window, highlight or circle the final value of varaible Bob.)

g. Hand-calculate the result and then write your answer on the debug window printout, and indicate whether it matches the result produced by the program.

h. Print and turn in your assembly language source program and the captured, annotated debugger window.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

More Books

Students also viewed these Databases questions

Question

=+Have you acquired the ability to read,

Answered: 1 week ago