-
I just don't know were to stick this NRF.sleep() call?
well if you need to debug startup then I don't know about such way, in theory we could add some option to not start advertising automatically. You can also compile bluetooth module out for debugging startup. In other cases just run it fully, then execute NRF.sleep() in console or NRF.sleep() /wake() mapped to something like button click and then set breakpoints as you wish when it is sleeping. it is easier to do this with console over serial (or usb with that 52840 devboard), then you can type it directly as needed
BTW som more info here https://devzone.nordicsemi.com/f/nordic-q-a/9622/application-debug-with-softdevice
I've seen some macro somewhere for gdb for setting PRIMASK automatically when beakpoint is hit
So now i think i'm at this step.
When i'm stepping through the program from the very start.
In targets/nrf5x/jshardware.c - once i hit jsble_init() the software crashes. It seems to happen both my NRF52840 dev board and my pinetime. Just in different spots.
I just don't know were to stick this NRF.sleep() call?