Buy Contact NSDSP Home

nsdsp_start_debug_session

This function restarts a debug session. The function requires Debug Info object which can be obtained from an existing Debug Session with nsdsp_debug_get_info or nsdsp_debug_get_slave_info function.

Syntax

nsdsp_session_t nsdsp_start_debug_session(
        nsdsp_t           nsdsp,
        debug_info_t      info
);

Parameters

nsdsp - a reference to the NSDSP object returned by nsdsp_connect function

info - a reference to the Debug Information Object returned by the nsdsp_debug_get_info or nsdsp_debug_get_slave_info function

Return

The function returns the Session object, or NULL if something fails.

Example

  hex_map_t hm;
  mcu_t mcu;
  nsdsp_session_t sess;
  nsdsp_t nsdsp;
  debug_info_t dinf;
  int tcy;

  hm = hex_map_read("your_hex_file.hex",NULL);
  nsdsp = nsdsp_connect(NULL);

  sess = nsdsp_start_prog_session(nsdsp,mcu,0);
  nsdsp_session_check_id(sess,1);
  nsdsp_session_program_for_debug(sess,hm,tcy);
  dinf = nsdsp_debug_get_info(sess);

  // Debugging here

  nsdsp_end_session(nsdsp);

  // Restarting without re-programming the chip
  sess = nsdsp_start_debug_session(nsdsp,dinf);

  // Debugging here

  nsdsp_end_session(nsdsp);
  nsdsp_free(nsdsp);

 

Minimum library version - 163

Northern Software Home NSDSP Contact Us Purchase/View Cart

© 2007-2025 Northern Software Inc. All Rights Reserved.