nsdsp_debug_get_slave_info
nsdsp_debug_run nsdsp_debug_single_step nsdsp_debug_multi_step nsdsp_debug_request_halt nsdsp_debug_check_for_halt nsdsp_debug_wait_for_halt nsdsp_debug_get_pc nsdsp_debug_get_soft_bp nsdsp_debug_is_partitioned nsdsp_debug_can_swap nsdsp_debug_is_swapped nsdsp_debug_is_boot_swapped nsdsp_debug_get_flash_word nsdsp_debug_check_for_app nsdsp_debug_get_app_word nsdsp_debug_enable_exec_bp nsdsp_debug_enable_read_bp nsdsp_debug_enable_write_bp nsdsp_debug_disable_bp nsdsp_debug_enable_soft_bp nsdsp_debug_disable_soft_bp nsdsp_debug_read_ram nsdsp_debug_read_rom nsdsp_debug_read_reg nsdsp_debug_read_bp_state nsdsp_debug_read_cp0 nsdsp_debug_read_stack nsdsp_debug_check_for_data nsdsp_debug_wait_for_data nsdsp_debug_fetch_data nsdsp_debug_fetch_data_nb nsdsp_debug_fetch_word nsdsp_debug_fetch_flash_word nsdsp_debug_fetch_float nsdsp_debug_fetch_double nsdsp_debug_fetch_stack nsdsp_debug_fetch_bp_state nsdsp_debug_write_ram nsdsp_debug_write_reg nsdsp_debug_write_float_reg nsdsp_debug_write_double_regnsdsp_debug_get_slave_info
This function extracts Debug Info object necessary to debug a slave core.
Syntax
debug_info_t nsdsp_debug_get_slave_info(
nsdsp_session_t session,
unsigned int core,
unsigned int image_a,
unsigned int image_b,
unsigned int tcy
);
Parameters
session - a reference to the Debug Session Object obtained with nsdsp_session_program_for_debug or nsdsp_start_debug_session function
core - the index of the core. Must be 1.
image_a - the id of the slave image, the id of the slave image for active partition if the slave core is partitioned.
image_b - the id of the slave image for inactive partition. Must be 0 if the slave core is not partitioned.
tcy - instruction cycle period in ns
Return
The function returns a reference to the Debug Info object, or NULL if the operation fails.
Notes
This function can only be used with multi-core dsPIC33CH devices.
The slave core ids are specified during assisted debugging setup using the NSDSP_DBG_SLAVE_IMAGE macro. The ids you have specified with the macro should be used for image_a and image_b parameters. The core images themselves must be programmed by the master core with XC16 _program_secondary() and _program_inactve_secondary() functions before you start debugging. It is up to you to make sure that the slave cores programmed by the master are the same slave cores you specify with image_a and image_b parameters.
Usually there will be only one slave image. In this case, set image_a to 1 and image_b to 0.
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);
nsdsp_set_debug_cores(nsdsp,DEBUG_CORE_S1);
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_slave_info(sess,1,1,0,tcy);
nsdsp_end_session(nsdsp);
// Debugging session for the slave core
sess = nsdsp_start_debug_session(nsdsp,dinf);
// Debugging the slave core here
nsdsp_end_session(nsdsp);
nsdsp_free(nsdsp);
Minimum library version - 163
© 2007-2025 Northern Software Inc. All Rights Reserved.