Brad Rodriguez

ILLEGAL_BP with 9S08QE8

Discussion created by Brad Rodriguez on Jan 19, 2009
Latest reply on Jan 19, 2009 by Brad Rodriguez
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?

Outcomes