Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rtic_f4xx_nucleo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ruben Asplund
rtic_f4xx_nucleo
Commits
fdf160ec
Commit
fdf160ec
authored
4 years ago
by
Ruben Asplund
Browse files
Options
Downloads
Patches
Plain Diff
Exercise E
parent
ccf25197
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/rtt_timing.rs
+19
-3
19 additions, 3 deletions
examples/rtt_timing.rs
with
19 additions
and
3 deletions
examples/rtt_timing.rs
+
19
−
3
View file @
fdf160ec
...
...
@@ -212,6 +212,22 @@ fn timed_loop() -> (u32, u32) {
// (gdb) info registers
//
// [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`.
//
...
...
@@ -236,18 +252,18 @@ fn timed_loop() -> (u32, u32) {
//
// (gdb) x 0xe0001004
//
// [
Your answer here
]
// [
0xb0ccc188
]
//
// Now, let's execute one iteration:
// (gdb) continue
//
// 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?
//
// [
Your answer here
]
// [
0xb0ccc18c - 0xb0ccc188 = 0x4
]
//
// ------------------------------------------------------------------------
// F) Reseting the cycle counter
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment