Giter Club home page Giter Club logo

Comments (6)

adamgreig avatar adamgreig commented on August 22, 2024

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.

freiguy1 avatar freiguy1 commented on August 22, 2024

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.

jamesmunns avatar jamesmunns commented on August 22, 2024

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.

freiguy1 avatar freiguy1 commented on August 22, 2024

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.

adamgreig avatar adamgreig commented on August 22, 2024

Are you using semihosting (or panic-semihosting)? Semihosting will generally require an attached debugger to function, and otherwise blocks or panics.

from book.

freiguy1 avatar freiguy1 commented on August 22, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.