All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Compiling Library files over Xenomai
@ 2011-07-08 12:10 Ashish Budhiraja
  2011-07-11 11:29 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 7+ messages in thread
From: Ashish Budhiraja @ 2011-07-08 12:10 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 958 bytes --]

Hello Everyone,

I am using Roboard (RB-100) on which I have Xenomai installed. All the
example files are working fine and
I have internet through wifi and lan both.


Roboard comes with normal C & C++&header files in a folder called
roboard_lib. These files are for IO, pwm, spi, i2c etc....Actually I am
having trouble with compiling and linking the roboard_lib files.

 If anyone can help me to edit makefile to compile a library please reply.
Because I tried a lot with the makefile available with examples files, but
couldn't succeed.

The errors which I am getting:

1) I think somehow my gcc doesn't accept "bool" so I had to include
stdbool.h,,,it works now.
2) I am getting errors like *undefined reference to "SOMEfunction" *...this
I think this is because my library files are not compiling.

Thanks a lot ,,,,please guide me through this....if someone can show me
their MAKEFILE(with library compiled) it would be a great help.

Regards,

Ashish

[-- Attachment #2: Type: text/html, Size: 1080 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai-help] Compiling Library files over Xenomai
  2011-07-08 12:10 [Xenomai-help] Compiling Library files over Xenomai Ashish Budhiraja
@ 2011-07-11 11:29 ` Gilles Chanteperdrix
  2011-07-12  8:04   ` Ashish Budhiraja
  0 siblings, 1 reply; 7+ messages in thread
From: Gilles Chanteperdrix @ 2011-07-11 11:29 UTC (permalink / raw)
  To: Ashish Budhiraja; +Cc: xenomai

On 07/08/2011 02:10 PM, Ashish Budhiraja wrote:
> Hello Everyone,
> 
> I am using Roboard (RB-100) on which I have Xenomai installed. All the
> example files are working fine and
> I have internet through wifi and lan both.
> 
> 
> Roboard comes with normal C & C++&header files in a folder called
> roboard_lib. These files are for IO, pwm, spi, i2c etc....Actually I am
> having trouble with compiling and linking the roboard_lib files.
> 
>  If anyone can help me to edit makefile to compile a library please reply.
> Because I tried a lot with the makefile available with examples files, but
> couldn't succeed.
> 
> The errors which I am getting:
> 
> 1) I think somehow my gcc doesn't accept "bool" so I had to include
> stdbool.h,,,it works now.
> 2) I am getting errors like *undefined reference to "SOMEfunction" *...this
> I think this is because my library files are not compiling.
> 
> Thanks a lot ,,,,please guide me through this....if someone can show me
> their MAKEFILE(with library compiled) it would be a great help.

You do not give us any detail, so, I am going to give you a very general
advice, which may, or may not be what you are looking for.

To compile and link xenomai applications, you should use xeno-config to
obtain the flags.

If you are using the posix skin,  you should use

xeno-config --skin posix --cflags
to obtain the compilation flags.

and
xeno-config --skin posix --ldflags
to obtain the flags for linking.


-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai-help] Compiling Library files over Xenomai
  2011-07-11 11:29 ` Gilles Chanteperdrix
@ 2011-07-12  8:04   ` Ashish Budhiraja
  2011-07-12  8:23     ` Gilles Chanteperdrix
  2011-07-12 11:10     ` Ashish Budhiraja
  0 siblings, 2 replies; 7+ messages in thread
From: Ashish Budhiraja @ 2011-07-12  8:04 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai


[-- Attachment #1.1: Type: text/plain, Size: 29974 bytes --]

Hello Everyone and Gilles,

I am really sorry for not explaining clearly. I am attaching my Makefile and
also my output and my main file.
I have tried posix & native and also few more!!! output is same.

About the Errors
1)  The functions for which it is giving this error are in different files
like this not being used called anywhere and also in the file
     preacautions have been taken for the file not to get included more then
once.

2) The same files used to work without Xenomai.

The functions are of this kind

i2cdx.h:    RBAPI(unsigned char) i2c0_ReadStatREG(void);
i2cdx.h:    RB_INLINE RBAPI(unsigned char) i2c0_ReadStatREG(void) {


I have also appended inline my Makefile and output....

################################MAKEFILE#############################################
###### CONFIGURATION ######

### List of applications to be build
APPLICATIONS = testingxenomai

### Note: to override the search path for the xeno-config script, use "make
XENO=..."

### List of modules to be build
MODULES =

### Note: to override the kernel source path, use "make KSRC=..."

ROBOARD_LIB=./roboard_lib/

###### USER SPACE BUILD (no change required normally) ######
ifeq ($(KERNELRELEASE),)
ifneq ($(APPLICATIONS),)

### Default Xenomai installation path
XENO ?= /usr/xenomai

XENOCONFIG=$(shell PATH=$(XENO):$(XENO)/bin:$(PATH) which xeno-config
2>/dev/null)

### Sanity check
ifeq ($(XENOCONFIG),)
all::
    @echo ">>> Invoke make like this: \"make XENO=/path/to/xeno-config\"
<<<"
    @echo
endif

OBJECTS =      \
        spidx.o \
        spi.o \
        rcservo.o \
        pwmdx.o \
        pwm.o \
        io.o \
        i2cdx.o \
        i2c.o \
        common.o \
        ad79x8.o \

INCLUDE_DIR=./roboard_lib

CC=$(shell $(XENOCONFIG) --cc)

#CPP=$(shell $(XENOCONFIG) --g++)

#CFLAGS=$(shell $(XENOCONFIG) --xeno-cflags) $(MY_CFLAGS) -Wall
#-DROBOIO_DLL
CFLAGS=$(shell $(XENOCONFIG) --skin native --cflags) #$(MY_CFLAGS)

#LDFLAGS=$(shell $(XENOCONFIG) --xeno-ldflags) $(MY_LDFLAGS) -lnative
LDFLAGS=$(shell $(XENOCONFIG) --skin native --ldflags)# $(MY_LDFLAGS)
#-lnative

# This includes the library path of given Xenomai into the binary to make
live
# easier for beginners if Xenomai's libs are not in any default search path.
# LDFLAGS+=-Xlinker -rpath -Xlinker $(shell $(XENOCONFIG) --libdir)

all:: $(APPLICATIONS)

clean::
    $(RM) $(APPLICATIONS) *.o

endif
endif

###### SPECIAL TARGET RULES ######
#rtprint: rtprint.c
#    $(CC) $(CFLAGS) $? $(LDFLAGS) -lrtdk -o $@


spidx.o : $(ROBOARD_LIB)spidx.c
    $(CC) $(CFLAGS) -I$(INCLUDE_DIR) -c $(ROBOARD_LIB)spidx.c

spi.o : $(ROBOARD_LIB)spi.c
    $(CC) $(CFLAGS) -I$(INCLUDE_DIR) -c $(ROBOARD_LIB)spi.c

rcservo.o : $(ROBOARD_LIB)rcservo.c
    $(CC) $(CFLAGS) -I$(INCLUDE_DIR) -c $(ROBOARD_LIB)rcservo.c

pwmdx.o : $(ROBOARD_LIB)pwmdx.c
    $(CC) $(CFLAGS) -I$(INCLUDE_DIR) -c $(ROBOARD_LIB)pwmdx.c

pwm.o : $(ROBOARD_LIB)pwm.c
    $(CC) $(CFLAGS) -I$(INCLUDE_DIR) -c $(ROBOARD_LIB)pwm.c

io.o : $(ROBOARD_LIB)io.c
    $(CC) $(CFLAGS) -I$(INCLUDE_DIR) -c $(ROBOARD_LIB)io.c

i2cdx.o : $(ROBOARD_LIB)i2cdx.c
    $(CC) $(CFLAGS) -I$(INCLUDE_DIR) -c $(ROBOARD_LIB)i2cdx.c

i2c.o : $(ROBOARD_LIB)i2c.c
    $(CC) $(CFLAGS) -I$(INCLUDE_DIR) -c $(ROBOARD_LIB)i2c.c

common.o : $(ROBOARD_LIB)common.c
    $(CC) $(CFLAGS) -I$(INCLUDE_DIR) -c $(ROBOARD_LIB)common.c

ad79x8.o : $(ROBOARD_LIB)ad79x8.c
    $(CC) $(CFLAGS) -I./roboard_lib -c $(ROBOARD_LIB)ad79x8.c


testingxenomai:  $(OBJECTS)
#    $(CC) $(CFLAGS) $(OBJECTS) $(LDFLAGS) -lrtdk -o $@
    $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) -lrtdk


###### KERNEL MODULE BUILD (no change required normally) ######
ifneq ($(MODULES),)

### Default to sources of currently running kernel
KSRC ?= /lib/modules/$(shell uname -r)/build

OBJS     := ${patsubst %, %.o, $(MODULES)}
CLEANMOD := ${patsubst %, .%*, $(MODULES)}
PWD      := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)

### Kernel 2.6
ifeq ($(findstring 2.6,$(KSRC)),2.6)

obj-m        := $(OBJS)
EXTRA_CFLAGS := -I$(KSRC)/include/xenomai -I$(KSRC)/include/xenomai/posix
-I$(ADD_CFLAGS) -I$(PWD) -I$./

all::
    $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) modules

### Kernel 2.4
else

ARCH    ?= $(shell uname -i)
INCLUDE := -I$(KSRC)/include/xenomai -I$(KSRC)/include/xenomai/compat
-I$(KSRC)/include/xenomai/posix
CFLAGS  += $(shell $(MAKE) -s -C $(KSRC) CC=$(CC) ARCH=$(ARCH)
SUBDIRS=$(PWD) modules) $(INCLUDE)

all:: $(OBJS)

endif

## Target for capturing 2.4 module CFLAGS
modules:
    @echo "$(CFLAGS)"

clean::
    $(RM) $(CLEANMOD) *.o *.ko *.mod.c Module*.symvers Module.markers
modules.order
    $(RM) -R .tmp*

endif
#######################################MAKE
END##############################


##############OUTPUT############################################

ugvuavrt4@domain.hid codes$ sudo make
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe
-D__XENO__  -I./roboard_lib -c ./roboard_lib/spidx.c
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe
-D__XENO__  -I./roboard_lib -c ./roboard_lib/spi.c
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe
-D__XENO__  -I./roboard_lib -c ./roboard_lib/rcservo.c
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe
-D__XENO__  -I./roboard_lib -c ./roboard_lib/pwmdx.c
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe
-D__XENO__  -I./roboard_lib -c ./roboard_lib/pwm.c
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe
-D__XENO__  -I./roboard_lib -c ./roboard_lib/io.c
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe
-D__XENO__  -I./roboard_lib -c ./roboard_lib/i2cdx.c
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe
-D__XENO__  -I./roboard_lib -c ./roboard_lib/i2c.c
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe
-D__XENO__  -I./roboard_lib -c ./roboard_lib/common.c
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe
-D__XENO__  -I./roboard_lib -c ./roboard_lib/ad79x8.c
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe
-D__XENO__  -lnative -L/usr/xenomai/lib -lxenomai -lpthread -o
testingxenomai spidx.o spi.o rcservo.o pwmdx.o pwm.o io.o i2cdx.o i2c.o
common.o ad79x8.o  -lrtdk
spi.o: In function `read_sb_regb':
spi.c:(.text+0x0): multiple definition of `read_sb_regb'
spidx.o:spidx.c:(.text+0x0): first defined here
spi.o: In function `read_sb_regw':
spi.c:(.text+0x44): multiple definition of `read_sb_regw'
spidx.o:spidx.c:(.text+0x44): first defined here
spi.o: In function `read_sb_reg':
spi.c:(.text+0x8d): multiple definition of `read_sb_reg'
spidx.o:spidx.c:(.text+0x8d): first defined here
spi.o: In function `write_sb_regb':
spi.c:(.text+0xc3): multiple definition of `write_sb_regb'
spidx.o:spidx.c:(.text+0xc3): first defined here
spi.o: In function `write_sb_regw':
spi.c:(.text+0x14a): multiple definition of `write_sb_regw'
spidx.o:spidx.c:(.text+0x14a): first defined here
spi.o: In function `write_sb_reg':
spi.c:(.text+0x1ca): multiple definition of `write_sb_reg'
spidx.o:spidx.c:(.text+0x1ca): first defined here
spi.o: In function `read_nb_regb':
spi.c:(.text+0x207): multiple definition of `read_nb_regb'
spidx.o:spidx.c:(.text+0x207): first defined here
spi.o: In function `read_nb_regw':
spi.c:(.text+0x24b): multiple definition of `read_nb_regw'
spidx.o:spidx.c:(.text+0x24b): first defined here
spi.o: In function `read_nb_reg':
spi.c:(.text+0x294): multiple definition of `read_nb_reg'
spidx.o:spidx.c:(.text+0x294): first defined here
spi.o: In function `write_nb_regb':
spi.c:(.text+0x2ca): multiple definition of `write_nb_regb'
spidx.o:spidx.c:(.text+0x2ca): first defined here
spi.o: In function `write_nb_regw':
spi.c:(.text+0x351): multiple definition of `write_nb_regw'
spidx.o:spidx.c:(.text+0x351): first defined here
spi.o: In function `write_nb_reg':
spi.c:(.text+0x3d1): multiple definition of `write_nb_reg'
spidx.o:spidx.c:(.text+0x3d1): first defined here
rcservo.o: In function `read_sb_regb':
rcservo.c:(.text+0x0): multiple definition of `read_sb_regb'
spidx.o:spidx.c:(.text+0x0): first defined here
rcservo.o: In function `read_sb_regw':
rcservo.c:(.text+0x44): multiple definition of `read_sb_regw'
spidx.o:spidx.c:(.text+0x44): first defined here
rcservo.o: In function `read_sb_reg':
rcservo.c:(.text+0x8d): multiple definition of `read_sb_reg'
spidx.o:spidx.c:(.text+0x8d): first defined here
rcservo.o: In function `write_sb_regb':
rcservo.c:(.text+0xc3): multiple definition of `write_sb_regb'
spidx.o:spidx.c:(.text+0xc3): first defined here
rcservo.o: In function `write_sb_regw':
rcservo.c:(.text+0x14a): multiple definition of `write_sb_regw'
spidx.o:spidx.c:(.text+0x14a): first defined here
rcservo.o: In function `write_sb_reg':
rcservo.c:(.text+0x1ca): multiple definition of `write_sb_reg'
spidx.o:spidx.c:(.text+0x1ca): first defined here
rcservo.o: In function `read_nb_regb':
rcservo.c:(.text+0x207): multiple definition of `read_nb_regb'
spidx.o:spidx.c:(.text+0x207): first defined here
rcservo.o: In function `read_nb_regw':
rcservo.c:(.text+0x24b): multiple definition of `read_nb_regw'
spidx.o:spidx.c:(.text+0x24b): first defined here
rcservo.o: In function `read_nb_reg':
rcservo.c:(.text+0x294): multiple definition of `read_nb_reg'
spidx.o:spidx.c:(.text+0x294): first defined here
rcservo.o: In function `write_nb_regb':
rcservo.c:(.text+0x2ca): multiple definition of `write_nb_regb'
spidx.o:spidx.c:(.text+0x2ca): first defined here
rcservo.o: In function `write_nb_regw':
rcservo.c:(.text+0x351): multiple definition of `write_nb_regw'
spidx.o:spidx.c:(.text+0x351): first defined here
rcservo.o: In function `write_nb_reg':
rcservo.c:(.text+0x3d1): multiple definition of `write_nb_reg'
spidx.o:spidx.c:(.text+0x3d1): first defined here
pwmdx.o: In function `read_sb_regb':
pwmdx.c:(.text+0x0): multiple definition of `read_sb_regb'
spidx.o:spidx.c:(.text+0x0): first defined here
pwmdx.o: In function `read_sb_regw':
pwmdx.c:(.text+0x44): multiple definition of `read_sb_regw'
spidx.o:spidx.c:(.text+0x44): first defined here
pwmdx.o: In function `read_sb_reg':
pwmdx.c:(.text+0x8d): multiple definition of `read_sb_reg'
spidx.o:spidx.c:(.text+0x8d): first defined here
pwmdx.o: In function `write_sb_regb':
pwmdx.c:(.text+0xc3): multiple definition of `write_sb_regb'
spidx.o:spidx.c:(.text+0xc3): first defined here
pwmdx.o: In function `write_sb_regw':
pwmdx.c:(.text+0x14a): multiple definition of `write_sb_regw'
spidx.o:spidx.c:(.text+0x14a): first defined here
pwmdx.o: In function `write_sb_reg':
pwmdx.c:(.text+0x1ca): multiple definition of `write_sb_reg'
spidx.o:spidx.c:(.text+0x1ca): first defined here
pwmdx.o: In function `read_nb_regb':
pwmdx.c:(.text+0x207): multiple definition of `read_nb_regb'
spidx.o:spidx.c:(.text+0x207): first defined here
pwmdx.o: In function `read_nb_regw':
pwmdx.c:(.text+0x24b): multiple definition of `read_nb_regw'
spidx.o:spidx.c:(.text+0x24b): first defined here
pwmdx.o: In function `read_nb_reg':
pwmdx.c:(.text+0x294): multiple definition of `read_nb_reg'
spidx.o:spidx.c:(.text+0x294): first defined here
pwmdx.o: In function `write_nb_regb':
pwmdx.c:(.text+0x2ca): multiple definition of `write_nb_regb'
spidx.o:spidx.c:(.text+0x2ca): first defined here
pwmdx.o: In function `write_nb_regw':
pwmdx.c:(.text+0x351): multiple definition of `write_nb_regw'
spidx.o:spidx.c:(.text+0x351): first defined here
pwmdx.o: In function `write_nb_reg':
pwmdx.c:(.text+0x3d1): multiple definition of `write_nb_reg'
spidx.o:spidx.c:(.text+0x3d1): first defined here
pwm.o: In function `read_sb_regb':
pwm.c:(.text+0x0): multiple definition of `read_sb_regb'
spidx.o:spidx.c:(.text+0x0): first defined here
pwm.o: In function `read_sb_regw':
pwm.c:(.text+0x44): multiple definition of `read_sb_regw'
spidx.o:spidx.c:(.text+0x44): first defined here
pwm.o: In function `read_sb_reg':
pwm.c:(.text+0x8d): multiple definition of `read_sb_reg'
spidx.o:spidx.c:(.text+0x8d): first defined here
pwm.o: In function `write_sb_regb':
pwm.c:(.text+0xc3): multiple definition of `write_sb_regb'
spidx.o:spidx.c:(.text+0xc3): first defined here
pwm.o: In function `write_sb_regw':
pwm.c:(.text+0x14a): multiple definition of `write_sb_regw'
spidx.o:spidx.c:(.text+0x14a): first defined here
pwm.o: In function `write_sb_reg':
pwm.c:(.text+0x1ca): multiple definition of `write_sb_reg'
spidx.o:spidx.c:(.text+0x1ca): first defined here
pwm.o: In function `read_nb_regb':
pwm.c:(.text+0x207): multiple definition of `read_nb_regb'
spidx.o:spidx.c:(.text+0x207): first defined here
pwm.o: In function `read_nb_regw':
pwm.c:(.text+0x24b): multiple definition of `read_nb_regw'
spidx.o:spidx.c:(.text+0x24b): first defined here
pwm.o: In function `read_nb_reg':
pwm.c:(.text+0x294): multiple definition of `read_nb_reg'
spidx.o:spidx.c:(.text+0x294): first defined here
pwm.o: In function `write_nb_regb':
pwm.c:(.text+0x2ca): multiple definition of `write_nb_regb'
spidx.o:spidx.c:(.text+0x2ca): first defined here
pwm.o: In function `write_nb_regw':
pwm.c:(.text+0x351): multiple definition of `write_nb_regw'
spidx.o:spidx.c:(.text+0x351): first defined here
pwm.o: In function `write_nb_reg':
pwm.c:(.text+0x3d1): multiple definition of `write_nb_reg'
spidx.o:spidx.c:(.text+0x3d1): first defined here
io.o: In function `read_sb_regb':
io.c:(.text+0x0): multiple definition of `read_sb_regb'
spidx.o:spidx.c:(.text+0x0): first defined here
io.o: In function `read_sb_regw':
io.c:(.text+0x44): multiple definition of `read_sb_regw'
spidx.o:spidx.c:(.text+0x44): first defined here
io.o: In function `read_sb_reg':
io.c:(.text+0x8d): multiple definition of `read_sb_reg'
spidx.o:spidx.c:(.text+0x8d): first defined here
io.o: In function `write_sb_regb':
io.c:(.text+0xc3): multiple definition of `write_sb_regb'
spidx.o:spidx.c:(.text+0xc3): first defined here
io.o: In function `write_sb_regw':
io.c:(.text+0x14a): multiple definition of `write_sb_regw'
spidx.o:spidx.c:(.text+0x14a): first defined here
io.o: In function `write_sb_reg':
io.c:(.text+0x1ca): multiple definition of `write_sb_reg'
spidx.o:spidx.c:(.text+0x1ca): first defined here
io.o: In function `read_nb_regb':
io.c:(.text+0x207): multiple definition of `read_nb_regb'
spidx.o:spidx.c:(.text+0x207): first defined here
io.o: In function `read_nb_regw':
io.c:(.text+0x24b): multiple definition of `read_nb_regw'
spidx.o:spidx.c:(.text+0x24b): first defined here
io.o: In function `read_nb_reg':
io.c:(.text+0x294): multiple definition of `read_nb_reg'
spidx.o:spidx.c:(.text+0x294): first defined here
io.o: In function `write_nb_regb':
io.c:(.text+0x2ca): multiple definition of `write_nb_regb'
spidx.o:spidx.c:(.text+0x2ca): first defined here
io.o: In function `write_nb_regw':
io.c:(.text+0x351): multiple definition of `write_nb_regw'
spidx.o:spidx.c:(.text+0x351): first defined here
io.o: In function `write_nb_reg':
io.c:(.text+0x3d1): multiple definition of `write_nb_reg'
spidx.o:spidx.c:(.text+0x3d1): first defined here
i2cdx.o: In function `read_sb_regb':
i2cdx.c:(.text+0x0): multiple definition of `read_sb_regb'
spidx.o:spidx.c:(.text+0x0): first defined here
i2cdx.o: In function `read_sb_regw':
i2cdx.c:(.text+0x44): multiple definition of `read_sb_regw'
spidx.o:spidx.c:(.text+0x44): first defined here
i2cdx.o: In function `read_sb_reg':
i2cdx.c:(.text+0x8d): multiple definition of `read_sb_reg'
spidx.o:spidx.c:(.text+0x8d): first defined here
i2cdx.o: In function `write_sb_regb':
i2cdx.c:(.text+0xc3): multiple definition of `write_sb_regb'
spidx.o:spidx.c:(.text+0xc3): first defined here
i2cdx.o: In function `write_sb_regw':
i2cdx.c:(.text+0x14a): multiple definition of `write_sb_regw'
spidx.o:spidx.c:(.text+0x14a): first defined here
i2cdx.o: In function `write_sb_reg':
i2cdx.c:(.text+0x1ca): multiple definition of `write_sb_reg'
spidx.o:spidx.c:(.text+0x1ca): first defined here
i2cdx.o: In function `read_nb_regb':
i2cdx.c:(.text+0x207): multiple definition of `read_nb_regb'
spidx.o:spidx.c:(.text+0x207): first defined here
i2cdx.o: In function `read_nb_regw':
i2cdx.c:(.text+0x24b): multiple definition of `read_nb_regw'
spidx.o:spidx.c:(.text+0x24b): first defined here
i2cdx.o: In function `read_nb_reg':
i2cdx.c:(.text+0x294): multiple definition of `read_nb_reg'
spidx.o:spidx.c:(.text+0x294): first defined here
i2cdx.o: In function `write_nb_regb':
i2cdx.c:(.text+0x2ca): multiple definition of `write_nb_regb'
spidx.o:spidx.c:(.text+0x2ca): first defined here
i2cdx.o: In function `write_nb_regw':
i2cdx.c:(.text+0x351): multiple definition of `write_nb_regw'
spidx.o:spidx.c:(.text+0x351): first defined here
i2cdx.o: In function `write_nb_reg':
i2cdx.c:(.text+0x3d1): multiple definition of `write_nb_reg'
spidx.o:spidx.c:(.text+0x3d1): first defined here
i2c.o: In function `read_sb_regb':
i2c.c:(.text+0x0): multiple definition of `read_sb_regb'
spidx.o:spidx.c:(.text+0x0): first defined here
i2c.o: In function `read_sb_regw':
i2c.c:(.text+0x44): multiple definition of `read_sb_regw'
spidx.o:spidx.c:(.text+0x44): first defined here
i2c.o: In function `read_sb_reg':
i2c.c:(.text+0x8d): multiple definition of `read_sb_reg'
spidx.o:spidx.c:(.text+0x8d): first defined here
i2c.o: In function `write_sb_regb':
i2c.c:(.text+0xc3): multiple definition of `write_sb_regb'
spidx.o:spidx.c:(.text+0xc3): first defined here
i2c.o: In function `write_sb_regw':
i2c.c:(.text+0x14a): multiple definition of `write_sb_regw'
spidx.o:spidx.c:(.text+0x14a): first defined here
i2c.o: In function `write_sb_reg':
i2c.c:(.text+0x1ca): multiple definition of `write_sb_reg'
spidx.o:spidx.c:(.text+0x1ca): first defined here
i2c.o: In function `read_nb_regb':
i2c.c:(.text+0x207): multiple definition of `read_nb_regb'
spidx.o:spidx.c:(.text+0x207): first defined here
i2c.o: In function `read_nb_regw':
i2c.c:(.text+0x24b): multiple definition of `read_nb_regw'
spidx.o:spidx.c:(.text+0x24b): first defined here
i2c.o: In function `read_nb_reg':
i2c.c:(.text+0x294): multiple definition of `read_nb_reg'
spidx.o:spidx.c:(.text+0x294): first defined here
i2c.o: In function `write_nb_regb':
i2c.c:(.text+0x2ca): multiple definition of `write_nb_regb'
spidx.o:spidx.c:(.text+0x2ca): first defined here
i2c.o: In function `write_nb_regw':
i2c.c:(.text+0x351): multiple definition of `write_nb_regw'
spidx.o:spidx.c:(.text+0x351): first defined here
i2c.o: In function `write_nb_reg':
i2c.c:(.text+0x3d1): multiple definition of `write_nb_reg'
spidx.o:spidx.c:(.text+0x3d1): first defined here
i2c.o: In function `i2c0_Reset':
i2c.c:(.text+0x40e): multiple definition of `i2c0_Reset'
i2cdx.o:i2cdx.c:(.text+0x40e): first defined here
i2c.o: In function `i2c1_Reset':
i2c.c:(.text+0x422): multiple definition of `i2c1_Reset'
i2cdx.o:i2cdx.c:(.text+0x422): first defined here
i2c.o: In function `i2c0_EnableNoiseFilter':
i2c.c:(.text+0x436): multiple definition of `i2c0_EnableNoiseFilter'
i2cdx.o:i2cdx.c:(.text+0x436): first defined here
i2c.o: In function `i2c1_EnableNoiseFilter':
i2c.c:(.text+0x44a): multiple definition of `i2c1_EnableNoiseFilter'
i2cdx.o:i2cdx.c:(.text+0x44a): first defined here
i2c.o: In function `i2c0_DisableNoiseFilter':
i2c.c:(.text+0x45e): multiple definition of `i2c0_DisableNoiseFilter'
i2cdx.o:i2cdx.c:(.text+0x45e): first defined here
i2c.o: In function `i2c1_DisableNoiseFilter':
i2c.c:(.text+0x472): multiple definition of `i2c1_DisableNoiseFilter'
i2cdx.o:i2cdx.c:(.text+0x472): first defined here
i2c.o: In function `i2c0_EnableStandardHSM':
i2c.c:(.text+0x486): multiple definition of `i2c0_EnableStandardHSM'
i2cdx.o:i2cdx.c:(.text+0x486): first defined here
i2c.o: In function `i2c1_EnableStandardHSM':
i2c.c:(.text+0x49a): multiple definition of `i2c1_EnableStandardHSM'
i2cdx.o:i2cdx.c:(.text+0x49a): first defined here
i2c.o: In function `i2c0_DisableStandardHSM':
i2c.c:(.text+0x4ae): multiple definition of `i2c0_DisableStandardHSM'
i2cdx.o:i2cdx.c:(.text+0x4ae): first defined here
i2c.o: In function `i2c1_DisableStandardHSM':
i2c.c:(.text+0x4c2): multiple definition of `i2c1_DisableStandardHSM'
i2cdx.o:i2cdx.c:(.text+0x4c2): first defined here
i2c.o: In function `i2c0_EnableINT':
i2c.c:(.text+0x4d6): multiple definition of `i2c0_EnableINT'
i2cdx.o:i2cdx.c:(.text+0x4d6): first defined here
i2c.o: In function `i2c1_EnableINT':
i2c.c:(.text+0x4f8): multiple definition of `i2c1_EnableINT'
i2cdx.o:i2cdx.c:(.text+0x4f8): first defined here
i2c.o: In function `i2c0_DisableINT':
i2c.c:(.text+0x51a): multiple definition of `i2c0_DisableINT'
i2cdx.o:i2cdx.c:(.text+0x51a): first defined here
i2c.o: In function `i2c1_DisableINT':
i2c.c:(.text+0x53c): multiple definition of `i2c1_DisableINT'
i2cdx.o:i2cdx.c:(.text+0x53c): first defined here
i2c.o: In function `i2c0_SetCLKREG':
i2c.c:(.text+0x55e): multiple definition of `i2c0_SetCLKREG'
i2cdx.o:i2cdx.c:(.text+0x55e): first defined here
i2c.o: In function `i2c1_SetCLKREG':
i2c.c:(.text+0x595): multiple definition of `i2c1_SetCLKREG'
i2cdx.o:i2cdx.c:(.text+0x595): first defined here
i2c.o: In function `i2c0_ClearSTAT':
i2c.c:(.text+0x5cc): multiple definition of `i2c0_ClearSTAT'
i2cdx.o:i2cdx.c:(.text+0x5cc): first defined here
i2c.o: In function `i2c1_ClearSTAT':
i2c.c:(.text+0x5ee): multiple definition of `i2c1_ClearSTAT'
i2cdx.o:i2cdx.c:(.text+0x5ee): first defined here
i2c.o: In function `i2c0_ReadStatREG':
i2c.c:(.text+0x610): multiple definition of `i2c0_ReadStatREG'
i2cdx.o:i2cdx.c:(.text+0x610): first defined here
i2c.o: In function `i2c1_ReadStatREG':
i2c.c:(.text+0x624): multiple definition of `i2c1_ReadStatREG'
i2cdx.o:i2cdx.c:(.text+0x624): first defined here
i2c.o: In function `i2c0_IsMaster':
i2c.c:(.text+0x638): multiple definition of `i2c0_IsMaster'
i2cdx.o:i2cdx.c:(.text+0x638): first defined here
i2c.o: In function `i2c1_IsMaster':
i2c.c:(.text+0x64c): multiple definition of `i2c1_IsMaster'
i2cdx.o:i2cdx.c:(.text+0x64c): first defined here
i2c.o: In function `i2c0_CheckBusBusy':
i2c.c:(.text+0x660): multiple definition of `i2c0_CheckBusBusy'
i2cdx.o:i2cdx.c:(.text+0x660): first defined here
i2c.o: In function `i2c1_CheckBusBusy':
i2c.c:(.text+0x674): multiple definition of `i2c1_CheckBusBusy'
i2cdx.o:i2cdx.c:(.text+0x674): first defined here
i2c.o: In function `i2c0_CheckTXDone':
i2c.c:(.text+0x688): multiple definition of `i2c0_CheckTXDone'
i2cdx.o:i2cdx.c:(.text+0x688): first defined here
i2c.o: In function `i2c1_CheckTXDone':
i2c.c:(.text+0x69c): multiple definition of `i2c1_CheckTXDone'
i2cdx.o:i2cdx.c:(.text+0x69c): first defined here
i2c.o: In function `i2c0_ClearTXDone':
i2c.c:(.text+0x6b0): multiple definition of `i2c0_ClearTXDone'
i2cdx.o:i2cdx.c:(.text+0x6b0): first defined here
i2c.o: In function `i2c1_ClearTXDone':
i2c.c:(.text+0x6c4): multiple definition of `i2c1_ClearTXDone'
i2cdx.o:i2cdx.c:(.text+0x6c4): first defined here
i2c.o: In function `i2c0_CheckRXRdy':
i2c.c:(.text+0x6d8): multiple definition of `i2c0_CheckRXRdy'
i2cdx.o:i2cdx.c:(.text+0x6d8): first defined here
i2c.o: In function `i2c1_CheckRXRdy':
i2c.c:(.text+0x6ec): multiple definition of `i2c1_CheckRXRdy'
i2cdx.o:i2cdx.c:(.text+0x6ec): first defined here
i2c.o: In function `i2c0_ClearRXRdy':
i2c.c:(.text+0x700): multiple definition of `i2c0_ClearRXRdy'
i2cdx.o:i2cdx.c:(.text+0x700): first defined here
i2c.o: In function `i2c1_ClearRXRdy':
i2c.c:(.text+0x714): multiple definition of `i2c1_ClearRXRdy'
i2cdx.o:i2cdx.c:(.text+0x714): first defined here
i2c.o: In function `i2c0_WriteDataREG':
i2c.c:(.text+0x728): multiple definition of `i2c0_WriteDataREG'
i2cdx.o:i2cdx.c:(.text+0x728): first defined here
i2c.o: In function `i2c1_WriteDataREG':
i2c.c:(.text+0x74a): multiple definition of `i2c1_WriteDataREG'
i2cdx.o:i2cdx.c:(.text+0x74a): first defined here
i2c.o: In function `i2c0_ReadDataREG':
i2c.c:(.text+0x76c): multiple definition of `i2c0_ReadDataREG'
i2cdx.o:i2cdx.c:(.text+0x76c): first defined here
i2c.o: In function `i2c1_ReadDataREG':
i2c.c:(.text+0x780): multiple definition of `i2c1_ReadDataREG'
i2cdx.o:i2cdx.c:(.text+0x780): first defined here
i2c.o: In function `i2c0master_SetStopBit':
i2c.c:(.text+0x794): multiple definition of `i2c0master_SetStopBit'
i2cdx.o:i2cdx.c:(.text+0x794): first defined here
i2c.o: In function `i2c1master_SetStopBit':
i2c.c:(.text+0x7a8): multiple definition of `i2c1master_SetStopBit'
i2cdx.o:i2cdx.c:(.text+0x7a8): first defined here
i2c.o: In function `i2c0master_CheckStopBit':
i2c.c:(.text+0x7bc): multiple definition of `i2c0master_CheckStopBit'
i2cdx.o:i2cdx.c:(.text+0x7bc): first defined here
i2c.o: In function `i2c1master_CheckStopBit':
i2c.c:(.text+0x7d0): multiple definition of `i2c1master_CheckStopBit'
i2cdx.o:i2cdx.c:(.text+0x7d0): first defined here
i2c.o: In function `i2c0master_CheckARLoss':
i2c.c:(.text+0x7e4): multiple definition of `i2c0master_CheckARLoss'
i2cdx.o:i2cdx.c:(.text+0x7e4): first defined here
i2c.o: In function `i2c1master_CheckARLoss':
i2c.c:(.text+0x7f8): multiple definition of `i2c1master_CheckARLoss'
i2cdx.o:i2cdx.c:(.text+0x7f8): first defined here
i2c.o: In function `i2c0master_ClearARLoss':
i2c.c:(.text+0x80c): multiple definition of `i2c0master_ClearARLoss'
i2cdx.o:i2cdx.c:(.text+0x80c): first defined here
i2c.o: In function `i2c1master_ClearARLoss':
i2c.c:(.text+0x820): multiple definition of `i2c1master_ClearARLoss'
i2cdx.o:i2cdx.c:(.text+0x820): first defined here
i2c.o: In function `i2c0master_CheckAckErr':
i2c.c:(.text+0x834): multiple definition of `i2c0master_CheckAckErr'
i2cdx.o:i2cdx.c:(.text+0x834): first defined here
i2c.o: In function `i2c1master_CheckAckErr':
i2c.c:(.text+0x848): multiple definition of `i2c1master_CheckAckErr'
i2cdx.o:i2cdx.c:(.text+0x848): first defined here
i2c.o: In function `i2c0master_ClearAckErr':
i2c.c:(.text+0x85c): multiple definition of `i2c0master_ClearAckErr'
i2cdx.o:i2cdx.c:(.text+0x85c): first defined here
i2c.o: In function `i2c1master_ClearAckErr':
i2c.c:(.text+0x870): multiple definition of `i2c1master_ClearAckErr'
i2cdx.o:i2cdx.c:(.text+0x870): first defined here
i2c.o: In function `i2c0master_WriteAddrREG':
i2c.c:(.text+0x884): multiple definition of `i2c0master_WriteAddrREG'
i2cdx.o:i2cdx.c:(.text+0x884): first defined here
i2c.o: In function `i2c1master_WriteAddrREG':
i2c.c:(.text+0x8b4): multiple definition of `i2c1master_WriteAddrREG'
i2cdx.o:i2cdx.c:(.text+0x8b4): first defined here
i2c.o: In function `i2c0slave_EnableACK':
i2c.c:(.text+0x8e4): multiple definition of `i2c0slave_EnableACK'
i2cdx.o:i2cdx.c:(.text+0x8e4): first defined here
i2c.o: In function `i2c1slave_EnableACK':
i2c.c:(.text+0x8f8): multiple definition of `i2c1slave_EnableACK'
i2cdx.o:i2cdx.c:(.text+0x8f8): first defined here
i2c.o: In function `i2c0slave_EnableNAK':
i2c.c:(.text+0x90c): multiple definition of `i2c0slave_EnableNAK'
i2cdx.o:i2cdx.c:(.text+0x90c): first defined here
i2c.o: In function `i2c1slave_EnableNAK':
i2c.c:(.text+0x920): multiple definition of `i2c1slave_EnableNAK'
i2cdx.o:i2cdx.c:(.text+0x920): first defined here
i2c.o: In function `i2c0slave_SetAddr':
i2c.c:(.text+0x934): multiple definition of `i2c0slave_SetAddr'
i2cdx.o:i2cdx.c:(.text+0x934): first defined here
i2c.o: In function `i2c1slave_SetAddr':
i2c.c:(.text+0x956): multiple definition of `i2c1slave_SetAddr'
i2cdx.o:i2cdx.c:(.text+0x956): first defined here
i2c.o: In function `i2c0slave_CheckSlaveWREQ':
i2c.c:(.text+0x978): multiple definition of `i2c0slave_CheckSlaveWREQ'
i2cdx.o:i2cdx.c:(.text+0x978): first defined here
i2c.o: In function `i2c1slave_CheckSlaveWREQ':
i2c.c:(.text+0x98c): multiple definition of `i2c1slave_CheckSlaveWREQ'
i2cdx.o:i2cdx.c:(.text+0x98c): first defined here
i2c.o: In function `i2c0slave_ClearSlaveWREQ':
i2c.c:(.text+0x9a0): multiple definition of `i2c0slave_ClearSlaveWREQ'
i2cdx.o:i2cdx.c:(.text+0x9a0): first defined here
i2c.o: In function `i2c1slave_ClearSlaveWREQ':
i2c.c:(.text+0x9b4): multiple definition of `i2c1slave_ClearSlaveWREQ'
i2cdx.o:i2cdx.c:(.text+0x9b4): first defined here
ad79x8.o: In function `read_sb_regb':
ad79x8.c:(.text+0x0): multiple definition of `read_sb_regb'
spidx.o:spidx.c:(.text+0x0): first defined here
ad79x8.o: In function `read_sb_regw':
ad79x8.c:(.text+0x44): multiple definition of `read_sb_regw'
spidx.o:spidx.c:(.text+0x44): first defined here
ad79x8.o: In function `read_sb_reg':
ad79x8.c:(.text+0x8d): multiple definition of `read_sb_reg'
spidx.o:spidx.c:(.text+0x8d): first defined here
ad79x8.o: In function `write_sb_regb':
ad79x8.c:(.text+0xc3): multiple definition of `write_sb_regb'
spidx.o:spidx.c:(.text+0xc3): first defined here
ad79x8.o: In function `write_sb_regw':
ad79x8.c:(.text+0x14a): multiple definition of `write_sb_regw'
spidx.o:spidx.c:(.text+0x14a): first defined here
ad79x8.o: In function `write_sb_reg':
ad79x8.c:(.text+0x1ca): multiple definition of `write_sb_reg'
spidx.o:spidx.c:(.text+0x1ca): first defined here
ad79x8.o: In function `read_nb_regb':
ad79x8.c:(.text+0x207): multiple definition of `read_nb_regb'
spidx.o:spidx.c:(.text+0x207): first defined here
ad79x8.o: In function `read_nb_regw':
ad79x8.c:(.text+0x24b): multiple definition of `read_nb_regw'
spidx.o:spidx.c:(.text+0x24b): first defined here
ad79x8.o: In function `read_nb_reg':
ad79x8.c:(.text+0x294): multiple definition of `read_nb_reg'
spidx.o:spidx.c:(.text+0x294): first defined here
ad79x8.o: In function `write_nb_regb':
ad79x8.c:(.text+0x2ca): multiple definition of `write_nb_regb'
spidx.o:spidx.c:(.text+0x2ca): first defined here
ad79x8.o: In function `write_nb_regw':
ad79x8.c:(.text+0x351): multiple definition of `write_nb_regw'
spidx.o:spidx.c:(.text+0x351): first defined here
ad79x8.o: In function `write_nb_reg':
ad79x8.c:(.text+0x3d1): multiple definition of `write_nb_reg'
spidx.o:spidx.c:(.text+0x3d1): first defined here
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/crt1.o: In function
`_start':
/build/buildd/eglibc-2.10.1/csu/../sysdeps/i386/elf/start.S:115: undefined
reference to `main'
collect2: ld returned 1 exit status
make: *** [testingxenomai] Error 1
##########################################END############################

[-- Attachment #1.2: Type: text/html, Size: 33889 bytes --]

[-- Attachment #2: Makefile --]
[-- Type: application/octet-stream, Size: 3709 bytes --]

###### CONFIGURATION ######

### List of applications to be build
APPLICATIONS = testingxenomai 

### Note: to override the search path for the xeno-config script, use "make XENO=..."

### List of modules to be build
MODULES =

### Note: to override the kernel source path, use "make KSRC=..."

ROBOARD_LIB=./roboard_lib/

###### USER SPACE BUILD (no change required normally) ######
ifeq ($(KERNELRELEASE),)
ifneq ($(APPLICATIONS),)

### Default Xenomai installation path
XENO ?= /usr/xenomai

XENOCONFIG=$(shell PATH=$(XENO):$(XENO)/bin:$(PATH) which xeno-config 2>/dev/null)

### Sanity check
ifeq ($(XENOCONFIG),)
all::
	@echo ">>> Invoke make like this: \"make XENO=/path/to/xeno-config\" <<<"
	@echo
endif

OBJECTS =      \
		spidx.o \
		spi.o \
		rcservo.o \
		pwmdx.o \
		pwm.o \
		io.o \
		i2cdx.o \
		i2c.o \
		common.o \
		ad79x8.o \

INCLUDE_DIR=./roboard_lib

CC=$(shell $(XENOCONFIG) --cc)

#CPP=$(shell $(XENOCONFIG) --g++)

#CFLAGS=$(shell $(XENOCONFIG) --xeno-cflags) $(MY_CFLAGS) -Wall #-DROBOIO_DLL
CFLAGS=$(shell $(XENOCONFIG) --skin native --cflags) #$(MY_CFLAGS) 

#LDFLAGS=$(shell $(XENOCONFIG) --xeno-ldflags) $(MY_LDFLAGS) -lnative
LDFLAGS=$(shell $(XENOCONFIG) --skin native --ldflags)# $(MY_LDFLAGS) #-lnative

# This includes the library path of given Xenomai into the binary to make live
# easier for beginners if Xenomai's libs are not in any default search path.
# LDFLAGS+=-Xlinker -rpath -Xlinker $(shell $(XENOCONFIG) --libdir)

all:: $(APPLICATIONS)

clean::
	$(RM) $(APPLICATIONS) *.o

endif
endif

###### SPECIAL TARGET RULES ######
#rtprint: rtprint.c
#	$(CC) $(CFLAGS) $? $(LDFLAGS) -lrtdk -o $@


spidx.o : $(ROBOARD_LIB)spidx.c
	$(CC) $(CFLAGS) -I$(INCLUDE_DIR) -c $(ROBOARD_LIB)spidx.c

spi.o : $(ROBOARD_LIB)spi.c
	$(CC) $(CFLAGS) -I$(INCLUDE_DIR) -c $(ROBOARD_LIB)spi.c

rcservo.o : $(ROBOARD_LIB)rcservo.c
	$(CC) $(CFLAGS) -I$(INCLUDE_DIR) -c $(ROBOARD_LIB)rcservo.c

pwmdx.o : $(ROBOARD_LIB)pwmdx.c
	$(CC) $(CFLAGS) -I$(INCLUDE_DIR) -c $(ROBOARD_LIB)pwmdx.c

pwm.o : $(ROBOARD_LIB)pwm.c
	$(CC) $(CFLAGS) -I$(INCLUDE_DIR) -c $(ROBOARD_LIB)pwm.c

io.o : $(ROBOARD_LIB)io.c
	$(CC) $(CFLAGS) -I$(INCLUDE_DIR) -c $(ROBOARD_LIB)io.c

i2cdx.o : $(ROBOARD_LIB)i2cdx.c
	$(CC) $(CFLAGS) -I$(INCLUDE_DIR) -c $(ROBOARD_LIB)i2cdx.c

i2c.o : $(ROBOARD_LIB)i2c.c
	$(CC) $(CFLAGS) -I$(INCLUDE_DIR) -c $(ROBOARD_LIB)i2c.c

common.o : $(ROBOARD_LIB)common.c
	$(CC) $(CFLAGS) -I$(INCLUDE_DIR) -c $(ROBOARD_LIB)common.c

ad79x8.o : $(ROBOARD_LIB)ad79x8.c
	$(CC) $(CFLAGS) -I./roboard_lib -c $(ROBOARD_LIB)ad79x8.c


testingxenomai:  $(OBJECTS)
#	$(CC) $(CFLAGS) $(OBJECTS) $(LDFLAGS) -lrtdk -o $@
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) -lrtdk 


###### KERNEL MODULE BUILD (no change required normally) ######
ifneq ($(MODULES),)

### Default to sources of currently running kernel
KSRC ?= /lib/modules/$(shell uname -r)/build

OBJS     := ${patsubst %, %.o, $(MODULES)}
CLEANMOD := ${patsubst %, .%*, $(MODULES)}
PWD      := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)

### Kernel 2.6
ifeq ($(findstring 2.6,$(KSRC)),2.6)

obj-m        := $(OBJS)
EXTRA_CFLAGS := -I$(KSRC)/include/xenomai -I$(KSRC)/include/xenomai/posix -I$(ADD_CFLAGS) -I$(PWD) -I$./

all::
	$(MAKE) -C $(KSRC) SUBDIRS=$(PWD) modules

### Kernel 2.4
else

ARCH    ?= $(shell uname -i)
INCLUDE := -I$(KSRC)/include/xenomai -I$(KSRC)/include/xenomai/compat -I$(KSRC)/include/xenomai/posix
CFLAGS  += $(shell $(MAKE) -s -C $(KSRC) CC=$(CC) ARCH=$(ARCH) SUBDIRS=$(PWD) modules) $(INCLUDE)

all:: $(OBJS)

endif

## Target for capturing 2.4 module CFLAGS
modules:
	@echo "$(CFLAGS)"

clean::
	$(RM) $(CLEANMOD) *.o *.ko *.mod.c Module*.symvers Module.markers modules.order
	$(RM) -R .tmp*

endif

[-- Attachment #3: testingxenomai.c --]
[-- Type: text/x-csrc, Size: 2025 bytes --]

#include <stdio.h>
#include <stdbool.h>
#include <signal.h>
#include <unistd.h>
#include <sys/mman.h>

#include <native/task.h>
#include <native/timer.h>

//#include "./roboard_lib/defines.h"
#include "./roboard_lib/pwm.h"

#include "./roboard_lib/roboard.h"


RT_TASK demo_task;

/* NOTE: error handling omitted. */

void demo(void *arg)
{
	RTIME now, previous;

	/*
	 * Arguments: &task (NULL=self),
	 *            start time,
	 *            period (here: 1 s)
	 */
	rt_task_set_periodic(NULL, TM_NOW, 1000000);    //1 khz=1x10^6
	//previous = rt_timer_read();

	while (1) {
		rt_task_wait_period(NULL);
		//now = rt_timer_read();
                int val;

                 printf("out logic 1 on PWM channel 0 (pin: S1)\n");
	         rcservo_Outp(0, 1);

		 printf("out logic 0 on PWM channel 0 (pin: S1)\n");
	 	 rcservo_Outp(0, 0);

		/*
		 * NOTE: printf may have unexpected impact on the timing of
		 *       your program. It is used here in the critical loop
		 *       only for demonstration purposes.
		 */
		/*printf("Time since last turn: %ld.%06ld ms\n",
		       (long)(now - previous) / 1000000,
		       (long)(now - previous) % 1000000);
		       previous = now;*/
	}
}

void catch_signal(int sig)
{
}

int main(int argc, char* argv[])
{

	roboio_SetRBVer(RB_100);  // set the RoBoard version
	    if (rcservo_Initialize(RCSERVO_USENOCHANNEL) == false)
    {
        printf("ERR: rcservo_Initialize() fails (%s)!\n", roboio_GetErrMsg());
//        return -1;
    }


	signal(SIGTERM, catch_signal);
	signal(SIGINT, catch_signal);

	/* Avoids memory swapping for this program */
	mlockall(MCL_CURRENT|MCL_FUTURE);

	/*
	 * Arguments: &task,
	 *            name,
	 *            stack size (0=default),
	 *            priority,
	 *            mode (FPU, start suspended, ...)
	 */
	rt_task_create(&demo_task, "trivial", 0, 99, 0);

	/*
	 * Arguments: &task,
	 *            task function,
	 *            function argument
	 */
	rt_task_start(&demo_task, &demo, NULL);

	pause();

	rt_task_delete(&demo_task);
}

[-- Attachment #4: errrorr --]
[-- Type: application/octet-stream, Size: 25155 bytes --]

ugvuavrt4@ugvuavrt4-desktop:~/testing codes$ sudo make
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__  -I./roboard_lib -c ./roboard_lib/spidx.c
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__  -I./roboard_lib -c ./roboard_lib/spi.c
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__  -I./roboard_lib -c ./roboard_lib/rcservo.c
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__  -I./roboard_lib -c ./roboard_lib/pwmdx.c
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__  -I./roboard_lib -c ./roboard_lib/pwm.c
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__  -I./roboard_lib -c ./roboard_lib/io.c
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__  -I./roboard_lib -c ./roboard_lib/i2cdx.c
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__  -I./roboard_lib -c ./roboard_lib/i2c.c
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__  -I./roboard_lib -c ./roboard_lib/common.c
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__  -I./roboard_lib -c ./roboard_lib/ad79x8.c
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__  -lnative -L/usr/xenomai/lib -lxenomai -lpthread -o testingxenomai spidx.o spi.o rcservo.o pwmdx.o pwm.o io.o i2cdx.o i2c.o common.o ad79x8.o  -lrtdk 
spi.o: In function `read_sb_regb':
spi.c:(.text+0x0): multiple definition of `read_sb_regb'
spidx.o:spidx.c:(.text+0x0): first defined here
spi.o: In function `read_sb_regw':
spi.c:(.text+0x44): multiple definition of `read_sb_regw'
spidx.o:spidx.c:(.text+0x44): first defined here
spi.o: In function `read_sb_reg':
spi.c:(.text+0x8d): multiple definition of `read_sb_reg'
spidx.o:spidx.c:(.text+0x8d): first defined here
spi.o: In function `write_sb_regb':
spi.c:(.text+0xc3): multiple definition of `write_sb_regb'
spidx.o:spidx.c:(.text+0xc3): first defined here
spi.o: In function `write_sb_regw':
spi.c:(.text+0x14a): multiple definition of `write_sb_regw'
spidx.o:spidx.c:(.text+0x14a): first defined here
spi.o: In function `write_sb_reg':
spi.c:(.text+0x1ca): multiple definition of `write_sb_reg'
spidx.o:spidx.c:(.text+0x1ca): first defined here
spi.o: In function `read_nb_regb':
spi.c:(.text+0x207): multiple definition of `read_nb_regb'
spidx.o:spidx.c:(.text+0x207): first defined here
spi.o: In function `read_nb_regw':
spi.c:(.text+0x24b): multiple definition of `read_nb_regw'
spidx.o:spidx.c:(.text+0x24b): first defined here
spi.o: In function `read_nb_reg':
spi.c:(.text+0x294): multiple definition of `read_nb_reg'
spidx.o:spidx.c:(.text+0x294): first defined here
spi.o: In function `write_nb_regb':
spi.c:(.text+0x2ca): multiple definition of `write_nb_regb'
spidx.o:spidx.c:(.text+0x2ca): first defined here
spi.o: In function `write_nb_regw':
spi.c:(.text+0x351): multiple definition of `write_nb_regw'
spidx.o:spidx.c:(.text+0x351): first defined here
spi.o: In function `write_nb_reg':
spi.c:(.text+0x3d1): multiple definition of `write_nb_reg'
spidx.o:spidx.c:(.text+0x3d1): first defined here
rcservo.o: In function `read_sb_regb':
rcservo.c:(.text+0x0): multiple definition of `read_sb_regb'
spidx.o:spidx.c:(.text+0x0): first defined here
rcservo.o: In function `read_sb_regw':
rcservo.c:(.text+0x44): multiple definition of `read_sb_regw'
spidx.o:spidx.c:(.text+0x44): first defined here
rcservo.o: In function `read_sb_reg':
rcservo.c:(.text+0x8d): multiple definition of `read_sb_reg'
spidx.o:spidx.c:(.text+0x8d): first defined here
rcservo.o: In function `write_sb_regb':
rcservo.c:(.text+0xc3): multiple definition of `write_sb_regb'
spidx.o:spidx.c:(.text+0xc3): first defined here
rcservo.o: In function `write_sb_regw':
rcservo.c:(.text+0x14a): multiple definition of `write_sb_regw'
spidx.o:spidx.c:(.text+0x14a): first defined here
rcservo.o: In function `write_sb_reg':
rcservo.c:(.text+0x1ca): multiple definition of `write_sb_reg'
spidx.o:spidx.c:(.text+0x1ca): first defined here
rcservo.o: In function `read_nb_regb':
rcservo.c:(.text+0x207): multiple definition of `read_nb_regb'
spidx.o:spidx.c:(.text+0x207): first defined here
rcservo.o: In function `read_nb_regw':
rcservo.c:(.text+0x24b): multiple definition of `read_nb_regw'
spidx.o:spidx.c:(.text+0x24b): first defined here
rcservo.o: In function `read_nb_reg':
rcservo.c:(.text+0x294): multiple definition of `read_nb_reg'
spidx.o:spidx.c:(.text+0x294): first defined here
rcservo.o: In function `write_nb_regb':
rcservo.c:(.text+0x2ca): multiple definition of `write_nb_regb'
spidx.o:spidx.c:(.text+0x2ca): first defined here
rcservo.o: In function `write_nb_regw':
rcservo.c:(.text+0x351): multiple definition of `write_nb_regw'
spidx.o:spidx.c:(.text+0x351): first defined here
rcservo.o: In function `write_nb_reg':
rcservo.c:(.text+0x3d1): multiple definition of `write_nb_reg'
spidx.o:spidx.c:(.text+0x3d1): first defined here
pwmdx.o: In function `read_sb_regb':
pwmdx.c:(.text+0x0): multiple definition of `read_sb_regb'
spidx.o:spidx.c:(.text+0x0): first defined here
pwmdx.o: In function `read_sb_regw':
pwmdx.c:(.text+0x44): multiple definition of `read_sb_regw'
spidx.o:spidx.c:(.text+0x44): first defined here
pwmdx.o: In function `read_sb_reg':
pwmdx.c:(.text+0x8d): multiple definition of `read_sb_reg'
spidx.o:spidx.c:(.text+0x8d): first defined here
pwmdx.o: In function `write_sb_regb':
pwmdx.c:(.text+0xc3): multiple definition of `write_sb_regb'
spidx.o:spidx.c:(.text+0xc3): first defined here
pwmdx.o: In function `write_sb_regw':
pwmdx.c:(.text+0x14a): multiple definition of `write_sb_regw'
spidx.o:spidx.c:(.text+0x14a): first defined here
pwmdx.o: In function `write_sb_reg':
pwmdx.c:(.text+0x1ca): multiple definition of `write_sb_reg'
spidx.o:spidx.c:(.text+0x1ca): first defined here
pwmdx.o: In function `read_nb_regb':
pwmdx.c:(.text+0x207): multiple definition of `read_nb_regb'
spidx.o:spidx.c:(.text+0x207): first defined here
pwmdx.o: In function `read_nb_regw':
pwmdx.c:(.text+0x24b): multiple definition of `read_nb_regw'
spidx.o:spidx.c:(.text+0x24b): first defined here
pwmdx.o: In function `read_nb_reg':
pwmdx.c:(.text+0x294): multiple definition of `read_nb_reg'
spidx.o:spidx.c:(.text+0x294): first defined here
pwmdx.o: In function `write_nb_regb':
pwmdx.c:(.text+0x2ca): multiple definition of `write_nb_regb'
spidx.o:spidx.c:(.text+0x2ca): first defined here
pwmdx.o: In function `write_nb_regw':
pwmdx.c:(.text+0x351): multiple definition of `write_nb_regw'
spidx.o:spidx.c:(.text+0x351): first defined here
pwmdx.o: In function `write_nb_reg':
pwmdx.c:(.text+0x3d1): multiple definition of `write_nb_reg'
spidx.o:spidx.c:(.text+0x3d1): first defined here
pwm.o: In function `read_sb_regb':
pwm.c:(.text+0x0): multiple definition of `read_sb_regb'
spidx.o:spidx.c:(.text+0x0): first defined here
pwm.o: In function `read_sb_regw':
pwm.c:(.text+0x44): multiple definition of `read_sb_regw'
spidx.o:spidx.c:(.text+0x44): first defined here
pwm.o: In function `read_sb_reg':
pwm.c:(.text+0x8d): multiple definition of `read_sb_reg'
spidx.o:spidx.c:(.text+0x8d): first defined here
pwm.o: In function `write_sb_regb':
pwm.c:(.text+0xc3): multiple definition of `write_sb_regb'
spidx.o:spidx.c:(.text+0xc3): first defined here
pwm.o: In function `write_sb_regw':
pwm.c:(.text+0x14a): multiple definition of `write_sb_regw'
spidx.o:spidx.c:(.text+0x14a): first defined here
pwm.o: In function `write_sb_reg':
pwm.c:(.text+0x1ca): multiple definition of `write_sb_reg'
spidx.o:spidx.c:(.text+0x1ca): first defined here
pwm.o: In function `read_nb_regb':
pwm.c:(.text+0x207): multiple definition of `read_nb_regb'
spidx.o:spidx.c:(.text+0x207): first defined here
pwm.o: In function `read_nb_regw':
pwm.c:(.text+0x24b): multiple definition of `read_nb_regw'
spidx.o:spidx.c:(.text+0x24b): first defined here
pwm.o: In function `read_nb_reg':
pwm.c:(.text+0x294): multiple definition of `read_nb_reg'
spidx.o:spidx.c:(.text+0x294): first defined here
pwm.o: In function `write_nb_regb':
pwm.c:(.text+0x2ca): multiple definition of `write_nb_regb'
spidx.o:spidx.c:(.text+0x2ca): first defined here
pwm.o: In function `write_nb_regw':
pwm.c:(.text+0x351): multiple definition of `write_nb_regw'
spidx.o:spidx.c:(.text+0x351): first defined here
pwm.o: In function `write_nb_reg':
pwm.c:(.text+0x3d1): multiple definition of `write_nb_reg'
spidx.o:spidx.c:(.text+0x3d1): first defined here
io.o: In function `read_sb_regb':
io.c:(.text+0x0): multiple definition of `read_sb_regb'
spidx.o:spidx.c:(.text+0x0): first defined here
io.o: In function `read_sb_regw':
io.c:(.text+0x44): multiple definition of `read_sb_regw'
spidx.o:spidx.c:(.text+0x44): first defined here
io.o: In function `read_sb_reg':
io.c:(.text+0x8d): multiple definition of `read_sb_reg'
spidx.o:spidx.c:(.text+0x8d): first defined here
io.o: In function `write_sb_regb':
io.c:(.text+0xc3): multiple definition of `write_sb_regb'
spidx.o:spidx.c:(.text+0xc3): first defined here
io.o: In function `write_sb_regw':
io.c:(.text+0x14a): multiple definition of `write_sb_regw'
spidx.o:spidx.c:(.text+0x14a): first defined here
io.o: In function `write_sb_reg':
io.c:(.text+0x1ca): multiple definition of `write_sb_reg'
spidx.o:spidx.c:(.text+0x1ca): first defined here
io.o: In function `read_nb_regb':
io.c:(.text+0x207): multiple definition of `read_nb_regb'
spidx.o:spidx.c:(.text+0x207): first defined here
io.o: In function `read_nb_regw':
io.c:(.text+0x24b): multiple definition of `read_nb_regw'
spidx.o:spidx.c:(.text+0x24b): first defined here
io.o: In function `read_nb_reg':
io.c:(.text+0x294): multiple definition of `read_nb_reg'
spidx.o:spidx.c:(.text+0x294): first defined here
io.o: In function `write_nb_regb':
io.c:(.text+0x2ca): multiple definition of `write_nb_regb'
spidx.o:spidx.c:(.text+0x2ca): first defined here
io.o: In function `write_nb_regw':
io.c:(.text+0x351): multiple definition of `write_nb_regw'
spidx.o:spidx.c:(.text+0x351): first defined here
io.o: In function `write_nb_reg':
io.c:(.text+0x3d1): multiple definition of `write_nb_reg'
spidx.o:spidx.c:(.text+0x3d1): first defined here
i2cdx.o: In function `read_sb_regb':
i2cdx.c:(.text+0x0): multiple definition of `read_sb_regb'
spidx.o:spidx.c:(.text+0x0): first defined here
i2cdx.o: In function `read_sb_regw':
i2cdx.c:(.text+0x44): multiple definition of `read_sb_regw'
spidx.o:spidx.c:(.text+0x44): first defined here
i2cdx.o: In function `read_sb_reg':
i2cdx.c:(.text+0x8d): multiple definition of `read_sb_reg'
spidx.o:spidx.c:(.text+0x8d): first defined here
i2cdx.o: In function `write_sb_regb':
i2cdx.c:(.text+0xc3): multiple definition of `write_sb_regb'
spidx.o:spidx.c:(.text+0xc3): first defined here
i2cdx.o: In function `write_sb_regw':
i2cdx.c:(.text+0x14a): multiple definition of `write_sb_regw'
spidx.o:spidx.c:(.text+0x14a): first defined here
i2cdx.o: In function `write_sb_reg':
i2cdx.c:(.text+0x1ca): multiple definition of `write_sb_reg'
spidx.o:spidx.c:(.text+0x1ca): first defined here
i2cdx.o: In function `read_nb_regb':
i2cdx.c:(.text+0x207): multiple definition of `read_nb_regb'
spidx.o:spidx.c:(.text+0x207): first defined here
i2cdx.o: In function `read_nb_regw':
i2cdx.c:(.text+0x24b): multiple definition of `read_nb_regw'
spidx.o:spidx.c:(.text+0x24b): first defined here
i2cdx.o: In function `read_nb_reg':
i2cdx.c:(.text+0x294): multiple definition of `read_nb_reg'
spidx.o:spidx.c:(.text+0x294): first defined here
i2cdx.o: In function `write_nb_regb':
i2cdx.c:(.text+0x2ca): multiple definition of `write_nb_regb'
spidx.o:spidx.c:(.text+0x2ca): first defined here
i2cdx.o: In function `write_nb_regw':
i2cdx.c:(.text+0x351): multiple definition of `write_nb_regw'
spidx.o:spidx.c:(.text+0x351): first defined here
i2cdx.o: In function `write_nb_reg':
i2cdx.c:(.text+0x3d1): multiple definition of `write_nb_reg'
spidx.o:spidx.c:(.text+0x3d1): first defined here
i2c.o: In function `read_sb_regb':
i2c.c:(.text+0x0): multiple definition of `read_sb_regb'
spidx.o:spidx.c:(.text+0x0): first defined here
i2c.o: In function `read_sb_regw':
i2c.c:(.text+0x44): multiple definition of `read_sb_regw'
spidx.o:spidx.c:(.text+0x44): first defined here
i2c.o: In function `read_sb_reg':
i2c.c:(.text+0x8d): multiple definition of `read_sb_reg'
spidx.o:spidx.c:(.text+0x8d): first defined here
i2c.o: In function `write_sb_regb':
i2c.c:(.text+0xc3): multiple definition of `write_sb_regb'
spidx.o:spidx.c:(.text+0xc3): first defined here
i2c.o: In function `write_sb_regw':
i2c.c:(.text+0x14a): multiple definition of `write_sb_regw'
spidx.o:spidx.c:(.text+0x14a): first defined here
i2c.o: In function `write_sb_reg':
i2c.c:(.text+0x1ca): multiple definition of `write_sb_reg'
spidx.o:spidx.c:(.text+0x1ca): first defined here
i2c.o: In function `read_nb_regb':
i2c.c:(.text+0x207): multiple definition of `read_nb_regb'
spidx.o:spidx.c:(.text+0x207): first defined here
i2c.o: In function `read_nb_regw':
i2c.c:(.text+0x24b): multiple definition of `read_nb_regw'
spidx.o:spidx.c:(.text+0x24b): first defined here
i2c.o: In function `read_nb_reg':
i2c.c:(.text+0x294): multiple definition of `read_nb_reg'
spidx.o:spidx.c:(.text+0x294): first defined here
i2c.o: In function `write_nb_regb':
i2c.c:(.text+0x2ca): multiple definition of `write_nb_regb'
spidx.o:spidx.c:(.text+0x2ca): first defined here
i2c.o: In function `write_nb_regw':
i2c.c:(.text+0x351): multiple definition of `write_nb_regw'
spidx.o:spidx.c:(.text+0x351): first defined here
i2c.o: In function `write_nb_reg':
i2c.c:(.text+0x3d1): multiple definition of `write_nb_reg'
spidx.o:spidx.c:(.text+0x3d1): first defined here
i2c.o: In function `i2c0_Reset':
i2c.c:(.text+0x40e): multiple definition of `i2c0_Reset'
i2cdx.o:i2cdx.c:(.text+0x40e): first defined here
i2c.o: In function `i2c1_Reset':
i2c.c:(.text+0x422): multiple definition of `i2c1_Reset'
i2cdx.o:i2cdx.c:(.text+0x422): first defined here
i2c.o: In function `i2c0_EnableNoiseFilter':
i2c.c:(.text+0x436): multiple definition of `i2c0_EnableNoiseFilter'
i2cdx.o:i2cdx.c:(.text+0x436): first defined here
i2c.o: In function `i2c1_EnableNoiseFilter':
i2c.c:(.text+0x44a): multiple definition of `i2c1_EnableNoiseFilter'
i2cdx.o:i2cdx.c:(.text+0x44a): first defined here
i2c.o: In function `i2c0_DisableNoiseFilter':
i2c.c:(.text+0x45e): multiple definition of `i2c0_DisableNoiseFilter'
i2cdx.o:i2cdx.c:(.text+0x45e): first defined here
i2c.o: In function `i2c1_DisableNoiseFilter':
i2c.c:(.text+0x472): multiple definition of `i2c1_DisableNoiseFilter'
i2cdx.o:i2cdx.c:(.text+0x472): first defined here
i2c.o: In function `i2c0_EnableStandardHSM':
i2c.c:(.text+0x486): multiple definition of `i2c0_EnableStandardHSM'
i2cdx.o:i2cdx.c:(.text+0x486): first defined here
i2c.o: In function `i2c1_EnableStandardHSM':
i2c.c:(.text+0x49a): multiple definition of `i2c1_EnableStandardHSM'
i2cdx.o:i2cdx.c:(.text+0x49a): first defined here
i2c.o: In function `i2c0_DisableStandardHSM':
i2c.c:(.text+0x4ae): multiple definition of `i2c0_DisableStandardHSM'
i2cdx.o:i2cdx.c:(.text+0x4ae): first defined here
i2c.o: In function `i2c1_DisableStandardHSM':
i2c.c:(.text+0x4c2): multiple definition of `i2c1_DisableStandardHSM'
i2cdx.o:i2cdx.c:(.text+0x4c2): first defined here
i2c.o: In function `i2c0_EnableINT':
i2c.c:(.text+0x4d6): multiple definition of `i2c0_EnableINT'
i2cdx.o:i2cdx.c:(.text+0x4d6): first defined here
i2c.o: In function `i2c1_EnableINT':
i2c.c:(.text+0x4f8): multiple definition of `i2c1_EnableINT'
i2cdx.o:i2cdx.c:(.text+0x4f8): first defined here
i2c.o: In function `i2c0_DisableINT':
i2c.c:(.text+0x51a): multiple definition of `i2c0_DisableINT'
i2cdx.o:i2cdx.c:(.text+0x51a): first defined here
i2c.o: In function `i2c1_DisableINT':
i2c.c:(.text+0x53c): multiple definition of `i2c1_DisableINT'
i2cdx.o:i2cdx.c:(.text+0x53c): first defined here
i2c.o: In function `i2c0_SetCLKREG':
i2c.c:(.text+0x55e): multiple definition of `i2c0_SetCLKREG'
i2cdx.o:i2cdx.c:(.text+0x55e): first defined here
i2c.o: In function `i2c1_SetCLKREG':
i2c.c:(.text+0x595): multiple definition of `i2c1_SetCLKREG'
i2cdx.o:i2cdx.c:(.text+0x595): first defined here
i2c.o: In function `i2c0_ClearSTAT':
i2c.c:(.text+0x5cc): multiple definition of `i2c0_ClearSTAT'
i2cdx.o:i2cdx.c:(.text+0x5cc): first defined here
i2c.o: In function `i2c1_ClearSTAT':
i2c.c:(.text+0x5ee): multiple definition of `i2c1_ClearSTAT'
i2cdx.o:i2cdx.c:(.text+0x5ee): first defined here
i2c.o: In function `i2c0_ReadStatREG':
i2c.c:(.text+0x610): multiple definition of `i2c0_ReadStatREG'
i2cdx.o:i2cdx.c:(.text+0x610): first defined here
i2c.o: In function `i2c1_ReadStatREG':
i2c.c:(.text+0x624): multiple definition of `i2c1_ReadStatREG'
i2cdx.o:i2cdx.c:(.text+0x624): first defined here
i2c.o: In function `i2c0_IsMaster':
i2c.c:(.text+0x638): multiple definition of `i2c0_IsMaster'
i2cdx.o:i2cdx.c:(.text+0x638): first defined here
i2c.o: In function `i2c1_IsMaster':
i2c.c:(.text+0x64c): multiple definition of `i2c1_IsMaster'
i2cdx.o:i2cdx.c:(.text+0x64c): first defined here
i2c.o: In function `i2c0_CheckBusBusy':
i2c.c:(.text+0x660): multiple definition of `i2c0_CheckBusBusy'
i2cdx.o:i2cdx.c:(.text+0x660): first defined here
i2c.o: In function `i2c1_CheckBusBusy':
i2c.c:(.text+0x674): multiple definition of `i2c1_CheckBusBusy'
i2cdx.o:i2cdx.c:(.text+0x674): first defined here
i2c.o: In function `i2c0_CheckTXDone':
i2c.c:(.text+0x688): multiple definition of `i2c0_CheckTXDone'
i2cdx.o:i2cdx.c:(.text+0x688): first defined here
i2c.o: In function `i2c1_CheckTXDone':
i2c.c:(.text+0x69c): multiple definition of `i2c1_CheckTXDone'
i2cdx.o:i2cdx.c:(.text+0x69c): first defined here
i2c.o: In function `i2c0_ClearTXDone':
i2c.c:(.text+0x6b0): multiple definition of `i2c0_ClearTXDone'
i2cdx.o:i2cdx.c:(.text+0x6b0): first defined here
i2c.o: In function `i2c1_ClearTXDone':
i2c.c:(.text+0x6c4): multiple definition of `i2c1_ClearTXDone'
i2cdx.o:i2cdx.c:(.text+0x6c4): first defined here
i2c.o: In function `i2c0_CheckRXRdy':
i2c.c:(.text+0x6d8): multiple definition of `i2c0_CheckRXRdy'
i2cdx.o:i2cdx.c:(.text+0x6d8): first defined here
i2c.o: In function `i2c1_CheckRXRdy':
i2c.c:(.text+0x6ec): multiple definition of `i2c1_CheckRXRdy'
i2cdx.o:i2cdx.c:(.text+0x6ec): first defined here
i2c.o: In function `i2c0_ClearRXRdy':
i2c.c:(.text+0x700): multiple definition of `i2c0_ClearRXRdy'
i2cdx.o:i2cdx.c:(.text+0x700): first defined here
i2c.o: In function `i2c1_ClearRXRdy':
i2c.c:(.text+0x714): multiple definition of `i2c1_ClearRXRdy'
i2cdx.o:i2cdx.c:(.text+0x714): first defined here
i2c.o: In function `i2c0_WriteDataREG':
i2c.c:(.text+0x728): multiple definition of `i2c0_WriteDataREG'
i2cdx.o:i2cdx.c:(.text+0x728): first defined here
i2c.o: In function `i2c1_WriteDataREG':
i2c.c:(.text+0x74a): multiple definition of `i2c1_WriteDataREG'
i2cdx.o:i2cdx.c:(.text+0x74a): first defined here
i2c.o: In function `i2c0_ReadDataREG':
i2c.c:(.text+0x76c): multiple definition of `i2c0_ReadDataREG'
i2cdx.o:i2cdx.c:(.text+0x76c): first defined here
i2c.o: In function `i2c1_ReadDataREG':
i2c.c:(.text+0x780): multiple definition of `i2c1_ReadDataREG'
i2cdx.o:i2cdx.c:(.text+0x780): first defined here
i2c.o: In function `i2c0master_SetStopBit':
i2c.c:(.text+0x794): multiple definition of `i2c0master_SetStopBit'
i2cdx.o:i2cdx.c:(.text+0x794): first defined here
i2c.o: In function `i2c1master_SetStopBit':
i2c.c:(.text+0x7a8): multiple definition of `i2c1master_SetStopBit'
i2cdx.o:i2cdx.c:(.text+0x7a8): first defined here
i2c.o: In function `i2c0master_CheckStopBit':
i2c.c:(.text+0x7bc): multiple definition of `i2c0master_CheckStopBit'
i2cdx.o:i2cdx.c:(.text+0x7bc): first defined here
i2c.o: In function `i2c1master_CheckStopBit':
i2c.c:(.text+0x7d0): multiple definition of `i2c1master_CheckStopBit'
i2cdx.o:i2cdx.c:(.text+0x7d0): first defined here
i2c.o: In function `i2c0master_CheckARLoss':
i2c.c:(.text+0x7e4): multiple definition of `i2c0master_CheckARLoss'
i2cdx.o:i2cdx.c:(.text+0x7e4): first defined here
i2c.o: In function `i2c1master_CheckARLoss':
i2c.c:(.text+0x7f8): multiple definition of `i2c1master_CheckARLoss'
i2cdx.o:i2cdx.c:(.text+0x7f8): first defined here
i2c.o: In function `i2c0master_ClearARLoss':
i2c.c:(.text+0x80c): multiple definition of `i2c0master_ClearARLoss'
i2cdx.o:i2cdx.c:(.text+0x80c): first defined here
i2c.o: In function `i2c1master_ClearARLoss':
i2c.c:(.text+0x820): multiple definition of `i2c1master_ClearARLoss'
i2cdx.o:i2cdx.c:(.text+0x820): first defined here
i2c.o: In function `i2c0master_CheckAckErr':
i2c.c:(.text+0x834): multiple definition of `i2c0master_CheckAckErr'
i2cdx.o:i2cdx.c:(.text+0x834): first defined here
i2c.o: In function `i2c1master_CheckAckErr':
i2c.c:(.text+0x848): multiple definition of `i2c1master_CheckAckErr'
i2cdx.o:i2cdx.c:(.text+0x848): first defined here
i2c.o: In function `i2c0master_ClearAckErr':
i2c.c:(.text+0x85c): multiple definition of `i2c0master_ClearAckErr'
i2cdx.o:i2cdx.c:(.text+0x85c): first defined here
i2c.o: In function `i2c1master_ClearAckErr':
i2c.c:(.text+0x870): multiple definition of `i2c1master_ClearAckErr'
i2cdx.o:i2cdx.c:(.text+0x870): first defined here
i2c.o: In function `i2c0master_WriteAddrREG':
i2c.c:(.text+0x884): multiple definition of `i2c0master_WriteAddrREG'
i2cdx.o:i2cdx.c:(.text+0x884): first defined here
i2c.o: In function `i2c1master_WriteAddrREG':
i2c.c:(.text+0x8b4): multiple definition of `i2c1master_WriteAddrREG'
i2cdx.o:i2cdx.c:(.text+0x8b4): first defined here
i2c.o: In function `i2c0slave_EnableACK':
i2c.c:(.text+0x8e4): multiple definition of `i2c0slave_EnableACK'
i2cdx.o:i2cdx.c:(.text+0x8e4): first defined here
i2c.o: In function `i2c1slave_EnableACK':
i2c.c:(.text+0x8f8): multiple definition of `i2c1slave_EnableACK'
i2cdx.o:i2cdx.c:(.text+0x8f8): first defined here
i2c.o: In function `i2c0slave_EnableNAK':
i2c.c:(.text+0x90c): multiple definition of `i2c0slave_EnableNAK'
i2cdx.o:i2cdx.c:(.text+0x90c): first defined here
i2c.o: In function `i2c1slave_EnableNAK':
i2c.c:(.text+0x920): multiple definition of `i2c1slave_EnableNAK'
i2cdx.o:i2cdx.c:(.text+0x920): first defined here
i2c.o: In function `i2c0slave_SetAddr':
i2c.c:(.text+0x934): multiple definition of `i2c0slave_SetAddr'
i2cdx.o:i2cdx.c:(.text+0x934): first defined here
i2c.o: In function `i2c1slave_SetAddr':
i2c.c:(.text+0x956): multiple definition of `i2c1slave_SetAddr'
i2cdx.o:i2cdx.c:(.text+0x956): first defined here
i2c.o: In function `i2c0slave_CheckSlaveWREQ':
i2c.c:(.text+0x978): multiple definition of `i2c0slave_CheckSlaveWREQ'
i2cdx.o:i2cdx.c:(.text+0x978): first defined here
i2c.o: In function `i2c1slave_CheckSlaveWREQ':
i2c.c:(.text+0x98c): multiple definition of `i2c1slave_CheckSlaveWREQ'
i2cdx.o:i2cdx.c:(.text+0x98c): first defined here
i2c.o: In function `i2c0slave_ClearSlaveWREQ':
i2c.c:(.text+0x9a0): multiple definition of `i2c0slave_ClearSlaveWREQ'
i2cdx.o:i2cdx.c:(.text+0x9a0): first defined here
i2c.o: In function `i2c1slave_ClearSlaveWREQ':
i2c.c:(.text+0x9b4): multiple definition of `i2c1slave_ClearSlaveWREQ'
i2cdx.o:i2cdx.c:(.text+0x9b4): first defined here
ad79x8.o: In function `read_sb_regb':
ad79x8.c:(.text+0x0): multiple definition of `read_sb_regb'
spidx.o:spidx.c:(.text+0x0): first defined here
ad79x8.o: In function `read_sb_regw':
ad79x8.c:(.text+0x44): multiple definition of `read_sb_regw'
spidx.o:spidx.c:(.text+0x44): first defined here
ad79x8.o: In function `read_sb_reg':
ad79x8.c:(.text+0x8d): multiple definition of `read_sb_reg'
spidx.o:spidx.c:(.text+0x8d): first defined here
ad79x8.o: In function `write_sb_regb':
ad79x8.c:(.text+0xc3): multiple definition of `write_sb_regb'
spidx.o:spidx.c:(.text+0xc3): first defined here
ad79x8.o: In function `write_sb_regw':
ad79x8.c:(.text+0x14a): multiple definition of `write_sb_regw'
spidx.o:spidx.c:(.text+0x14a): first defined here
ad79x8.o: In function `write_sb_reg':
ad79x8.c:(.text+0x1ca): multiple definition of `write_sb_reg'
spidx.o:spidx.c:(.text+0x1ca): first defined here
ad79x8.o: In function `read_nb_regb':
ad79x8.c:(.text+0x207): multiple definition of `read_nb_regb'
spidx.o:spidx.c:(.text+0x207): first defined here
ad79x8.o: In function `read_nb_regw':
ad79x8.c:(.text+0x24b): multiple definition of `read_nb_regw'
spidx.o:spidx.c:(.text+0x24b): first defined here
ad79x8.o: In function `read_nb_reg':
ad79x8.c:(.text+0x294): multiple definition of `read_nb_reg'
spidx.o:spidx.c:(.text+0x294): first defined here
ad79x8.o: In function `write_nb_regb':
ad79x8.c:(.text+0x2ca): multiple definition of `write_nb_regb'
spidx.o:spidx.c:(.text+0x2ca): first defined here
ad79x8.o: In function `write_nb_regw':
ad79x8.c:(.text+0x351): multiple definition of `write_nb_regw'
spidx.o:spidx.c:(.text+0x351): first defined here
ad79x8.o: In function `write_nb_reg':
ad79x8.c:(.text+0x3d1): multiple definition of `write_nb_reg'
spidx.o:spidx.c:(.text+0x3d1): first defined here
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/crt1.o: In function `_start':
/build/buildd/eglibc-2.10.1/csu/../sysdeps/i386/elf/start.S:115: undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [testingxenomai] Error 1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai-help] Compiling Library files over Xenomai
  2011-07-12  8:04   ` Ashish Budhiraja
@ 2011-07-12  8:23     ` Gilles Chanteperdrix
  2011-07-12 11:10     ` Ashish Budhiraja
  1 sibling, 0 replies; 7+ messages in thread
From: Gilles Chanteperdrix @ 2011-07-12  8:23 UTC (permalink / raw)
  To: Ashish Budhiraja; +Cc: xenomai

On 07/12/2011 10:04 AM, Ashish Budhiraja wrote:
> spi.o: In function `read_sb_regb':
> spi.c:(.text+0x0): multiple definition of `read_sb_regb'

See C language FAQ 1.7:
http://www.faqs.org/faqs/C-faq/faq/

-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai-help] Compiling Library files over Xenomai
  2011-07-12  8:04   ` Ashish Budhiraja
  2011-07-12  8:23     ` Gilles Chanteperdrix
@ 2011-07-12 11:10     ` Ashish Budhiraja
  2011-07-12 11:27       ` Gilles Chanteperdrix
  1 sibling, 1 reply; 7+ messages in thread
From: Ashish Budhiraja @ 2011-07-12 11:10 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 393 bytes --]

Hello Again,

Thanks a lot. I figured out, actually somehow "inline" declaration were not
allowed and the library is really complex,
so I couldn't change it. The solution was to change it to static.

There is a new problem I think that is more related to Xenomai rather then
my earlier one.....If I am not able to figure it out
I will come to you.

Thanks People and especially gilles

Ashish

[-- Attachment #2: Type: text/html, Size: 445 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai-help] Compiling Library files over Xenomai
  2011-07-12 11:10     ` Ashish Budhiraja
@ 2011-07-12 11:27       ` Gilles Chanteperdrix
  2011-07-12 14:19         ` Ashish Budhiraja
  0 siblings, 1 reply; 7+ messages in thread
From: Gilles Chanteperdrix @ 2011-07-12 11:27 UTC (permalink / raw)
  To: Ashish Budhiraja; +Cc: xenomai

On 07/12/2011 01:10 PM, Ashish Budhiraja wrote:
> Hello Again,
> 
> Thanks a lot. I figured out, actually somehow "inline" declaration were not
> allowed and the library is really complex,
> so I couldn't change it. The solution was to change it to static.

inline declarations are allowed in C, simply, the inline functions must
be static as well.


-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Xenomai-help] Compiling Library files over Xenomai
  2011-07-12 11:27       ` Gilles Chanteperdrix
@ 2011-07-12 14:19         ` Ashish Budhiraja
  0 siblings, 0 replies; 7+ messages in thread
From: Ashish Budhiraja @ 2011-07-12 14:19 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 277 bytes --]

Hello.


Oh thanks a lot for that,,,I would like to tell you that with a lot of
playing I am now able to control
IO and surprisingly I could only reach maximum of 250 hz earlier but now I
am able to reach 100Khz,,,
was not able to ctrl+C after that .....

Thanks ....


Ashish

[-- Attachment #2: Type: text/html, Size: 403 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-07-12 14:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-08 12:10 [Xenomai-help] Compiling Library files over Xenomai Ashish Budhiraja
2011-07-11 11:29 ` Gilles Chanteperdrix
2011-07-12  8:04   ` Ashish Budhiraja
2011-07-12  8:23     ` Gilles Chanteperdrix
2011-07-12 11:10     ` Ashish Budhiraja
2011-07-12 11:27       ` Gilles Chanteperdrix
2011-07-12 14:19         ` Ashish Budhiraja

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.