Buy Contact NSDSP Home

nsdsp_set_debug_rom

This function specify the ROM location for the debugger.

Syntax

void nsdsp_set_debug_rom(
        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 ROM

Notes

Some of the target devices do not have built-in ROM areas for debugging. For such devices, you need to reserve a ROM 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 ROM.

You can use mcu_debug_rom_reserve function to find out if your target device requires ROM 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.