Hi Daniel,
When i press the reset button in the debugger, the cursor jumps to the first line of the following code (Cpu.c). These few lines of c-code I can step through with F10 on source code level (even though I think it's pretty much 1:1 to assembler).
/* ### MC9S12XDP512_112 "Cpu" init code ... */
/* PE initialization code after reset */
/* ECLKCTL: NECLK=0,NCLKX2=1,??=0,??=0,??=0,??=0,EDIV1=0,EDIV0=0 */
setReg8(ECLKCTL, 64);
/* MMCCTL1: ??=0,??=0,??=0,??=0,??=0,EROMON=0,ROMHM=0,ROMON=1 */
setReg8(MMCCTL1, 1);
/* DIRECT: DP15=0,DP14=0,DP13=0,DP12=0,DP11=0,DP10=0,DP9=0,DP8=0 */
setReg8(DIRECT, 0);
/* IVBR: IVB_ADDR=255 */
setReg8(IVBR, 255);
/* System clock initialization */
/* CLKSEL: PLLSEL=0,PSTP=0,??=0,??=0,PLLWAI=0,??=0,RTIWAI=0,COPWAI=0 */
setReg8(CLKSEL, 0); /* Select clock source from XTAL and set bits in CLKSEL reg. */
/* PLLCTL: CME=1,PLLON=0,AUTO=1,ACQ=1,FSTWKP=0,PRE=0,PCE=0,SCME=1 */
setReg8(PLLCTL, 177); /* Disable the PLL */
/*** End of PE initialization code after reset ***/
__asm("jmp _Startup"); /* Jump to C startup code */
/* initialize the stack pointer */
INIT_SP_FROM_STARTUP_DESC(); /*lint !e522 asm code */ /* HLI macro definition in hidef.h */
#ifndef __ONLY_INIT_SP
Init(); /* zero out, copy down, call constructors */
#endifHere the main function is entered. The cursoer jumps to the line
moduleTestMode = MODULE_TEST_MODE;After this instruction I cannot go to init_mcu(); by pressing F10. It always goes line by line in the assembler code.
void main(void) // firmware
{
uInt08 moduleTestMode;
uInt32 error;
// modify the test mode here with the debugger
moduleTestMode = MODULE_TEST_MODE;
//Cpu_DisableInt();
init_mcu();Here the rest of the program code follows....
Yes, it's plain c code, no inline.
All the source code is shown in the "Source" window on the left side and the assembler code is shown in a separate window on the right hand side.
What do you mean by "Do the toolbar buttons behave better/different?"?
The strange thing is that I could step into the init_mcu() function (initializes ports and other periphery) by F11 and then every single c code line by F10 as expected. This worked exactly once (the first time i started the debugger). Since then I tried to restart the computer, power cycle the target... several times - I'm not able to do it anymore!
Andi