Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck on 5.3 Debug it - continue hangs #7

Closed
zanebliss opened this issue Oct 7, 2024 · 3 comments
Closed

Stuck on 5.3 Debug it - continue hangs #7

zanebliss opened this issue Oct 7, 2024 · 3 comments

Comments

@zanebliss
Copy link

zanebliss commented Oct 7, 2024

I came here after seeing this issue in the Discovery repository.

I'm followed the step and installation steps in this repository, and I'm running into issues with the gbd debugger hanging on the example in 5.3 when running the continue command.

(gdb) target remote :1337
Remote debugging using :1337
0x00000172 in init::__cortex_m_rt_main () at mdbook/src/05-meet-your-software/examples/init.rs:19
19              wfi();
(gdb) break main
Breakpoint 1 at 0x15c: file mdbook/src/05-meet-your-software/examples/init.rs, line 10.
Note: automatically using hardware breakpoints for read-only addresses.
(gdb) continue
Continuing.

next produces a SIGINT.

(gdb) next

Program received signal SIGINT, Interrupt.
0x00000172 in init::__cortex_m_rt_main () at mdbook/src/05-meet-your-software/examples/init.rs:19
19              wfi();
@BartMassey
Copy link
Member

There's been a lot of these kinds of things lately. I suspect we have a bug in our instructions somewhere. That said, these are hard for us to reproduce. What platform are you on. What gdb are you using and how did you install it? Did you compile for debug? Any information appreciated as we try to work this out.

@zanebliss
Copy link
Author

Thanks for the response.

I'm on Pop!_OS 22.04 LTS, with an 11th Gen Intel i7-1185G7 CPU, Intel TigerLake-LP GT2 graphics.

For gbd, --version outputs GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1. I installed it with this command, from this source: sudo apt install gdb-multiarch minicom libunwind-dev.

After reviewing this again, I reran the commands under the udev rules section, specifically sudo udevadm control --reload. A yellow LED on my micro:bit 2 turned on, which wasn't on before. I had glossed over this section in discovery-mb2 because I had already done it in discovery and assumed it wasn't any different. After that, the continue command worked correctly.

I should have been more thorough. Since I'm no longer stuck, I'm going to close this.

@BartMassey
Copy link
Member

Thanks for letting us know! Glad you got it working.

If you spot any differences between the instructions in discovery-mb2 and those in discovery, it would be good to hear of them; I too thought that part stayed pretty much the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants