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

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

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

Jump to solution
4,695 Views
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 Kudos
Reply
1 Solution
4,671 Views
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

 

 

View solution in original post

7 Replies
4,682 Views
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 Kudos
Reply
4,676 Views
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 Kudos
Reply
4,672 Views
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,651 Views
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 Kudos
Reply
4,669 Views
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,663 Views
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,659 Views
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.