This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

GCC: Where did the -mdisable-watchdog option go?

Hi,

recently I upgraded my GCC installation from 4.6 to the current 4.9 and now I'm missing the option above to automatically insert some init code to disable the watchdog function.

Do I have to modify all of my applications to do this "by hand", now, or is there still a gcc option to insert this kind of code automatically?

Best

Oliver.

  • Unfortunately, the msp430-elf-gcc compiler (the one supplied with CCS and available here) does not support the option -mdisable-watchdog.  

    Thanks and regards,

    -George

  • Thank you for this definite answer! Do you know about the future plans with this respect? I have a bunch of applications and I can wait for some time - but not forever :-) So, is it worth waiting for this option to apear again, or do I spend my time better in modifying the applications or thinking on some linker trick, to achieve the same?
    Best
    Oliver.
  • Oliver Maye said:
    Do you know about the future plans with this respect?

    At this time, there are no plans to implement -mdisable-watchdog.  Of course, that is subject to change.  It is possible that we may implement an entirely new feature which solves the problem a different way.

    To be honest, I am unable to find documentation which specifies exactly what -mdisable-watchdog does.  Can you provide a reference to it?

    Thanks and regards,

    -George

  • George Mock said:
    To be honest, I am unable to find documentation which specifies exactly what -mdisable-watchdog does.  Can you provide a reference to it?

    I haven't found a documentation reference, but the links http://freechronos.blogspot.co.uk/2011/11/yet-another-msp430-gcc-problem.html and http://recursive-labs.com/static/courses/rl100/samples/startup.pdf suggest that the GCC -mdisable-watchdog option was similar to the  --cinit_hold_wdt=on option in the TI MSP430 linker.

    e.g. was. -mdisable-watchdog used to disable the watchdog during the initialization of the .bss and .data segments?

  • Yes, exactly. It added just this instruction to the startup code: "mov 0x5A80, WDTCTL" which is in C: WDTCTL = WDTPW | WDTHOLD;

    But currently, I can't find a better documentation, neither. Seems as it went away in earlier versions, already (2011/12). At least gcc version 4.6 supported that feature.

    However, thank you, so far!

    Best

    Oliver.

  • Chester Gillon said:
    the GCC -mdisable-watchdog option was similar to the  --cinit_hold_wdt=on option in the TI MSP430 linker.

    Similar, but not the same.  --cinit_hold_wdt=on holds the watchdog timer (keeps it from causing reset) while C and C++ variable initialization is performed by the startup code.  It appears -mdisable-watchdog permanently disables the watchdog timer.  Understanding such details are why I tried to find the documentation.

    Thanks and regards,

    -George