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

Debug BLE "Softdevice"

I recently got the nRF52-DK for using as BLE Relay evaluation.

I have downloaded following and installed to run the code

- Segger Embedded Studio (v5.1)

- nRF5_SDK_17.0.2_d674dde

1. I have searched the forum and others saying debugger cannot be used when "Stop" and "Continue"

as BLE Stack is using same CPU to run.  Is this still the limitation now ?

2. Also, the local variable cannot be added to watch, is this limitation in Segger ?

Parents
  • debugger cannot be used when "Stop" and "Continue" as BLE Stack is using same CPU to run.  Is this still the limitation now ?

    Yes - you still need the Monitor Mode Debug.

    the local variable cannot be added to watch

    That's not true.

    However - as for any modern compiler and any IDE - you have to beware of compiler optimisation. This is a standard 'C' programming thing; not specific to Nordic or Segger - or even embedded.

  • my mistake , I meant to refer to "static variable".

    In below example : 

    static ble_evt_t const *p_local_evt;

    static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context)
    {
          // For readability.
          p_local_evt = p_ble_evt;
    }

    The "p_local_evt" will not able to perform "Quick Watch".  But it works if I removed "static".

    I know this has nothing to do with Nordic or firmware.

    Just wonder this is known issue in Segger as well... As I am using TI (CCStudio) has same issue.

Reply
  • my mistake , I meant to refer to "static variable".

    In below example : 

    static ble_evt_t const *p_local_evt;

    static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context)
    {
          // For readability.
          p_local_evt = p_ble_evt;
    }

    The "p_local_evt" will not able to perform "Quick Watch".  But it works if I removed "static".

    I know this has nothing to do with Nordic or firmware.

    Just wonder this is known issue in Segger as well... As I am using TI (CCStudio) has same issue.

Children
Related