[U-Boot] USB not working with 4.3.2 gcc compiler in u-boot 1.1.5

Hi
I am using arm-unknown-linux-gnueabi-gcc 4.3.2 compiler to compile the u-boot 1.1.5 for the at91sam9260 board. When i use this u-boot image usb start command is not detecting the connected usb stick. Request Sense returned 00 00 00 Device NOT ready Request Sense returned 00 00 00
If use some other old compiler to compile this u-boot, usb works fine in that image.
Some pls guide me what may be the difference.

virupax wrote:
Hi
I am using arm-unknown-linux-gnueabi-gcc 4.3.2 compiler to compile the u-boot 1.1.5 for the at91sam9260 board. When i use this u-boot image usb start command is not detecting the connected usb stick. Request Sense returned 00 00 00 Device NOT ready Request Sense returned 00 00 00
If use some other old compiler to compile this u-boot, usb works fine in that image.
Some pls guide me what may be the difference.
Your version of U-boot is about 3 years old. Nobody will be interested in debugging it. Please update to the latest and see if the problem exists.
regards, Ben

Hello,
2009/7/17 Ben Warren biggerbadderben@gmail.com:
virupax wrote:
Hi
I am using arm-unknown-linux-gnueabi-gcc 4.3.2 compiler to compile the u-boot 1.1.5 for the at91sam9260 board. When i use this u-boot image usb start command is not detecting the connected usb stick. Request Sense returned 00 00 00 Device NOT ready Request Sense returned 00 00 00
If use some other old compiler to compile this u-boot, usb works fine in that image.
Some pls guide me what may be the difference.
Your version of U-boot is about 3 years old. Nobody will be interested in debugging it. Please update to the latest and see if the problem exists.
This problem is indeed solved about a year ago. It was a problem with all gcc-4.x ARM compilers that compiled the code badly. It was solved by refactoring the code a little, such that the compiler produces correct output. (see the code)
So, indeed: move to the current version. (the at91sam9260-ek board is supported by mainline, so why do you use this prehistoric version anyway?)
Kind Regards,
Remy

Thanks
You are correct if i use u-boot 1.3.0 with this 4.3.2 compiler, usb works fine. we have done a lot of customization on u-boot 1.1.5 and it will take a lot of time to do those changes to the new u-boot 1.3.0.
can u please tell me what compiler related change is done in the new u-boot releases so it works with the 4.3.2 GCC compiler.In which part of the code it is done , is it in the makefile.
When we used 4.3.2 gcc to compile the u-boot 1.1.5 , ethernet drivers were not working and after making some of the variables volatile , ethernet driver worked fine.
i made struct _AT91S_RxTdDescriptor struct _AT91S_TxTdDescriptor volatile for the macb driver , ( driver for the inbult macb in at91sam9260).
For the USB driver also some variable has to be volatile , but i am not been able to figure out which one it should be. I have seen using the USB analyser , Data packets are not coming out of the USB controller correctly.
Thanks
Ben Warren biggerbadderben@gmail.com 07/17/2009 09:43 AM
To virupax virupax.ss@lntemsys.com cc u-boot@lists.denx.de Subject Re: [U-Boot] USB not working with 4.3.2 gcc compiler in u-boot 1.1.5
virupax wrote:
Hi
I am using arm-unknown-linux-gnueabi-gcc 4.3.2 compiler to compile the u-boot 1.1.5 for the at91sam9260 board. When i use this u-boot image usb start command is not detecting the connected usb stick. Request Sense returned 00 00 00 Device NOT ready Request Sense returned 00 00 00
If use some other old compiler to compile this u-boot, usb works fine in that image.
Some pls guide me what may be the difference.
Your version of U-boot is about 3 years old. Nobody will be interested in debugging it. Please update to the latest and see if the problem exists.
regards, Ben

Dear Virupax SS,
In message OFD81A0F58.8612F8F9-ON652575F6.002D2C08-652575F6.0030964A@lntemsys.com you wrote:
You are correct if i use u-boot 1.3.0 with this 4.3.2 compiler, usb works fine.
Good. Note that U-Boot 1.3.0 is very, very old, too.
we have done a lot of customization on u-boot 1.1.5 and it will take a lot of time to do those changes to the new u-boot 1.3.0.
"new u-boot 1.3.0" is an oxymoron. U-Boot 1.3.0 is nearly two years old.
I hope you will now learn the lesson of what it gives to you to maintain an out-of-tree port. If you had pushed your changes upstream when 1.1.5 was current, you wouldn't have any problems now. I can only hope that you will do this after adapting your code to a recent code base (make sure to use top-of-tree from git for this).
can u please tell me what compiler related change is done in the new u-boot releases so it works with the 4.3.2 GCC compiler.In which part of the code it is done , is it in the makefile.
It makes no sense to attempt to backport that stuff to such an ancient release. Please update your code.
When we used 4.3.2 gcc to compile the u-boot 1.1.5 , ethernet drivers were not working and after making some of the variables volatile , ethernet driver worked fine.
We don't access registers through (volatile) pointers any more for this very reason - today we are using proper accessor functions that make sure compiler optimizations will do no harm.
Just use current code.
Best regards,
Wolfgang Denk
participants (5)
-
Ben Warren
-
Remy Bohmer
-
virupax
-
Virupax SS
-
Wolfgang Denk