OpenCores

rtems spwltest

Back to bugtracker overview.

Information:
Type :: REQUEST
Status :: CLOSED
Assigned to :: nobody

Description:
Dear Joris,

I'm having some problems to compile your spwltest.c software. The problem is that the compile does not find some structures/functions that you use on your code:

Compile Error:
------
nsee@nsee-1:~/NSEE/SpW/spacewire_light/trunk/sw/rtems_driver$ make
sparc-rtems-gcc -B/opt/rtems-4.10/sparc-rtems/leon3/lib/ -specs bsp_specs -qrtems -msoft-float -Wall -Os -c spwltest.c
spwltest.c:216: error: 'amba_apb_device' undeclared (first use in this function)
spwltest.c:216: error: (Each undeclared identifier is reported only once
spwltest.c:216: error: for each function it appears in.)
spwltest.c:216: error: expected ';' before 'apbdev'
spwltest.c:225: warning: implicit declaration of function 'amba_find_next_apbslv'
spwltest.c:225: error: 'amba_conf' undeclared (first use in this function)
spwltest.c:225: error: 'apbdev' undeclared (first use in this function)

I've tried to find it on the rtems includes but they do not exist:
-----
nsee@nsee-1:/opt/rtems-4.10$ find . -type f -exec grep -i "amba_confamba_conf" {} \; -print
nsee@nsee-1:

Compile version
---
nsee@nsee-1:~/NSEE/SpW/spacewire_light/trunk/sw/rtems_driver$ sparc-rtems-gcc --version
sparc-rtems-gcc (GCC) 4.4.6


Thanks in advance,
Rafael C



Comments:

van Rantwijk, Joris Oct 2, 2013
In that case I will ask you the exact same question:
Are you using RTEMS from rtems.org or are you using Gaisler's modified version of RTEMS?

The spacewire driver only works with real RTEMS, not with Gaisler-RTEMS.

Can you point me to the place in the documentation where the AMBA changes are mentioned?
siby, oscar Oct 2, 2013
Hi joris,
Im having the exact same compilation error as the guy who made this post:
sparc-rtems4.10-gcc -B/opt/rtems-4.10/sparc-rtems4.10/leon3/lib/ -specs bsp_specs -qrtems -msoft-float -Wall -Os -c spwltest.c
spwltest.c: In function ‘do_init_driver’:
spwltest.c:216: error: ‘amba_apb_device’ undeclared (first use in this function)
spwltest.c:216: error: (Each undeclared identifier is reported only once
spwltest.c:216: error: for each function it appears in.)
spwltest.c:216: error: expected ‘;’ before ‘apbdev’
spwltest.c:225: warning: implicit declaration of function ‘amba_find_next_apbslv’
spwltest.c:225: error: ‘amba_conf’ undeclared (first use in this function)
spwltest.c:225: error: ‘apbdev’ undeclared (first use in this function)
make: *** [spwltest.o] Error 1
this is with a 4.10.2 version install, with a 4.10.0 install i have no errors. If i rummage through the amba files in both versions the above functions are missing in the 4.10.2 version and the documents for both says they have changed how ampa is implemented.
//oscar
van Rantwijk, Joris Oct 1, 2013
Hi Oscar,

The driver does not depend on RTEMS 4.10.0. The test program compiles just fine under RTEMS 4.10.2 here.

If you still have problems, please create a new bug ticket and include the error messages in your bug report.

Joris.
siby, oscar Oct 1, 2013
It should be noted that the driver is made explicitly for rtems 4.10.0 since there is a version 4.10.1 and version 4.10.2, which changes how rtems handles leon amba among other things and makes the included test program and probably the driver uncompileable.
Would you kindly write this into the manual ? by writing that it works for 4.10 i assumed it worked with all versions.
, Mar 18, 2013
van Rantwijk, Joris Mar 15, 2013
Hi Vakkas,

You can use any memory allocation function, as long as you make sure that the memory is properly aligned. TX/RX buffers must be aligned to 4 bytes, and descriptor tables must be aligned to the size of the table.

Joris.
, Mar 15, 2013
, Mar 15, 2013
Hi Joris,

Thank you very much for your response.
Actually I want to include spwlight codes to my project rtems4.8 and it only says:

spacewirelight.c:(.text+0x2f4): undefined reference to `rtems_memalign'

When I comment out them, the project is seccessfully compiled. May I use another function for memory allocation instead of `rtems_memalign'. I dont know whether `rtems_memalign' does something special. May I use 'rtems_region_create2 for example.

Thanks,

Vakkas
van Rantwijk, Joris Mar 14, 2013
Hi Vakkas,

The "real" RTEMS is from rtems.org. It works on LEON3 and also on many other systems.

Gaisler copied RTEMS and added special device drivers for LEON3. I don't know exactly what they changed.

Joris.
, Mar 14, 2013
Hello,

I have faced with the same problem.

So, will using RTEMS from rtems.org make work my previous project which is working on RTEMS from gaisler.com before including spacewirelight?

Does RTEMS from rtems.org include RTEMS from gaisler.com? Does a project working on RTEMS from gaisler.com also work on RTEMS from gaisler.com.

Thank you very much

Vakkas
, Mar 14, 2013
Hello,

I have faced with the same problem.

So, will using RTEMS from rtems.org make work my previous project which is working on RTEMS from gaisler.com before including spacewirelight?

Does RTEMS from rtems.org include RTEMS from gaisler.com? Does a project working on RTEMS from gaisler.com also work on RTEMS from gaisler.com.

Thank you very much

Vakkas
ferra, rafa Jan 17, 2013
Hi Joris,

So this is the problem, I'm using the Gaisler RTEMS.

thanks,

Rafael
van Rantwijk, Joris Jan 16, 2013
Hi Rafael,

I can build the driver for RTEMS 4.10 without any warnings or errors.

Where did you get your version of RTEMS?
Is it from rtems.org or from gaisler.com?

Gaisler developed their own version of RTEMS which has an incompatible device driver interface. The Spacewire driver currently only works with rtems.org.

Joris.

Post a comment:
Login to post comments!

Back to bugtracker overview.

© copyright 1999-2019 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.