Does CodeWarrior have any API to set soft breakpoints directly?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Does CodeWarrior have any API to set soft breakpoints directly?

跳至解决方案
698 次查看
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.

标签 (1)
标记 (3)
0 项奖励
1 解答
596 次查看
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 项奖励
3 回复数
596 次查看
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 项奖励
596 次查看
blackmouse
Contributor I

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

0 项奖励
597 次查看
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 项奖励