Skip to content
Snippets Groups Projects
Commit fdf160ec authored by Ruben Asplund's avatar Ruben Asplund
Browse files

Exercise E

parent ccf25197
Branches
No related tags found
No related merge requests found
...@@ -212,6 +212,22 @@ fn timed_loop() -> (u32, u32) { ...@@ -212,6 +212,22 @@ fn timed_loop() -> (u32, u32) {
// (gdb) info registers // (gdb) info registers
// //
// [Register dump here] // [Register dump here]
// r0 0x80000000 -2147483648
// r1 0xe0001004 -536866812
// r2 0x3e8 1000
// r3 0xa 10
// r4 0x20000000 536870912
// r5 0x20000430 536871984
// r6 0x0 0
// r7 0x2000ffe8 536936424
// r8 0x0 0
// r9 0x0 0
// r10 0x0 0
// r11 0x0 0
// r12 0x1 1
// sp 0x2000ff98 0x2000ff98
// lr 0x8000373 134218611
// pc 0x800023e 0x800023e <rtt_timing::timed_loop+12>
// //
// We can now set a breakpoint exactly at the `nop`. // We can now set a breakpoint exactly at the `nop`.
// //
...@@ -236,18 +252,18 @@ fn timed_loop() -> (u32, u32) { ...@@ -236,18 +252,18 @@ fn timed_loop() -> (u32, u32) {
// //
// (gdb) x 0xe0001004 // (gdb) x 0xe0001004
// //
// [Your answer here] // [ 0xb0ccc188 ]
// //
// Now, let's execute one iteration: // Now, let's execute one iteration:
// (gdb) continue // (gdb) continue
// //
// What is now the current value of the cycle counter? // What is now the current value of the cycle counter?
// //
// [Your answer here] // [ 0xb0ccc18c ]
// //
// By how much does the cycle counter increase for each iteration? // By how much does the cycle counter increase for each iteration?
// //
// [Your answer here] // [0xb0ccc18c - 0xb0ccc188 = 0x4]
// //
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// F) Reseting the cycle counter // F) Reseting the cycle counter
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment