Hi Redjis,
You could read old messages or use the search engine to check if the question was not resolved before.
By looking for "Illegal" in the Forum search engine at the bottom, I found the following identical question to yours:
http://forums.freescale.com/freescale/board/message?board.id=CWCOMM&message.id=769&query.id=1684#M76...
Have a look and, if your problem is different to all posts already present, please give us more details on what you do and what you want to achieve, otherwise it is not possible for us to find a solution for you.
Cheers,
Alban.
The COP means Computer Operating Properly, you may know it under the name of watchdog.
If you don't write into it within a certain time, the microcontroller thinks there is a problem with the software and generates a COP Reset.
Illegal BP could be coming from a interrupt not declared.
For instance, by changing memory model, may be an invalid address becomes existing in the new context.
Have you looked at which instruction makes the software crash ?
You can do so by going step by step for instance.
Also, have a look at the Program Counter = PC in the debugger window. Is the address displayed in a area of memory where your code is situated ? Because that is what the MCU tries to execute.
Cheers,
Alban.
Message Edited by Redjis on 2006-08-09 08:33 AM
Could you give the part number of the device your are using ?
May be you are using an S12X instead of an S12. The difference is the second core called XGATE that itself works on interrupts and it could generate the background instruction... but I doubt it if you see the CPU being in a random address...
Alban