I fully agree with the activation of the watchdog at an early stage. As J.M. Gross points out, the extra return address for main() occupies stack for no good reason. In a microcontroller it is madness for main() to return, since it has nothing to which it can return. Accordingly, main() will either be written as an infinite loop, or as its last action will call a function with infinite-loop behaviour. To keep a return address is a sacrifice to the assumption, built in to gcc, that main will eventually return to some operating system. On a PC with a gigabyte of RAM it is unimportant and necessary, on a microcontroller with 128 bytes of RAM the picture is very different.
I think we will always need the -mendup-at-main option. This is a small problem which should be addressed upstream. -- Rick Jenkins <[email protected]> Hartman Technica http://www.hartmantech.com Phone +1 (403) 230-1987 221 35 Avenue. N.E., Calgary, Alberta, Canada T2E 2K5 ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Mspgcc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mspgcc-users
