-
-
Notifications
You must be signed in to change notification settings - Fork 791
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
Program crashes with SIGSEGV when connecting to BLE while monitor rtt is enabled #2089
Comments
What version of BMD are you running ( BMD v2.0, for now, has to halt the target to do RTT things as we don't know for certain if there aren't side-effects to accessing memory without halting (nobody has yet documented if it causes cycle stealing either from the core or from the bus matrix so we can lay out the limitations of doing this) and before blanket enabling this for this target (note: it cannot be done for all Cortex-M targets, not all support reading without halting! Eg, TM4C123 parts give garbage back if you don't halt first) we want to get these limitations documented so we can have some place to point to when people find it doesn't work quite how they thought it would (if it turns out there is cycle stealing going on). |
I used 1.10.2, however I just updated to 2.0.0-rc2 and found the same behavior. Steps:
Second scenario:
JLink:
It seems like the halting really is the issue as you describe it. It sounds like the JLink is able to access the data without halting as I can just connect it and open the RTT terminal without going into a debug mode or restarting the firmware. |
@dragonmux @kat-brickxter I have seen a very similar behavior when debugging a Bluetooth application on nRF5340 using a JLink when a breakpoint is hit, i.e. the DUT is halted. In my opinion, the BT stack and/or the Soft Device just falls apart when the MCU is halted. To date I have not found any work-around for this. I have seen it using CortexDebug in VSCode and also with Ozone, the Segger debugger. |
There is PR2037 from 2 months ago which closes this issue if you just need to continue working/debugging with BMP, please give that unmerged branch a try. Ping me if I should rebase it into recently tagged v2.0.0-rc2. However, I did not dedicate any time to documenting the amount of bus cycle stealing. |
@ALTracer Thanks, that may help the OP's issue. |
The program crashes on my nrf52840 when I connect to Bluetooth LE with "Program received signal SIGSEGV, Segmentation fault." It only crashes when I start the program from the blackmagic probe and when monitor rtt is enabled. When monitor rtt is disabled or I read the RTT messages with a JLink device, the program works without problems.
The text was updated successfully, but these errors were encountered: