I'm new to embedded C development and I'm looking for some general principals/guidelines for managing the size of the generated code.
In my specific example I'm using XC8 on a PIC18F4550. My code so far uses about 13% of the space. Once I use "time.h" and 1/2 functions from it, the usage jumps to 45%! I realise that the free XC8 compiler does not optimise but I'm still very surprised to see just how much space is used.
What I'm looking for a tips / staring points along the lines of
- Alternatives to the standard libraries that implement on small targeted subsets of the functionality. E.g. a date/time lib. i.e. are there repositions I can get useful routines from?
- How to see what is using all the space. (Listing/map files - and tips for analysing them)
- Any other tips / resources.
EDIT: I found a nice implementation without using stdlib here: https://codereview.stackexchange.com/questions/38275/convert-between-date-time-and-time-stamp-without-using-std-library-routines
The general question still stands though. Are there guidelines, good repository sources etc