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

a simple question about PE_SWD

in a file measure.ini:


PE_SWD = 0 /* Disable Watchdog with pin PE_SWD */



but the compiler says "PE_SWD undefined identifier".

is there anyone who can tell me what i should do,thanks a lot!

  • Either you've not spelled it the same way as it is spelling in the header file or your header file doesn't contain it.

    For Keil compilers you can usually create an sfr definition like this:

    sbit PE_SWD = 0x98;
    Where 0x98 is some address you get from the data sheet for your chip. Here I'm assuming that PE_SWD is a port pin (a single bit) on some port.

    - Mark

  • I presume you're talking about the measure.ini in the 'Measure' C51 example Project?

    It looks like Keil have introduced the error somewhere between v6.14 and v6.23!

    PE_SWD is not defined in any of the v6.23 Keil standard header files, and is not mentioned in the documentation of the example Project :-(

    The only difference between the v6.14 and v6.23 Projects seems to be that the following lines have been added at the top of measure.ini:

    PE_SWD = 0                  /* Disable Watchdog with pin PE_SWD */
    reset                       /* perform CPU reset: uses value at PE_SWD */
    G,MAIN
    
    So you could try just removing the offending line?

    You might have to work out how to disable your watchdog properly...

    Not the kind of thing you want when you're just trying to work through the examples! :-(

  • This is a VTREG that is available on many of the Infineon devices. It controls the watchdog timer. Setting in the debugger scripts prevents the watchdog from automatically being enabled and resetting the simulation.

    Refer to the following knowledgebase article for more information.

    http://www.keil.com/support/docs/1966.htm

    This is enabled in the script for users who change the device to the C509 and other similar devices.

    The error message is innocuous and causes no problems.

    Jon

  • Jon,

    huang wei is to be commended for taking the effort to work through the examples and learn the tools properly. If only everyone did that!

    The last thing he deserves is to be rewarded for his trouble by spurious error messages & undocumented VTREGs!

  • thanks a lot.yes,i am trying to work through this example.this error message
    seems to be innocuous ,i could go on
    regardless of it.

  • This will be fixed in the next update and release.

    Jon

  • To elaborate, since this is a debugger error, not a compiler/linker error, it won't prevent you from working with the example.