EmbDev.net

Forum: ARM programming with GCC/GNU tools Inline ATMEL function lib.


von David F. (dfarrell)


Rate this post
useful
not useful
I am trying to standardize on one Atmel lib (ie lib_AT91SAM7S256.h) as
inline
C functions.  Some or Martins example projects "#define __inline extern
inline" which causes a bunch of linker issues if separate C files
include the lib. I expect the define must be "#define __inline static
inline" to keep distinct function names as seen by the linker.  Is this
correct?  Why would inline functions every be declared extern?

I have standardized the lib so I can build efsl, freertos, usb (hid) all
together. So far I can succesfully build and have tested everything but
the USB.

David.

von Martin Thomas (Guest)


Rate this post
useful
not useful
David Farrell wrote:
> I am trying to standardize on one Atmel lib (ie lib_AT91SAM7S256.h) as
> inline
> C functions.  Some or Martins example projects "#define __inline extern
> inline" which causes a bunch of linker issues if separate C files
> include the lib. I expect the define must be "#define __inline static
> inline" to keep distinct function names as seen by the linker.  Is this
> correct?  Why would inline functions every be declared extern?

static inline is correct and should be like this in the AT91 examples I
provide. Maybe you have older versions of the examples. Some of the
examples which come with the WinARM-package may be outdated. Please see
my ARM-projects page at
http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects for updates.
If you are still finding "extern inline" please send my the name of the
package and I will provide an updated version with "static inline".

> I have standardized the lib so I can build efsl, freertos, usb (hid) all
> together. So far I can succesfully build and have tested everything but
> the USB.

If you wish I can place your code on my ARM-projects pages or can place
a link to your pages there.

Martin Thomas

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.