Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
are_we_embedded_yet
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
Model registry
Operate
Environments
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
John
are_we_embedded_yet
Commits
923edb8b
Commit
923edb8b
authored
7 years ago
by
Jorge Aparicio
Browse files
Options
Downloads
Patches
Plain Diff
mention the `disassemble` GDB command
parent
58eb6e02
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/Quickstart.md
+17
-2
17 additions, 2 deletions
doc/Quickstart.md
with
17 additions
and
2 deletions
doc/Quickstart.md
+
17
−
2
View file @
923edb8b
...
...
@@ -88,7 +88,7 @@ commands check out the [troubleshooting guide][troubleshoot].
$
# fetch the Cargo project template
$
cargo clone cortex-m-quickstart
$
# rename it as you wish
$
# rename it as you wish
(remember this name! you'll use it later)
$
mv
cortex-m-quickstart app
$
cd
app
...
...
@@ -414,6 +414,21 @@ about to execute using the `list` command:
340 #
[
cfg
(
not
(
has_fpu
))]
```
And you can print the machine code that the processor is about to execute using the
`disassemble`
command.
```
console
(gdb) disassemble
Dump of assembler code for function cortex_m_rt::reset_handler:
0x08000130 <+0>
: push
{
r7, lr
}
0x08000132 <+2>
: mov r7, sp
0x08000134 <+4>
: sub sp,
#32
=>
0x08000136 <+6>: movw r0,
#0
0x0800013a <+10>
: movw r1,
#0
0x0800013e <+14>
: movt r0,
#8192 ; 0x2000
0x08000142 <+18>
: movt r1,
#8192 ; 0x2000
```
We can skip to our program
`main`
by creating a breakpoint and then calling
`continue`
.
```
console
...
...
@@ -461,7 +476,7 @@ xPSR: 0x01000000 pc: 0x08000400 msp: 0x20005000, semihosting
This is the same command we ran before from the
`telnet`
prompt.
You can
find the
list of all the GDB commands
[
here
][
gdb-commands
]
.
Tip:
You can
get
list of all the GDB commands
by entering
`help all`
in the GDB prompt
.
Note that semihosting is
*very slow*
. Each write operation takes
*hundreds*
of milliseconds; the
processor will be in a halted state for the duration of the write operation. Semihosting is nice
...
...
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