Warning - Not all breakpoint could be written - on MCUXpresso IDE 11.3.1

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

Warning - Not all breakpoint could be written - on MCUXpresso IDE 11.3.1

跳至解决方案
4,248 次查看
Babycat
Contributor III

Hi everyone

I have downloaded MCUXpresso 11.3.1 [Builkd 5262] couple of days. I run debug with example project on FRDM-KL03Z board. I start getting weird warning "Not all breakpoint could be written" . I have never saw this msg on before. What is going on? Is the breakpoint still fine? 

Is there anyone facing the same? 

 

Capture.JPG

0 项奖励
回复
1 解答
4,224 次查看
ErichStyger
Specialist I

I think there is nothing new from 11.3.0 to 11.3.1 (or in any of the previous versions).

NXP (well: Freescale) decided to implement only 2 Hardware breakpoints in the L series (ARM Cortex-M0 would allow 1, 2, 3 or 4). So the Kinetis L allows you only to set 2. If you set 3, you get that warning.

ErichS_0-1618217052738.png

Now what many do not realize: if you want to do stepping with the debugger, you will need one HW breakpoint for this too (debugger sets a breakpoint at the next statement or return location if you do a step out). So your screenshot shows that you have set two: if you want to do stepping you need one more which the hardware does not have: makes sense.

If you want to know more about breakpoint implementation: have a read at https://mcuoneclipse.com/2012/07/29/software-and-hardware-breakpoints/  which I wrote a while back.

Now there is a solution (except switching to a K series which has more hardware breakpoint implemented): you could use 'software breakpoints in flash' which requires you to use a Segger J-Link probe: it re-programs the flash memory on the fly and allows you a virtual 'unlimited' number of breakpoints.

To me: you are not facing something new, just a limitation of the hardware (probably to save a cent or two on the hardware, not sure).

So with using the P&E Debug probe on a Kinetis L:

- there are a maximum of 2 hardware breakpoints

- you can set 2 breakpoints without stepping

- you can set 1 breakpoint with stepping (this uses one breakpoint)

I hope this helps,

Erich

 

 

在原帖中查看解决方案

7 回复数
4,235 次查看
ErichStyger
Specialist I

The hardware only allows you to set a limited number of hardware breakpoints. Could you check the number of breakpoints (the Kinetis L series is more limited in the number than the K series)?

Check the 'Breakpoints' view and delete all breakpoints, this should help.

0 项奖励
回复
4,229 次查看
Babycat
Contributor III

Hi ErichS

Not much, there are just 2 breakpoints.

Yes, no warning if one breakpoint. 

I dont think I can only set 1 breakpoint in my code, because I have played round with KL03 for times with more than 1 breakpoint in previous IDE version. 

Capture.JPG

0 项奖励
回复
4,225 次查看
ErichStyger
Specialist I

I think there is nothing new from 11.3.0 to 11.3.1 (or in any of the previous versions).

NXP (well: Freescale) decided to implement only 2 Hardware breakpoints in the L series (ARM Cortex-M0 would allow 1, 2, 3 or 4). So the Kinetis L allows you only to set 2. If you set 3, you get that warning.

ErichS_0-1618217052738.png

Now what many do not realize: if you want to do stepping with the debugger, you will need one HW breakpoint for this too (debugger sets a breakpoint at the next statement or return location if you do a step out). So your screenshot shows that you have set two: if you want to do stepping you need one more which the hardware does not have: makes sense.

If you want to know more about breakpoint implementation: have a read at https://mcuoneclipse.com/2012/07/29/software-and-hardware-breakpoints/  which I wrote a while back.

Now there is a solution (except switching to a K series which has more hardware breakpoint implemented): you could use 'software breakpoints in flash' which requires you to use a Segger J-Link probe: it re-programs the flash memory on the fly and allows you a virtual 'unlimited' number of breakpoints.

To me: you are not facing something new, just a limitation of the hardware (probably to save a cent or two on the hardware, not sure).

So with using the P&E Debug probe on a Kinetis L:

- there are a maximum of 2 hardware breakpoints

- you can set 2 breakpoints without stepping

- you can set 1 breakpoint with stepping (this uses one breakpoint)

I hope this helps,

Erich

 

 

4,204 次查看
Babycat
Contributor III

It is really helpful. Thank you very much. 

I will deal with 2 HW breakpoints, I have to use KL series for low power application

0 项奖励
回复
4,222 次查看
ErichStyger
Specialist I

Update: I just checked with the 11.3.1 and a KL25Z with the P&E Multilink: same thing here: 2 breakpoints or 1 with stepping.

I checked because 11.3.1 comes with updated P&E debug firmware, but for me it is the same behaviour as in previous versions.

I hope this helps,

Erich

4,216 次查看
converse
Senior Contributor V

There is also another breakpoint used if you have the “stop at main()” checked in the debug dialog. This is cleared after it is hit, but it is another breakpoint that may be used. If you only have 2 breakpoints in h/W then it is significant!

4,212 次查看
ErichStyger
Specialist I

'info breakpoint' should show all the breakpoints known by gdb including the temporary one.

ErichS_0-1618228744017.png

Indeed if the temporary one is not hit (set to the wrong name) then it will consume one of the precious HW breakpoints too.