jonas-schievink / rubble

(going to be a) BLE stack for embedded Rust
BSD Zero Clause License
397 stars 56 forks source link

Getting started #174

Closed 0b-code closed 3 years ago

0b-code commented 3 years ago

Apologies for the noob questions I am fairly new to embedded stuff and having a gdb question. Trying to run some of the demos here, after copying to .gdbinit, get to gdb prompt, but unsure how to proceed. Looking at docs says should do something like target remote :3333, but target not found. Try using serial target, but get timeouts. Any help appreciated. Thanks!

jonas-schievink commented 3 years ago

Hi! I highly recommend working through the Discovery book if you're new to embedded. It goes through the process of connecting GDB to your target device via OpenOCD.

Bluetooth LE is fairly complex, and rubble isn't very user-friendly yet, so starting with the discovery book should be much more enjoyable.

0b-code commented 3 years ago

Hey thanks for responding so quickly! Have gone through a few projects that are a bit more sophisticated than your link and OpenOCD/GDB usually work out of the box (if they are used at all). BLE may be complex, but this repo is fairly easy to follow, which is awesome. The only issue is that the demo does not work, which means debugging is more difficult.

0b-code commented 3 years ago

Is it possible target not supported? Working from nrf52833, which does have a feature flag, but is not listed as supported in the readme

jonas-schievink commented 3 years ago

It should work in theory, though I've never tried it. I would expect this to work like any other nRF project for your hardware.

0b-code commented 3 years ago

So to be clear, intended behavior is that beacon should not launch immediately, but should go through GDB? Usually workflow is openocd -f openocd.cfg to (gdb) target remote :3333 or (gdb) /some/serial_target and load continue etc. From your latest PR seems like you might be willing to recommend a rust-native workflow, which would be awesome too

edit: Okay so using your PR appears to work! Still having trouble with beacon though

0b-code commented 3 years ago

To clarify edit, probe-run --chip nRF52833_xxAA appears to work with beacon, but not visible.

update: newly merged PR (including sharing config) does not fix. Tests work, but still no beacon.

0b-code commented 3 years ago

Seems like this may have to do with Micro:bit BLE profile, which is a bit frustrating since this could be solid recommended hardware board. Not closing yet though since still should be able to work

0b-code commented 3 years ago

Closing and confirming this works on Micro:bit and nrf52833!