Does CodeWarrior have any API to set soft breakpoints directly?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Does CodeWarrior have any API to set soft breakpoints directly?

Jump to solution
664 Views
blackmouse
Contributor I

I use the CodeWarrior 5.9.0. When I set a soft breakpoint then check the CCS log, only find these "ccs_read_reg" "ccs_write_reg" "ccs_write_mem" and some other APIs viewing memories or registers directly. So I want to know if there are some APIs to set soft breakpoints directly.

Labels (1)
0 Kudos
1 Solution
562 Views
TICS_Fiona
NXP Employee
NXP Employee

Hello customer,

No, these two functions are for hardware breakpoints. The software breakpoints works in different ways.

When software breakpoints are used, the debugger will remove the instruction and replace it with a special debug halt instruction into program Flash memory.   After the CPU starts running, periodically, the debugger polls the target for status to see if it has halted.

Best Regards

Fiona Kuang

TIC - Technical Information Center

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Mark Correct button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
3 Replies
562 Views
TICS_Fiona
NXP Employee
NXP Employee

Hello customer:

Below are the CCS API functions for breakpoint set and remove:

ccs_error ccs_set_hwbp(ccs_core_handle coreh, unsigned long bp_info_size, void *bp_info, unsigned long reservation_id, unsigned long *bp_id);

ccs_error ccs_delete_hwbp(ccs_core_handle coreh, unsigned long bp_id);

Best Regards

Fiona Kuang

TIC - Technical Information Center

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Mark Correct button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
562 Views
blackmouse
Contributor I

But according to the help document they are hardware breakpoint APIs. Are they suitable for software breakpoints?

0 Kudos
563 Views
TICS_Fiona
NXP Employee
NXP Employee

Hello customer,

No, these two functions are for hardware breakpoints. The software breakpoints works in different ways.

When software breakpoints are used, the debugger will remove the instruction and replace it with a special debug halt instruction into program Flash memory.   After the CPU starts running, periodically, the debugger polls the target for status to see if it has halted.

Best Regards

Fiona Kuang

TIC - Technical Information Center

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Mark Correct button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos