This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Source code to libusb.a?

I am trying to maximize USB Full Speed Host bandwidth, and it would be very helpful to see the implementation in libusb.a, possibly even to change some parts of the implementation to optimize for speed. Is it possible to obtain the source code for the TM4C129x libusb.a publicly or privately?

  • Hi Brian,
    The source code for the USB library can be found in the TIVAWARE/usblib directory. If you do not have that directory on your computer then you need to download the SW-TM4C-USBL: TivaWare™ USB Library for C Series.

    Alan
  • Hi Brian,
    That USB library is GCC based and believe TI (*.c) files have the same basic functions as do compressed lib (*.a) , documented source in the USBLIB folder.
  • I do have that directory. My initial search for USBHCDPipeSchedule() did not find anything - I blame the poor Windows search function! I just rebooted into OSX and a quick search shows that usbhostenum.c appears to hold the source to USBHCDPipeSchedule().

    Thanks
  • Thanks for the reply. Searching within Code Composer Studio only found the USBHCDPipeSchedule() function in a header file, not a source file. Searching from Windows did not reveal very clear results. But now I have found the function in usbhostenum.c
  • Hello Brian

    I can confirm BP101's post. The USB lubrary needs to be imported into the toolchain as a project and after modifications, can be recompiled to generate the libusb.a
    In the actual project do make sure that the linker is remapped to the new libusb.

    Regards
    Amit
  • Amit are there actual source (listings) in the GCC compressed (usb.a) library? Meaning once imported into CCS or GCC would there be Doxygen statements as to what the code is doing?
  • Hello BP101,

    I think they are but to the original path on the build system. It may give an error as to cannot find the source. So normally I build them on my PC

    Regards
    Amit
  • I have not searched for all API, but there is plenty of documentation for USBHCDPipeSchedule() internals and all of the related USBHCDPipe*() functions. I believe that object code comes from the .lib or .a when building the example code for Hosting external USB devices, but you have access to the source outside the project if you want to bring it in (which you must do if you want to modify the library code). This particular file is in the usblib_hcd group of Doxygen. I believe that the functions already appear in the TivaWare USB Library documentation, but there are some non-Doxygen comments in the sources that will probably explain things further.