Having gotten through the hurdles of getting my IAR project to compile and run on Segger Embedded Studio, I am now seeing different behavior between the two IDEs while debugging and am wondering if I still need to configure something correctly on the Segger.
When I download this project into IAR, I can run, set breakpoints, single-step, as expected. Because this project includes a Softdevice (4.0.2), I expect to have to set the PRIMASK bit as directed in . https://devzone.nordicsemi.com/question/53488/application-debug-with-softdevice/. If set this bit, run for a few seconds, then stop and clear this bit, I can make use of breakpoints for several minutes and still have interrupt-based functions such as the timers work. Eventually, the code will hit a fault handler ISR, at which point I can reset it, repeat this process, and get some more debugging time.
On the Segger side, I can set the PRIMASK bit true and use breakpoints, with the same caveat that setting PRIMASK masks all user-configurable interrupts. If I then set PRIMASK back to 0, instead of getting some time where breakpoints can be used, the code immediately jumps to ISR Handler ExternalISR9. My attempt at getting some data for a few minutes before the ISR gets hit works with IAR, but with Segger I can't get the same result.
Could this be related to Segger's Project -> Options menu that IAR handles something correctly and I still don't have set right on the Segger side? Or am I perhaps getting lucky with IAR on something that shouldn't work, but does long enough for me to collect data?
Thanks,
Mike Marks