I figure it out finally. The Processor Expert code is bad. When you select the CPU bean for the 68HC908KX8 you have options to select which clock you are going to use. No matter which clock you choose the bean generates code that always selects the internal clock source. According to the documentation for the 908KX8 you can only write to the CONFIG registers once after reset. The code generated by the bean tries to write to the CONFIG2 register more than once.
Here is the code it generated:
/* CONFIG1: COPRS=0,LVISTOP=0,LVIRSTD=0,LVIPWRD=1,LVI5OR3=0,SSREC=0,STOP=0,COPD=1 */
CONFIG1 = 17; /* Set the CONFIG1 register */
/* CONFIG2: Unused=0,Unused=0,EXTXTALEN=1,EXTSLOW=0,EXTCLKEN=0,Unused=0,OSCENINSTOP=0,SCIBDSRC=0 */
CONFIG2 = 32; /* Set the CONFIG2 register */
ICGCR = 31; /* Enable the external and internal oscillator */
while(!ICGCR_ECGS); /* Wait for external oscillator stabilization */
ICGCR_CS = 1; /* Select the external clock */
Notice when it writes to the config register --> CONFIG2 = 32;
It then attempts to select the external clock 3 lines down. When I disable the PE and change the CONFIG2=32 to CONFIG=8 my board works in the debugger and standalone.
Thanks for your help.
bcde