Illegal breakpoint while running Code

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

Illegal breakpoint while running Code

1,537 Views
arthivenkatasub
Contributor III

Good Morning,

We are using S12XET256 for our project. We are able to flash our code in the target (controller). But Illegal breakpoint is occurring while running our code.

What may be the problem?

We are using Codewarrior v5.9 IDE and PE micro as debugger.

Hope anyone can reply.

Regards,

Arthi Venkatasubramanian

Tags (1)
0 Kudos
Reply
1 Reply

1,298 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Arthi Venkatasubramanian

First I need to know the problem is due to software or hardware side. Could you please create a new project with wizard, can you download and run the new project code on the board?

If the problem only happened on your own project(no problem with new project), There is no document on the list of illegal BP, but I will try to explain it in detail to you.

 

There can be many reasons for “ILLEGAL_BP” error message.

  1. unmapped interrupt vectors or non-serviced irq is enabled or incorrect ISR vector number is used. The illegal breakpoint error often happens when the MCU is getting lost and executes dummy code. If this happens whenever you enable your interrupt, check that the interrupt vector has been correctly initialized with the address of the interrupt service routine. If the interrupt vector is left blank (0xFFFF) this could be the cause of the problem.
  2. watchdogs: this might be a COP reset, check that the watchog, if enabled, is being fed correctly. Also please check that the stack is not overflowing.
  3. bad SW approach to RAM, e.g. some buffer overflows, STACK overflow…
  4. code optimization by CW may cause the JMP to non-defined program memory address and PC lost way.

 

Please check your code if it belongs to one of the reasons above.

 

Hope it helps!


Have a great day,
Jennie Zhang

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

0 Kudos
Reply