Greth Driver Implementation

Ángel González angel.gonzalez at orbital-aerospace.com
Mon May 26 10:10:16 UTC 2014


Hello,

I am doing a program that runs RTEMS 4.8.0 (due to proyect restrictions 
I can't change to a newer version) on a LEON3 (sparc arch). It uses the 
Greth driver. The problem I had is that when I try to run the software 
in a HW with a 88E1111 PHY chip I have no problem, however when I try to 
run on a HW with a LAN83C185 PHY chip I get a "greth: cannot read mii".

So I tried the greth driver example from the grlib source, which works. 
Then I try to adapt the RTEMS' driver to the GRLIB driver I got it 
working in a pretty simple RTEMS program. However when I put it on a 
more complex one, the program get stuck in the interrupt handler (which 
I did not modified). The function call trace is:

        %pc          %sp
   #0   0x40025dc4   0x43f83f80 <_Internal_error_Occurred+0x3c>
   #1   0x40023ea8   0x43f83fe8 <rtems_semaphore_obtain+0xd4>
   #2   0x40042d1c   0x43f84058 <rtems_termios_write+0x18>
   #3   0x4003a498   0x43f840c0 <rtems_io_write+0x48>
   #4   0x400390b0   0x43f84128   <device_write+0x30>
   #5   0x4004d2e8   0x43f841a8   <write+0x7c>
   #6   0x4004443c   0x43f84210   <fflush+0x98>
   #7   0x4004ae38   0x43f84278   <__sfvwrite_r+0x3c0>
   #8   0x40045654   0x43f842e0   <_puts_r+0x4c>
   #9   0x4000aba4   0x43f84368 <greth_interrupt_handler+0x10>

Since it can be an issue due to my modifications I tried to compile the 
original greth driver and attach it to my software, but it still fail 
(In the same function). I don't know what is wrong since I am using the 
same code the RTEMS used. The compile options for the driver are:

-D__INSIDE_RTEMS_BSD_TCPIP_STACK__ -O0 -g -pedantic -Wall -msoft-float 
-c -fmessage-length=0 -B/.../sparc-rtems4.8/leon3/lib -specs bsp_specs 
-qrtems -v

And then I link my main program with the .o files and change the driver 
attach function for my driver's attach function's name.

Does anyone have any clue about what is going on?

Thank you in advance,
Angel





More information about the users mailing list