EmbDev.net

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


Author: David Farrell (dfarrell)
Posted on:

Rate this post
0 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.

Author: Martin Thomas (Guest)
Posted on:

Rate this post
0 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

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.