I try to use and configure the watchdog with the mios. I read the part of the watchdog in the datasheet. And I have a look in the files of the sdcc_skeleton.
I have absolutly no idea what you mean with “watchdog” :-[
but maybe three hints that may be better than no answer at all:
you can setup a custom timer (see C-Function Reference @uCApps.de)
you can change values in your code by calling the appropriate variable names (I haven’t looked up the code, but if the global var is named WDTCONbits you should be able to access it’s bits by WDTCONbits.SWDTE = 0; or something like that. It’s a bad idea to mess around in the pic18f452.h file, cause this is just a header providing the structure that’s inside the pic…
Watchdog timer: it’s configured in a way which doesn’t allow to enable/disable it via software. It’s always enabled, and it is serviced by MIOS within the mainloop (after USER_Tick has been called)
If USER_Tick stalls longer than 2 seconds, the PIC will be reset. If your routine needs longer (this is critical, >20 mS will cause a MIDI In buffer overrun if a bulk of data is received at the same time), than you have to issue a “clrwdt” instruction in order to service the watchdog, and to avoid a reset.