-
Notifications
You must be signed in to change notification settings - Fork 190
I have a question, oh also, where do I ask questions? #48
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
Comments
Hi! To answer your second question first: good places include the embedded category on the forum and the IRC (#rust-embedded @ irc.mozilla.org). I'd really recommend trying out debugging on embedded, especially with gdb. It can be a really quick and powerful way to solve problems. Even if you're not going to use it for debugging though, you do have to use it to load code via OpenOCD. It should be as simple as If you just want to push a compiled binary to your device, you can actually skip OpenOCD entirely and use vendor supplied tools such as STLink (or the Linux-compatible texane/stlink). There is work ongoing on a new book which will cover programming and debugging in detail, with lots of specific examples for different pieces of hardware. |
Thanks for the quick and helpful response. I think my main problem is inexperience with gdb. I was able to get a blink program with RTFM flashed to my blue pill with gdb. It just seemed cumbersome to build, run gdb, then type |
Issue is already closed, but @freiguy1, make sure to check out
Which would open the connection to the debugger, load your binary, and begin running it. |
Ah, of course. Great idea. I just tried out my project again last night and another issue I have is the software doesn't run (LED isn't blinking) on the blue pill unless it's hooked up to gdb. In other words, if I disconnect my blue pill from my computer and power it with a cell phone charger, the LED doesn't blink. Almost like it's waiting for gdb or openocd to give it the go ahead? |
Are you using semihosting (or panic-semihosting)? Semihosting will generally require an attached debugger to function, and otherwise blocks or panics. |
@adamgreig aww - I didn't see your reply. I absolutely am and that was the issue. I just figured it out and was hoping to enlighten everyone :) Thanks again! |
When it comes to embedded development, I'm fairly used to not debugging. On a related note I'm not used to gdb. Is there any way I can build with cargo and then just use openocd to push the compiled bytes to my device? All the documentation I've seen requires gdb to flash the program to the board. Would this be worth adding to the book?
Secondly, where do I ask questions about embedded rust dev? Making an issue like this seems a bit clunky, but I couldn't find any info related to this topic either.
The text was updated successfully, but these errors were encountered: