This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Debugging with signal function

Hello!
I trying to simulate the signals given to the microcontroller. My special point is to start and stop a simple square wave. Everything works fine exept the SIGNAL KILL. After the "exec()" it is impossible to stop or reset the target program or to leave the debug mode of uVision.
There is no error message and the only way to leave is to use the Windows Task Manager.
I created a .ini file with the Function Editor.
Any ideas?

(thread6908 did help a lot, thanks to Gary Lynch!)

/* simulate the input (square wave) */
signal void CoolingWater (void)
{
    while (1)
    {                                  /* repeat forever       */
        PORT3 |= 0x80;                 /* set bit */
        swatch (0.0200);               /* delay */
        PORT3 &= ~0x80;                /* clear bit */
        swatch (0.0200);               /* delay */
    }                                  /* repeat               */
}
/* show output every time it changes */
/* start and stop signal function *
FUNC void ShowOutputs (void)
{
    printf ("Output  %04X %04X %04X %04X\n", ausgabe[0],ausgabe[1], ausgabe[2], ausgabe[3] );
    if (ausgabe[1] & 0x0002)
        if (waterOn==0)
        {
            waterOn=1;
            CoolingWater();                 /* start simulating impulses */
        }
    if (!(ausgabe[1] & 0x0002) && waterOn)
    {
        waterOn=0;
        exec ("signal kill CoolingWater");  /* stop simulating impuses --- CRASHES HERE--- */
    }
    if (ausgabe[0] & 0x0100)                /* if output is 1 ... */
    PORT3 |= 0x40;                          /* ...then  simulate input */
}


BS spiAusgabe,1,"ShowOutputs()"             /* breakpoint to start the user function */

Parents
  • If I remove the line with "exec()" from the .ini-file and enter the command "signal kill CoolingWater" at the debugger command line it works and I can continue the debugging process. But I'd like to have it automatically.

    The comment with the missing slash was added later. I have corrected it already.

    /* start and stop signal function */
    

Reply
  • If I remove the line with "exec()" from the .ini-file and enter the command "signal kill CoolingWater" at the debugger command line it works and I can continue the debugging process. But I'd like to have it automatically.

    The comment with the missing slash was added later. I have corrected it already.

    /* start and stop signal function */
    

Children
No data