Cart Contact NSDSP Home

nsdsp_debug_enable_write_bp

This function enables a write breakpoint.

Syntax

int nsdsp_debug_enable_write_bp(
        nsdsp_session_t   session,
        int               bp,
        unsigned int      addr,
        unsigned int      value,
        unsigned int      count,
        unsigned int      flags
);

Parameters

session - a reference to the Debug Session Object obtained with nsdsp_session_program_for_debug or nsdsp_start_debug_session function

bp - the id of a hardware breakpoint

addr - the data memory address. Writing from this address should halt the target

value - a specific value. NSDSP_BP_USE_VALUE flag is set, the breakpoint will halt the target only if the value written to memory matches the specified value.

count - the counter. If specified, the breakpoint must be triggered the specified number of times before the halt occurs. If not used, specify zero.

flags - a combination of the following flags:

Flag ConstantMeaning
0x00000000NSDSP_BP_DATA_SPACE The breakpoint address refers to data space
0x00000010NSDSP_BP_PROG_SPACE PIC24 and dsPIC33 only: The breakpoint address refers to program space
0x00000020NSDSP_BP_Y_SPACE dsPIC33 only: The breakpoint address refers to Y space
0x00000000NSDSP_BP_ANY_SIZE The breakpoint does not depend on the size of the accesses
0x00000100NSDSP_BP_8 Only 8-bit memory accesses trigger the breakpoint
0x00000200NSDSP_BP_16 Only 16-bit memory accesses trigger the breakpoint
0x00000400NSDSP_BP_32 Only 32-bit memory accesses trigger the breakpoint
0x00000800NSDSP_BP_USE_VALUE the breakpoint will trigger only if the value written to memory matches the specified value

Return

The function returns non-zero if the command to enable the breakpoint has been succesfully queued, or zero otherwise

Notes

Not all breakpoints support halt on write. Not all breakpoints support counters. Not all breakpoints support various flags. To check breakpoint capabilities, use mcu_bp_class_cap function.

This instruction only queues a command. The command will be sent to NSDSP when you queue enough commands to fill the buffer or when you call nsdsp_session_flush.

 

Minimum library version - 163

Northern Software Home NSDSP Contact Us Purchase/View Cart

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