-
Notifications
You must be signed in to change notification settings - Fork 56
Conversation
rubble-nrf51
/nRF51 supportrubble-nrf51
/nRF51 support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good, nice to support these chips again! Would be nice to share more code between the nrf51 and nrf52 implementations though :/
Another thing to do before merging: Test the demo on actual nRF51 hardware, making sure that connection and service enumeration works. |
Doing that now, CI should also be testing that it builds on thumbv6 targets |
So I modified the demo slightly for the nRF51, rubble-demo-nrf51. There appear to be 2 issues. The first is that logging does not appear to be working. Serial works, as The second is that connecting hangs, but due to issue number 1, I don't really know how to go about diagnosing it. |
|
Sorry I meant |
Maybe there's a bug in jamesmunns/bbqueue#27 that causes all data put in a bbqueue to get lost? Just a guess though. |
Removed all the cfg's for logging, and now I get:
Progress? Still appears in nRF connect, connecting still hangs. |
I'm pretty sure all those |
But |
I'll make those changes in my fork and see what happens :) |
Well, it would probably cause a data race and thus undefined behavior, so the program can do anything. How is the RAM usage? IIRC the log buffer is quite large. Do you have 32 or 16 KiB RAM on the chip? You could be running out of stack space. EDIT: Okay, the incorrect atomics wouldn't immediately be UB on their own, but bbqueue also manages the queue memory unsafely, and I can see that blowing up when the atomics don't always work correctly. |
The nRF51822 I have has 32K RAM, 256K flash. Maybe I should try that stack size tool? |
No, the nRF52810 we were using only has 24K of RAM, so it can't be that |
https://www.adafruit.com/product/2267
|
Release build has interesting output:
|
???? https://doc.rust-lang.org/core/sync/atomic/enum.Ordering.html#variant.AcqRel
|
|
🤦♂ |
Putting compiler fences everywhere doesn't appeared to have worked :( |
Hmm, then I'm not sure what could cause this. I do remember seeing this myself, however (on a nRF52810). Not sure why it happened or how it got fixed. |
The advertisement is showing up continuously though? Then there's definitely something wrong with the log queue not being filled/drained properly (once it's full it should panic). Or is the UART going silent? |
Co-Authored-By: Jonas Schievink <[email protected]>
Co-Authored-By: Jonas Schievink <[email protected]>
Updated to log 0.4.7 after Jonas's changes were merged :) |
Superseded by #97 |
Closes #25.
Following must be complete before we can merge:
log
release so we can remove that git dependencyrubble-demo