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

ISD51 software

I just studies software debug using ISD51 through AT89C51SND1C's UART port.but now i have some questions. let me describe it.
I write a simple main program in keil uvsion2 ICE(below), then add some program and set uvision according to the help file:isd51.htm. I have a good luck, after do that, the uvison can connect to my user board , the program can run step by step using F11. but some quesitons puzzle me:
when debugging,
1) i set a software breakpoint , but it can not work.
2) i can not stop running when the program is running.
3) i can not step over a function(exmple :Delay_10ms();) use shortkey: F10.

below is my main.c

#include "lib_mcu\compiler.h" /* compiler definitions */
#include "lib_mcu\regsnd1.h" /* component declaration */
#include "lib_mcu\extsnd1.h" /* component extended declaration */
#include "ISD51.H"

sfr p4 = 0xc0;

extern void in_system_prog (void);
static void main(void);



static void Delay_10ms(void)
{
unsigned char i;
unsigned int j;
for(j = 0; j < 40; j++){
j++;
for (i = 0; i < 200; i++);
}

}
static void seiral__initial(void)
{
(CKCON |= MSK_X2); //set x2 mode
SCON = 0x50;
PCON |= (1 << 7);
BRL = 230; /* set 38400 baud @ 16MHz */
BDRCON = 0x1E;

EA = 1;
//ES = 1;

}

void main(void)
{
seiral__initial();


#if 0 // init ISD51 and start user program until the uVision2 Debugger connects
ISDinit (); // initialize uVision2 Debugger and continue program run
#endif

#if 1 // init ISD51 and wait until the uVision2 Debugger connects
ISDwait (); // wait for connection to uVision2 Debugger
#endif


p4 = 0xff;

while(1){
#if 1 // init ISD51 only when the uVision2 Debugger tries to connect
ISDcheck(); // initialize uVision2 Debugger and continue program run
#endif
// ES = 1;
Delay_10ms();

p4 = ~p4;
#if 0 // you may use ISDbreak when ISD51 is started with ISDcheck or ISDwait

ISDbreak (); // hard coded stop (breakpoint)


#endif
}
}

Somebody can help me ?

Regards,
hexiuchi (&#20309;&#20462;&#27744;&#65289;.
Namtai Electr. Co. PRC
E-Mail: xche@namtai.com.cn
Tel:(86755)27495818-3433
Fax:(86755)27497143

Parents
  • 1) i set a software breakpoint , but it can not work.
    2) i can not stop running when the program is running.

    The first two items should work if the interrupt system is enabled:

    We need more information about the nature of your problem. Does single stepping work in general?

    --------
    3) i can not step over a function(exmple :Delay_10ms();) use shortkey: F10.

    The stepover function might take a very long time, since the system will single step in the delay loop unless it is configured for Flash or Hardware Breakpoints. This is about 1000 times slower, so it may take about just 10 seconds rather then 10ms.

    -------

    For Atmel AT89C51SND1 we have also a FlashMon adaption under:
    Keil\C51\FlashMon\AT89C51SND1

    FlashMon might be more flexible than ISD51 on this device.

Reply
  • 1) i set a software breakpoint , but it can not work.
    2) i can not stop running when the program is running.

    The first two items should work if the interrupt system is enabled:

    We need more information about the nature of your problem. Does single stepping work in general?

    --------
    3) i can not step over a function(exmple :Delay_10ms();) use shortkey: F10.

    The stepover function might take a very long time, since the system will single step in the delay loop unless it is configured for Flash or Hardware Breakpoints. This is about 1000 times slower, so it may take about just 10 seconds rather then 10ms.

    -------

    For Atmel AT89C51SND1 we have also a FlashMon adaption under:
    Keil\C51\FlashMon\AT89C51SND1

    FlashMon might be more flexible than ISD51 on this device.

Children
  • Sorry for my later response.
    "1) i set a software breakpoint , but it can not work.
    2) i can not stop running when the program is running.

    The first two items should work if the interrupt system is enabled:

    We need more information about the nature of your problem. Does single stepping work in general?"
    below is my configration :
    Comm port setting:
    COM3, RTS inactive , DTR inactive, bautrate 38400

    cache option: all disable
    code breakpoint option:only user software break.
    Load Application Start : enabled.
    Debug driver Dll : S8051.DLL
    Debug dialog Dll : TP51.DLL -p51SND1


    I can single steeping work by stepping into function only, not stepping over.
    I have set "EA = 1; ES = 1;",the interrupt system is enabled.


    "3) i can not step over a function(exmple :Delay_10ms();) use shortkey: F10.

    The stepover function might take a very long time, since the system will single step in the delay loop unless it is configured for Flash or Hardware Breakpoints. This is about 1000 times slower, so it may take about just 10 seconds rather then 10ms."

    what you say i have thought about , i have tried to use short times function instead of Delay_10ms();but the question still exists.
    I use ICE: Keil uVision2.30, but i cannot find directory:Keil\C51\FlashMon\AT89C51SND1, can you tell me how to get it?

    Regards,
    hexiuchi
    Namtai Electr. Co. PRC
    E-Mail: xche@namtai.com.cn
    Tel:(86755)27495818-3433
    Fax:(86755)27497143

  • FlashMon is part of PK51 Version 7.20. It looks like you need to upgrade your old version. Please contact sales.intl@keil.com or your local distributor.