Commit 1e6247e
Merge #239
239: QEMU debugging updates r=adamgreig a=blelem
Addressing a few issues:
Fixes #237, Fixes #234, Fixes #217
The biggest issue this PR is addressing is correcting the "debugging QEMU with GDB" section that really didn't work with latest ARM toolchain (on my setup), because of two things:
- gdb didn't map the rust libcore functions properly. For example, after connecting to a QEMU instance, it did not show the current PC to be on the Reset function, but some random method.
- gdb didn't step over (`next`), after breaking at `main`. It just ran to the end of the program.
The user is now instructed to disable the LDD and use the GNU ARM linker instead, which addresses the issues with the mapping.
And instead of doing a simple, `break main` which did not allow the user to step over after hitting the breakpoint, the user is now guided to do a more complicated,
`break hello::__cortex_m_rt_main`. After hitting that breakpoint, the `next` and `step` commands are working as one would expect.
I am no expert in embedded rust, so the proposed solution may not be optimal, but I think they are better than the current instructions provided by the book which are not working at all on my setup. (Windows 10, with latest versions of QEMU, ARM toolchain, Rust)
Co-authored-by: Berthier Lemieux <berthier.lemieux@u-blox.com>3 files changed
+50
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| |||
151 | 154 | | |
152 | 155 | | |
153 | 156 | | |
154 | | - | |
155 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
156 | 165 | | |
157 | 166 | | |
158 | 167 | | |
| |||
201 | 210 | | |
202 | 211 | | |
203 | 212 | | |
204 | | - | |
205 | | - | |
206 | 213 | | |
207 | 214 | | |
208 | 215 | | |
| |||
480 | 487 | | |
481 | 488 | | |
482 | 489 | | |
| 490 | + | |
483 | 491 | | |
484 | 492 | | |
485 | 493 | | |
486 | 494 | | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
487 | 503 | | |
488 | | - | |
| 504 | + | |
489 | 505 | | |
490 | 506 | | |
491 | | - | |
| 507 | + | |
492 | 508 | | |
| 509 | + | |
493 | 510 | | |
494 | 511 | | |
495 | | - | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
496 | 527 | | |
| 528 | + | |
497 | 529 | | |
498 | 530 | | |
499 | 531 | | |
| |||
502 | 534 | | |
503 | 535 | | |
504 | 536 | | |
505 | | - | |
506 | | - | |
| 537 | + | |
| 538 | + | |
507 | 539 | | |
508 | 540 | | |
509 | 541 | | |
| |||
514 | 546 | | |
515 | 547 | | |
516 | 548 | | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
| 549 | + | |
526 | 550 | | |
527 | 551 | | |
528 | 552 | | |
| |||
0 commit comments