ILLEGAL_BP with 9S08QE8

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

ILLEGAL_BP with 9S08QE8

1,710 Views
BradR
Contributor I
I'm attempting to test a board with an MC9S08QE8, using CodeWarrior version 5.9.0, and using a Witztronics WTUSBDML (which appears as an HCS08 Open Source BDM module). Right now I'm just trying to compile and run a very simple test program, based on the Freescale example program. It compiles ok, and downloads ok to the S08, and I can examine memory and registers. But when I click Run (or press F5), it advances only one instruction. I can continue to press F5 and single-step through the program, but I can not make it run continuously.

Looking at the "Command" window in the debugger, I see this every time I press F5:

STARTED
RUNNING
ILLEGAL_BP

I've read most of the posts here about the "ILLEGAL_BP" message, and I'm not making any of the mistakes that others have reported:

1. I've disabled the watchdog, and also set it to the long delay. (I also tried adding a watchdog kick in my main routine, but I have to single-step all the way there, and it doesn't help.)
2. I've ensured that all interrupt vectors point to an UninitializedISR routine, and I've also disabled all interrupt sources.
3. There's a pullup resistor on the BKGD pin.
4. There's also a pullup resistor on the RESET pin. I've tried enabling and disabling the RESET function in my initialization code, to no effect. (The board uses this as RESET.)
5. There's no stack imbalance, and the disassembly is showing the correct instructions at the correct addresses in ROM.

The only thing I can think of that's at all unusual about this board is that there is no crystal attached to the 9S08; it runs from its internal clock.

At the moment, I'm stumped. Any ideas?
Labels (1)
0 Kudos
Reply
2 Replies

481 Views
BradR
Contributor I
Oops. Kindly disregard, problem solved. Checking the board against the schematic revealed that the hardware guys switched to a 9S08SH8. Recompiling for the proper derivative seems to have fixed this issue.

Now I get a steady stream of "Target Speed Change Detected" messages, but that's tomorrow's problem. At least the test program runs!
0 Kudos
Reply

481 Views
BradR
Contributor I
As I suspected, the "Target Speed Change" messages went away when I supplied the correct initialization code for the 9S08SH8. (Of particular note, the COP initialization is different from the QE8.) It's running fine now.
0 Kudos
Reply