Inline ATMEL function lib.

OP #1172229
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.
Guest #1172230
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

A question of your own? This thread is over 19 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.