main() is not a root with gcc, start() is (defined by your linker
script), and is usually provided by crt0.o - except you told it not to
with -nodefaultlibs.

The flag you really want is -minrt, which tells gcc to encode extra
information in each object that helps the linker reduce the amount of
runtime needed to only the routines that will actually do something
useful (and, most likely, remove C++ constructors/destructors at the
same time).

If even with that flag the code still doesn't fit, add
-Wl,-Map,somemap.txt and see *what* functions are getting included,
and why.  It may turn out to be something silly.

Also, if main() returns a value, the runtime may include extra
processing to happen at exit() time, which is kinda pointless on an
MCU.  main() should end in a while(1); so it doesn't return.

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to