Comments (6)
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 target :3333
followed by load
, but the various tutorials and readmes are probably a better starting place.
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.
from book.
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 continue
, next
, next
to get my program running each time I make a change. Also it seems I'm not exiting gdb correctly because my blinking led stops blinking. I'm being intentionally vague here because I can't remember each detail since it's been a few weeks.
from book.
Issue is already closed, but @freiguy1, make sure to check out .gdbinit
, you can specify commands to execute every time you load gdb. For example, you might have something like this:
target remote :3333
load
continue
Which would open the connection to the debugger, load your binary, and begin running it.
from book.
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?
from book.
Are you using semihosting (or panic-semihosting)? Semihosting will generally require an attached debugger to function, and otherwise blocks or panics.
from book.
@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!
from book.
Related Issues (20)
- Issue with Macbook Pro M1 HOT 1
- any plan on supporting microbit board? HOT 2
- Adding a small explanations on hardware exceptions vs software exceptions
- Segmentation fault HOT 1
- zsh: no such file or directory: gdb
- Apple Silicon can't install gdb, lldb instructions needed? HOT 3
- I think this repository can support more languages HOT 21
- How would one cite this book in an academic resource? HOT 5
- Where can I find the definition of the set_timer_1hz function?
- GDB blocks after running the continue command in 2.2-hardware HOT 1
- Doens't Work Verification OPENOCD
- Concurrency / Atomic access section contains factual errors HOT 6
- Discuss the usage of the `log` crate HOT 2
- Mention the critical-section crate?
- Memory-mapped Registers: does `W` give read access to the register?
- Interoperability: On the availability of `std::ffi` and `std::os::raw` in `core` HOT 1
- linking failed when using own svd2rust library
- Is there a procedure required to translate the repository into another language? HOT 11
- Links to other resources HOT 2
- Tooling page is significantly outdated HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from book.