Buy Contact NSDSP Home

nsdsp_set_debug_ram

This function specify the RAM location for the debugger.

Syntax

void nsdsp_set_debug_ram(
        nsdsp_t           nsdsp,
        unsigned int      addr
);

Parameters

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

addr - the address of the reserved RAM

Notes

Some of the target devices do not have built-in RAM areas for debugging. For such devices, you need to reserve a RAM range for the debugger. If you use assisted debugging, the range is reserved automatically. If you use manual setup, you need to call this function to reserve RAM.

You can use mcu_debug_ram_reserve function to find out if your target device requires RAM allocation.

Example

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

  hm = hex_map_read("your_hex_file.hex",NULL);
  nsdsp = nsdsp_connect(NULL);
  nsdsp_set_debug_rom(nsdsp,ROMAddress); // If necessary
  nsdsp_set_debug_ram(nsdsp,RAMAddress); // If necessary
  sess = nsdsp_start_prog_session(nsdsp, mcu, 0);
  nsdsp_session_check_id(sess,1);
  if (nsdsp_session_program_for_debug(sess, hm, tcy)) {
    // 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.