Minimum optimizations required to use inline functions

Wayne Uroda <[email protected]>
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.user
Message-ID <CAFHMo=xLykQ9=kSHKgi3XPRbPSB6wMkGA7Dsg7amPiBay8_h4A@mail.gmail.com>
Hi,

I make extensive use of inline functions in my code, as below:

    extern inline void setClockLine(Bool value)
    { ... }

Sometimes I put these definitions in .c files, sometimes in .h files (I'm
not sure if that makes a difference, apart from scope).

The code builds and links at -O (or -O1, -O2) but does not link at -O0, I
get many linker errors like
   i2c.c:67: undefined reference to `setClockLine'

I wonder, what is/are the minimum flag(s) required to make inlining work?
If I use just these flags am I likely to get better debug experience? There
are no inline functions involved in the code I am trying to debug but I am
still having trouble stepping through the code.

I notice that newer versions of gcc have a -Og flag, does MSPGCC support
this?
I am running msp430-gcc (GCC) 4.6.3 20120301 (mspgcc LTS 20120406 unpatched)

I am using a combination of mspdebug, eclipse CDT, zylin embedded debug
native and msp430-gdb for debugging.

Thanks
Wayne

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees

_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.