We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I have large no of variables. Is there any directive to tell compiler not to initiliza vars on startup before disabling watchdog.
Easiest is to find large arrays or structs that can be zero-initialized. Move them to a specific memory region that you specify to be unininialized. Then it's easy to memset() to zero after the watchdog has been kicked.
While you still get the advantage that the startup files can give initial values to the variables you want specific start values for.
Just make sure that you don't on "routine" assign zero to global variables without verifying if the compiler/linker will notice that these assigns can be done by simple zeroing instead of copying explicit values from flash on startup.