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.

StarterWare USB on the OMAP-L138 (ARM+C6748)

Other Parts Discussed in Thread: OMAP-L138, OMAPL138

I'm still confused about how to proceed with my StarterWare USB development for the OMAP-L138 (which is an ARM9 plus a C6748 processor).

Am I correct on the following 3 points:

  1. The ARM9 processor cannot currently handle the packed structures used in the StarterWare USB package?
  2. The ARM9 processor will NEVER handle the packed structures, no matter what improvements (or extensions) are made to compilers? (Because ARM9 physically cannot handle unaligned accesses.) 
  3. The C6748 can handle the packed structures used in StarterWare, and this provides the ONLY way to do StarterWare USB on the OMAP-L138?

If the C6748 is the only path forward for doing StarterWare USB, then what compiler will work?  (Which compiler will properly handle the packed data structures for the C6748?) 

In short, I need advice on how to develop StarterWare USB on the OMAP-L138.  ????

=======================

Note: ARM9 is not ARM Cortex. For reference: This page gives the following information:

  • The packed (struct/union) attribute is available on ARM only for architectures which support unaligned access (Cortex) and when the --unaligned_access=on option is in effect.  (Note: that --unaligned_access=on by default for architectures which support unaligned access.)
  • Hi,

         The Arm9 processor can not handle the unaligned memory access (unalignment possible with packed structures). But for these processors compilers will not generate word access for packed structures, in turn it will use other instructions (with more overhead) to read them.

    Tool chains:

                      GCC and IAR tool chains support packed structures

                      TMS470 - the newer version (4.9.1) supports packed structures.

    Regards

    Baskaran

  • Baskaran Chidambaram said:
    TMS470 - the newer version (4.9.1) supports packed structures.

    Baskaran,

    I'm using ARM compiler version 4.9.1, and it gives me the following complaint:

    #36-D #warn The packed attribute is not supported by this version of the TI ARM CGT.       Please upgrade to version 5.x or use an alternate toolchain instead.

    1) Perhap my compiler is installed incorrectly? 

    2) When will a TI ARM compiler (TMS470) be available that can handle these packed data structures? (This will affect my decision on how best to proceed.)

    3) If the above two approaches don't work in the near future, then which of the other two approaches (GCC compiler versus IAR compiler) is the easiest path to success? 

    Thanks for your help.

     

  • Walter,

              I understood from other thread that 4.9.1. supports packed struct. But i have not verified this personally. I am checking with tools team to get Confirmation.

              My gut feeling is that the packed suppot is already added in TMS470. i will the exact version in which it is supported.

             GCC vs IAR - currently StarterWare for AM180x/OMAPL138 supports GCC and TMS470 tool chains only. We are planning to add IAR support in 2Q.

             So if you want to use StarterWare for AM180x - the best option as of now is GCC.

    Regards

    Baskaran

  • Baskaran Chidambaram said:
    I understood from other thread that 4.9.1. supports packed struct. But i have not verified this personally. I am checking with tools team to get Confirmation. My gut feeling is that the packed support is already added in TMS470. i will get the exact version in which it is supported.

    Baskaran,

    To avoid confusion, let me note this detail:  The "warning" mentioned in my previous post, is NOT generated by the compiler. Instead it is generated explicitly by the StarterWare software itself (within a header file called "usblib.h" at lines 89 & 90),  Apparently, that header file tries to decode (from the environment variables set at compile time) whether or not the compile will succeed.  In my particular case, the usblib.h file issues a warning.  However, the compiler itself issues no such warning (at least not one that I can see).  The compiler (TMS470 v4.9.1) is apparently okay with packed data structures.  ???  Yes, this situation is confusing, and can use some clarification, which is why I flag it to your attention.

    So, I will await your advice on whether I can safely proceed with my compiler, TMS470 v4.9.1.

    If it happens that my compiler cannot handle the packed data structures, then I can use a hint on how to find/install an appropriate GCC compiler or extensions.

    Thanks for your help.

  • Is there any confirmation yet (one way or the other) on whether the TI compiler TMS470 v4.9.1 can handle the "packed" attribute on data structures? 

    If it can, great. If not, then I need a hint on how to find/install (under CCS?) an appropriate GCC compiler for the ARM9 processor.

    Thanks for your help.

     

  • Hi Walter,

                     I got confirmation from tools team that the "packed" attribute will be supported from v5.0 onwards. As i understood this release will be made in weeks time. But i am not sure when this will be released as part of CCS.

    Regards

    Baskaran

  • I found a post that claims compiler v4.9.1 can handle the packed attribute. (Below is a copy.) Indeed he is correct that v4.9.1 contains options to "Enable support for GCC extensions (--gcc)" and to "Generate unaligned loads and stores (--unaligned_access=on)."  In short, it APPEARS that v4.9.1 can handle the packed attribute, and he testifies that it handles it correctly. Is there any confirmation from TI on that? 

    Baskaran:  It's not entirely clear from your wording above, but I presume you are saying that v5.0 will be released "in a weeks time" -- meaning "in one week" -- and that we can install it ourselves under our current versions of CCS (rather than wait for TI to bundle the two together).  I'm asking for this clarification so my project schedule doesn't drag on indefinitely.

    Slava Bogulmintsev said:
    I have successfully compiled and ran usb_dev_bulk example for ARM core of OMAP-L138 with CCS TI code generation tools.

    1) CCS v5.1.0.09
    2) compiler version TI v4.9.1
    3) set Language Options -> Enable support for GCC extensions (--gcc)
    4) set Runtime Model Options -> Generate unaligned loads and stores (--unaligned_access) = on
    5) trivial patch usblib.h as:

      #warning The packed attribute is not supported by this version of the TI ARM CGT.
             Please upgrade to version 5.x or use an alternate toolchain instead.
      //#define PACKED
      #define PACKED __attribute__ ((packed))

    6) recompile necessary libraries and example with new build options

    It seems that SDOCM00080255 is wrong because compiler 4.9.1 can use packed data (for AM180x).

  • Walter,

                   As per the information i got from the tools team is that 'packed' atribute will be supported from v.5.0. I am not sure if it is supported in v4.9.1, i will check again with them to clarify this.

                   "in a weeks time" - The beta release will be made in one week. The newer TMS470 tools can be installed in existing CCS versions. But to get the TMS470 tools you need to contact your local FAE. The tool chains (alone) are not released outside separately, it will be released along with CCS only.

    Regards

    Baskaran

  • The 4.9.x version of the TI ARM compiler (TMS470) does not support the packed attribute if unaligned accesses are not enabled. Unaligned accesses can be enabled by using the --unaligned_access=on option. By default this option is on for Cortex cores and off for all others. It is off for ARM9 because that core does not support unaligned accesses. Turning unaligned accesses on for ARM9 will result in errors during runtime since the code generated will not properly access fields of a packed struct. Support for the packed attribute will be available in the upcoming 5.0 release. The production release of that compiler will be in May 2012. The beta will be available for testing this week.

    The compiler should probably issue an error if --unaligned_access=on is used with --silicon_version=5e or 4. I have submitted SDSCM00043538 to track this issue.

  • codya said:
    The 4.9.x version of the TI ARM compiler (TMS470) does not support the packed attribute if unaligned accesses are not enabled. Unaligned accesses can be enabled by using the --unaligned_access=on option. By default this option is on for Cortex cores and off for all others. It is off for ARM9 because that core does not support unaligned accesses. Turning unaligned accesses on for ARM9 will result in errors during runtime since the code generated will not properly access fields of a packed struct. Support for the packed attribute will be available in the upcoming 5.0 release. The production release of that compiler will be in May 2012. The beta will be available for testing this week.

    The compiler should probably issue an error if --unaligned_access=on is used with --silicon_version=5e or 4. I have submitted SDSCM00043538 to track this issue.

    Thank you Codya.  That fully answers the remainder of my questions.  My confusions are gone. I now know exactly what to do and why.  I am to immediately contact my local FAE to get approval for obtaining the beta version of compiler v5 the moment it becomes available a week from now.

    Thank you all for your help.