This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Break point problem

I wants to use break point in project but when i set break point then 4 or 5 times working after that goes to NRF_BREAKPOINT_COND, I am using nRF52832. so guide me where is the problem.


NRF_BREAKPOINT_COND;
// On assert, the system can only recover with a reset.

#ifndef DEBUG
NRF_LOG_WARNING("System reset");
NVIC_SystemReset();
#else
app_error_save_and_stop(id, pc, info);
#endif // DEBUG
}

Parents
  • Hi,

    I assume you're debugging a BLE application? In that case, the error is likely reported by the Softdevice. One of the challenges when debugging with the Softdevice, or any other protocol stack with hard timing requirements for that matter, is that it will fail to meet those timing requirements if the CPU gets halted for too long. To avoid this error, you have to always make sure to reset the device after hitting a breakpoint. 

    Logging is also helpful. Please follow the steps below if you have not enabled it already.

    Steps to enable debug logging in SES

    1. Ensure you have the following configuration settings in sdk_config.h

    NRF_LOG_BACKEND_RTT_ENABLED 1

    NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED 0

    2.  Select the debug project configuration before building the project. This configuration sets the "DEBUG" flag which will make the app error handler log more error information if an error occurs.

    3. Start a new debug session. The debug messages should now appear in the debug terminal window.

  • After Implementing monitor mode debugging below error is comming

    Output/ble_app_uart_c_pca10040_s132 Release/Obj/JLINK_MONITOR_ISR_SES.o: In function `DebugMon_Handler':
    1> D:\NORDIC\Nordic\sdk\nRF5_SDK_16.0.0\nRF5_SDK_16.0.0\examples\ble_central\ble_app_uart_c/JLINK_MONITOR_ISR_SES.s:159: undefined reference to `JLINK_MONITOR_OnEnter'
    1> Output/ble_app_uart_c_pca10040_s132 Release/Obj/JLINK_MONITOR_ISR_SES.o: In function `_WaitForJLinkCmd':
    1> D:\NORDIC\Nordic\sdk\nRF5_SDK_16.0.0\nRF5_SDK_16.0.0\examples\ble_central\ble_app_uart_c/JLINK_MONITOR_ISR_SES.s:183: undefined reference to `JLINK_MONITOR_OnPoll'
    1> Output/ble_app_uart_c_pca10040_s132 Release/Obj/JLINK_MONITOR_ISR_SES.o: In function `_HandleRestartCPU':
    1> D:\NORDIC\Nordic\sdk\nRF5_SDK_16.0.0\nRF5_SDK_16.0.0\examples\ble_central\ble_app_uart_c/JLINK_MONITOR_ISR_SES.s:228: undefined reference to `JLINK_MONITOR_OnExit'
    Build failed

    pls. suggest.

Reply
  • After Implementing monitor mode debugging below error is comming

    Output/ble_app_uart_c_pca10040_s132 Release/Obj/JLINK_MONITOR_ISR_SES.o: In function `DebugMon_Handler':
    1> D:\NORDIC\Nordic\sdk\nRF5_SDK_16.0.0\nRF5_SDK_16.0.0\examples\ble_central\ble_app_uart_c/JLINK_MONITOR_ISR_SES.s:159: undefined reference to `JLINK_MONITOR_OnEnter'
    1> Output/ble_app_uart_c_pca10040_s132 Release/Obj/JLINK_MONITOR_ISR_SES.o: In function `_WaitForJLinkCmd':
    1> D:\NORDIC\Nordic\sdk\nRF5_SDK_16.0.0\nRF5_SDK_16.0.0\examples\ble_central\ble_app_uart_c/JLINK_MONITOR_ISR_SES.s:183: undefined reference to `JLINK_MONITOR_OnPoll'
    1> Output/ble_app_uart_c_pca10040_s132 Release/Obj/JLINK_MONITOR_ISR_SES.o: In function `_HandleRestartCPU':
    1> D:\NORDIC\Nordic\sdk\nRF5_SDK_16.0.0\nRF5_SDK_16.0.0\examples\ble_central\ble_app_uart_c/JLINK_MONITOR_ISR_SES.s:228: undefined reference to `JLINK_MONITOR_OnExit'
    Build failed

    pls. suggest.

Children
No Data
Related