Hi, Can I debug BLE program? for example ble_app_hrs and ble_app_proximity. If not, why and how can I test and evaluate my BLE proram ?
Best Regards
Hi, Can I debug BLE program? for example ble_app_hrs and ble_app_proximity. If not, why and how can I test and evaluate my BLE proram ?
Best Regards
Setting PRIMASK to 1 will not stop any interrupt source from generating interrupt request signals. It only prevents the CPU from entering any exception (with configurable priority, i.e. all interrupts except RESET, NMI and HardFault) as long as PRIMASK is 1. That is also the reason why the sd_* calls won't work while PRIMASK is 1 as they are implemented as SVCalls, which triggers an interrupt which executes the SD functions.
Add the following line in you code just before breakpoint:
__ASM volatile ("MSR primask, %0" : : "r" (0x1) : "memory");
This will set PRIMASK register. You will be able to step debuger until you hit one of the sd_ calls.
Works like a charm! Thank you.
So one will need to modify their source at any location where a breakpoint is needed? yikes! So what is the best tool chain for Nordic that works well? Where is the information for how to get started debugging (like setup and to breakpoint)? I am presently seeking a flexible easy to toolchain for bluetooth arm cortex development. Hoping I can do it with Nordic as the target, but if the evaluation dk toolchain is too much a maze of issues with nordic I will be seeking another supplier. Does amaze me how companies will spend a fortune and then not do and give a series of proven steps to use (develop) with their product.
Using the Black Magic Probe debugger, PRIMASK is not broken out as a separate register, so the following is equivalent:
define hook-stop set $special=($special | 1) end define hook-run set $special=($special & ~1) end define hook-continue set $special=($special & ~1) end