Greth Driver Implementation

Ángel González angel.gonzalez at orbital-aerospace.com
Tue May 27 12:52:43 UTC 2014


Hello,

I think I have solved the problem, I solved it removin the <stdlib.h> 
include in the driver files. However now the program throws a 0x07 trap 
( Mem address not aligned). It throws it randomly. The same binary 
sometimes throws it some time it does not. Do you know how can I solve it?

Thank you,
Angel


El 26/05/14 18:18, Daniel Hellstrom escribió:
> Hello,
>
> I'm not sure what the problem is, however I remember that the GRETH 
> driver PHY initialization was updated quite recently in a RCC release 
> based on RTEMS-4.10.2.
>
> Best Regards,
>
> Daniel Hellstrom
> Software Section Head
> Aeroflex Gaisler AB
> Aeroflex Microelectronic Solutions – HiRel
> Kungsgatan 12
> SE-411 19 Gothenburg, Sweden
> Phone: +46 31 7758657
> daniel at gaisler.com
> www.Aeroflex.com/Gaisler
>
> On 05/26/2014 12:10 PM, Ángel González wrote:
>> 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
>>
>>
>> _______________________________________________
>> rtems-users mailing list
>> rtems-users at rtems.org
>> http://www.rtems.org/mailman/listinfo/rtems-users
>




More information about the users mailing list