OpenCores
Issue List
rtems spwltest #5
Closed corsiferrao opened this issue over 11 years ago
corsiferrao commented over 11 years ago

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

jorisvr commented over 11 years ago

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.

corsiferrao commented over 11 years ago

Hi Joris,

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

thanks,

Rafael

vakkascelik commented about 11 years ago

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

vakkascelik commented about 11 years ago

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

jorisvr commented about 11 years ago

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.

vakkascelik commented about 11 years ago

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 whetherrtems_memalign' does something special. May I use 'rtems_region_create2 for example.

Thanks,

Vakkas

jorisvr commented about 11 years ago

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.

jorisvr closed this about 11 years ago
altur commented over 10 years ago

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.

jorisvr commented over 10 years ago

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.

altur commented over 10 years ago

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

jorisvr commented over 10 years ago

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?


Assignee
No one
Labels
Request