at91_enthus wrote:
>>> Oh. I assumed without mlockall (it wasn't part of my original code).
>>> Now, I placed mlockall in my original code (right before
>> open_controller())
>>> and the pin gets toggled according to my scope.
>> Ok. Show me the Makefile then.
> 
> And the code which works.
> 
> 
>  see attachment
> 
> 
>> Including the
>> value of the defines please (not all of them, only those the program
>> uses for open_controller).
>>
>>
>>
> #define AT91C_BASE_AIC          0xFFFFF000 // (AIC) Base Address
> #define AT91C_BASE_PIOB        0xFFFFF600 // (PIOB) Base Address
> #define PIO_PER             0x00000000 // (PIO_PER) PIO Enable Register
> #define PIO_PDR             0x00000004 // (PIO_PDR) PIO Disable Register
> #define PIO_PSR             0x00000008 // (PIO_PSR) PIO Status Register
> #define PIO_OER             0x00000010 // (PIO_OER) Output Enable Register
> #define PIO_SODR           0x00000030 // (PIO_SODR) Set Output Data Register
> #define PIO_CODR           0x00000034 // (PIO_CODR) Clear Output Data
> Register
> #define PIO_PPUDR         0x00000060 // (PIO_PPUDR) Pull-up Disable Register
> #define PIO_MDDR           0x00000054 // (PIO_MDDR) Multi-driver Disable
> Register
> 
> 

I am unable to reproduce your issue. That said, I am using standard
Makefiles, that is:

XENO_CONFIG = DESTDIR="$(staging)" $(staging)/bin/xeno-config

XENO_NATIVE_CPPFLAGS = $(shell $(XENO_CONFIG) --skin=native --cflags)
XENO_NATIVE_LIBS = $(shell $(XENO_CONFIG) --skin=native --ldflags)

Where staging would be "/" in your case.

If I want static libraries, I prepend -static to XENO_NATIVE_LIBS, I do
not try to link both with static and dynamic libraries. I suspect this
is the cause of your problem, either that or the fact that you have some
ulimit.

Note that my toolchain does not even allow mixing static and dynamic
libraries. I get this warning when linking:
/usr/local/arm-2010q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/bin/ld:
/usr/local/arm-2010q1/bin/../arm-none-linux-gnueabi/libc/armv4t/usr/lib/libc.a(dl-tsd.o)(.text+0x18):
R_ARM_TLS_LE32 relocation not permitted in shared object

And a segmentation fault when running (though I do not even access the
mmapped area).

-- 
                                                                Gilles.

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to