• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » StarterWare » StarterWare forum » am17x support?
Share
StarterWare
  • Forum
Options
  • Subscribe via RSS

Forums

am17x support?

This question is answered
Jonathan Chen
Posted by Jonathan Chen
on Dec 08 2011 11:28 AM
Intellectual635 points

Please read before posting!

Update 2012-01-10: the goal of this thread is now to port the StarterWare AM1808 USB Bulk Device example (or similar functionality) to the AM1707 EVM board.

Question 1: Is StarterWare not available for Sitara AM17x?  Specifically, AM1705..
Answer 1:  No, it is not available.  See Baskaran's post.

Question 2: Can the uartEcho example (serial port) be ported from AM1808 to run on the AM1707 EVM?
Answer 2: Yes.  See this post, with source code included as sw_am17x_2012-01-10-UART_interrupt_works!.zip

Question 3: Can the usb_bulk_dev example be ported from AM1808 to run on the AM1707 EVM?
Answer 3: Yes.  See this post, with source code included as gcc_usb_bulk_dev_am1707.zip


At TI's behest, please post questions about porting other parts of StarterWare in a fresh thread.  However, for questions about any existing posts, I think it would make more sense to reply on this thread.

Special thanks to Baskaran, Madhvapathi, Sujith, and Vivek!

StarterWare am1808 USB am1707 AM17x AM1705 USB Bulk Device interrupts UART
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Jonathan Chen
    Posted by Jonathan Chen
    on Jan 20 2012 12:06 PM
    Intellectual635 points

    Dear Baskaran,

    Thank you for your continued support!

    Code

    char a[12] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb};
    char *p;
    int intValue, index;

    for (index = 0; index <= 12-4; index++)
    {
        p = &a[index];
        intValue = *((int*) p);
        printf("*( &a[%d] ) = 0x%x\n", index, intValue);
    }

    Result (for both CCS 4.1.3.00034 [cl470 v4.6.3] + 5.1.0.09000 [cl470 v4.9.1] on EVMAM1707)

    *( &a[0] ) = 0x3020100
    *( &a[1] ) = 0x30201
    *( &a[2] ) = 0x1000302
    *( &a[3] ) = 0x2010003
    *( &a[4] ) = 0x7060504
    *( &a[5] ) = 0x4070605
    *( &a[6] ) = 0x5040706
    *( &a[7] ) = 0x6050407
    *( &a[8] ) = 0xb0a0908

    So I guess this means unaligned memory access is not supported?  Is this what you meant by exception?  Sorry if I did not understand correctly..

    Question, though: isn't "__attribute__ ((packed))" CCS 5.1.0.09000 () for AM1x?  cf. usblib.h in StarterWare AM1808 01.00.02.02

    Thank you!
    Jonathan

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Baskaran Chidambaram
    Posted by Baskaran Chidambaram
    on Jan 20 2012 12:36 PM
    Expert4435 points

    "Is this what you meant by exception? " - if the unaligned exception is enabled you would have got exception. Since you have not enabled the exception, you just getting the data wrongly.

    In usblib.h the packed attribute is applied for ARM architecture V7 only. ARM 9 which is used in AM1808 is v5 architecture. So the packed attribute here will not be applicable for AM1x.


    For any new issues i would suggest you to open a new thread. In this thread itself we have discussed lot of issues and the thread has grown too big.

    StarterWare
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jonathan Chen
    Posted by Jonathan Chen
    on Jan 20 2012 15:21 PM
    Intellectual635 points

    Thank you, Baskaran!  If any new issues arise, I will create a new thread; the rest of this post follows up on the previous issue of memory alignment.

    You are right--enabling the ARM core's unaligned exception in CCSv5, the board winds up in AbortHandler.  Code is posted below because I had to look up how to do this..

    char a[12] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb};
    char *p;
    int intValue, index;

    // enable "Data address alignment fault checking"
    asm("    mrc p15, #0, r0, c1, c0, #0\n\t"
        "    orr r0, r0, #0x00000002\n\t"
        "    mcr p15, #0, r0, c1, c0, #0\n\t");

    index = 0;
    p = &a[index];
    intValue = *((int*) p);

    index = 1;
    p = &a[index];
    intValue = *((int*) p); // set breakpoint here and (assembly) step into abort handler.

    References
    ARM926EJ-S Technical Reference Manual
    am1808_starterware/system_config/armv5/cgt/cp15.c: CP15MMUEnable()

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jonathan Chen
    Posted by Jonathan Chen
    on Jan 26 2012 18:56 PM
    Verified Answer
    Verified by Anonymous
    Intellectual635 points
    gcc_usb_bulk_dev_am1707.zip

    Attached is a successful port of the usb_bulk_dev example to AM1707!

    It has been confirmed to work with the following setup:

    • StarterWare AM1808 1.00.02.02 code base
    • Spectrum Digital AM1707 EVM Rev. H
    • Code Composer Studio 5.1.0.09000
    • CodeSourcery (gcc) toolchain 2009q3-68***
    • CodeSourcery (gcc) toolchain 2011.09-69 - with additional compiler flag -fno-zero-initialized-in-bss
    • GNU ARM Eclipse plug-in 0.5.4.201112030833
    • USB host (PC) driver v6459 + application v8264 from here (SW-USB)
    • Windows USB host (XP and 7 x64 both confirmed)
    • AISgen for D800K003 version 0.7.0.0 (for generating bootable image to flash to the board)

    ***Please note that other compilers did not work - including older and newer (as of this writing) versions of CodeSourcery, as well as TI's tms470 code generation tools (i.e., the built-in compiler bundled with CCS).


    Recipe (from scratch)

    1. Install CodeSourcery 2009q3 (gcc) compiler
      - it MUST be this version, as of this writing
      - 2009q1 and older: usb_bulk_dev breaks (works from CCS debugger, but not SPI boot)
      - 2010 and newer: usb_bulk_dev gives USB\UNKNOWN, and uart borks out
      - 2010 and newer: should work correctly with additional compiler flag -fno-zero-initialized-in-bss (tested in 2011.09 only)
    2. Install Code Composer Studio 5 (tested with 5.1.0.09000)
    3. Install GNU ARM Eclipse plug-in (tested with 0.5.4.201112030833)
    4. add StarterWare library + usb_bulk_dev example files to project (a pretty long list - see bottom of this post, or _manifest.txt in zip attachment)
    5. apply uartEcho fixes as needed
    6. fix trivial compile/link errors
      - one nice way is to tweak hw_usb.h
          #elif !defined(SOC_USB_0_BASE)
          #include "psc.h"
          #include "soc_AM1808.h"
          #include "hw_psc_AM1808.h"
          #include "hw_usbphyGS60.h"
          #include "hw_usbOtg_AM1808.h"
      - need to #define sourcerygxx to get the "packed" #ifdef to compile (I did this lazily in the CCS project)
    7. usbphyGS60.c/USBPhyOn() - several modifications.
      - clear CFGCHIP2[USB0OTGMODE] register bits (evmam1707.gel oversight that forces USB host)
      - set CFGCHIP2[USB0DATPOL] register bit (evmam1707.gel ERROR for board Rev. G and newer)
      - meh, for standalone boot, just clobber CFGCHIP2 = 0x00001972
          - evmam1707.gel: CFGCHIP2 = 0x3872 @ startup
          - standalone boot: CFGCHIP2 = 0xEF00 @ startup (spruh94a.pdf)
    8. other tweaks
      - do NOT (UART)printf during interrupts! timing will mess up completely.
      - (optional?) usbdenum.c/USBDCDInit(): clear POWER/HSEN bit! this disables high-speed usb.
      - (optional?) usbdenum.c/USBDCDInit(): silicon advisory 2.0.4 (sprz311a.pdf)
      - (optional?) usbdbulk.c : call InternalUSBRegisterTickHandler AFTER USBDCDInit??
    9. pc-side driver + test application at http://www.luminarymicro.com/products/software_updates.html
      SW-USB-windrivers + SW-USB-win, respectively

     --------
    |Includes|
     --------

    include/debug.h
    include/delay.h
    include/psc.h
    include/timer.h
    include/uart.h
    include/uartStdio.h
    include/usb.h
    include/hw/hw_aintc.h
    include/hw/hw_psc_AM1808.h
    include/hw/hw_uart.h
    include/hw/hw_usb.h
    include/hw/hw_usbOtg_AM1808.h
    include/hw/hw_usbphyGS60.h
    include/hw/hw_tmr.h
    include/hw/hw_types.h
    include/hw/soc_AM1808.h
    include/armv5/cpu.h
    include/armv5/am1808/evmAM1808.h
    include/armv5/am1808/interrupt.h

    usblib/include/usblib.h
    usblib/include/usb-ids.h
    usblib/include/usbdevice.h
    usblib/include/usbdbulk.h
    usblib/include/usblibpriv.h
    usblib/include/usbdcomp.h
    usblib/include/usbdevicepriv.h


    Ported by hand to AM1707
    ------------------------
    include/hw_syscfg0_AM1808.h - ported to hw_syscfg_AM1707.h using PinSetup.exe + spruh94a.pdf


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

     --------
    | Source |
     --------

    Files from AM1808 StarterWare
    -----------------------------
    examples/evmAM1808/usb_dev_bulk/usb_bulk_structs.c
    examples/evmAM1808/usb_dev_bulk/usb_bulk_structs.h
    examples/evmAM1808/usb_dev_bulk/usb_dev_bulk.c - COMMENTED OUT all graphics code!!
    examples/evmAM1808/usb_dev_bulk/ustdlib.c
    examples/evmAM1808/usb_dev_bulk/ustdlib.h

    utils/delay.c
    utils/uartStdio.c

    usblib/usbbuffer.c
    usblib/usbdesc.c
    usblib/usbringbuf.c
    usblib/usbtick.c
    usblib/device/usbdbulk.c
    usblib/device/usbdconfig.c
    usblib/device/usbdenum.c
    usblib/device/usbdcdesc.c
    usblib/device/usbdhandler.c

    drivers/psc.c
    drivers/timer.c
    drivers/uart.c
    drivers/usbphyGS60.c
    drivers/usb.c

    platform/evmAM1808/uartConsole.c
    platform/evmAM1808/usb.c - as usb_platform.c
    platform/evmAM1808/syscfg.c
    platform/evmAM1808/sysdelay.c

    system_config/armv5/gcc/cpu.c
    system_config/armv5/gcc/init.S
    system_config/armv5/am1808/interrupt.c
    system_config/armv5/am1808/startup.c
    system_config/armv5/am1808/gcc/exceptionhandler.S

    build/armv5/gcc/am1808/evmAM1808/usb_dev_bulk/usb_dev_bulk.lds


    Ported to AM1707
    ----------------
    platform/evmAM1808/uart.c - rewritten as uart_platform.c using new syscfg/pinmux header


    StarterWare am1808 USB am1707 CodeSourcery gcc AM17x USB Bulk Device
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Baskaran Chidambaram
    Posted by Baskaran Chidambaram
    on Jan 26 2012 20:45 PM
    Expert4435 points

    Thanks for sharing your experience. I am sure it will help others.

    StarterWare
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jonathan Chen
    Posted by Jonathan Chen
    on Jan 27 2012 08:54 AM
    Intellectual635 points

    With all the help I've received on these forums, it's the least I could do!

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Hock Leong Ang
    Posted by Hock Leong Ang
    on Mar 05 2013 01:19 AM
    Intellectual305 points

    Hi Jonathan Chen,

    I am trying  USB_DEV_BULK project from OMAPL138_StarterWare_1_10_03_03 on TMDXLCDK138 (OMAP-L138 Development Kit (LCDK)).

    The Development Kit  was detect at host PC as unknown devjice.

    1. May I know how to fix this  USB_DEV_BULK error?

    2. I also install CodeSourcery 2009q3 (gcc) compiler as suggested by you. What need to set at CCS5.1 so that to use the compiler?

    3. I have downloaded GNU ARM Eclipse plug-in (org.eclipse.cdt.cross.arm.gnu_0.5.4.201202210114.zip). May I know how to install it and use it at CCS5.1?

    The detail of my set up is below:

     

    1. Eval kit model :TMDXLCDK138 ( OMAP-L138 Development Kit (LCDK) ).

    2. Starterware version :OMAPL138_StarterWare_1_10_03_03

    3. OS : Win XP SP3

    4. CCS Version : 5.1.0.09000

    5. Gel file use for target for both DSP and ARM processor : OMAP-L138_LCDK.gel

    6. Starterware project file name: usb_dev_bulk_armv5_omapl138_lcdkOMAPL138

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jonathan Chen
    Posted by Jonathan Chen
    on Mar 05 2013 07:27 AM
    Intellectual635 points
    Hi, Hock Leong Ang,
    2. and 3. It's been a while; sorry if the following procedure is wrong...
    - Install plugin in CCS as described at <http://gnuarmeclipse.livius.net/wiki/Plug-in_installation>
    - Create a new Code Sourcery (gcc?) project and add your firmware files
    - Compile and debug as usual
    1. Sorry, there are too many possibilities, and both my hardware and firmware are different from yours (AM1707 processor, "custom" StarterWare). 

    I can tell you what was wrong with the AM1707 board: there was a wrong bit in the gel file - specifically, register CFGCHIP2, bit USB0DATPOL (it was supposed to be 1, but manufacturer Spectrum Digital set it to 0, and refused to admit they were wrong... at least their hardware schematics weren't wrong!). Maybe this will give you one idea where to start... But since your gel file, hardware, and firmware are all different, so you will probably have to look at all 3 yourself...

    Please start a new thread, since this thread was specific to AM1707 + Starterware.  These forums are very helpful, and I am confident that someone will be able to help you!
    Hope this helps,
    Jonathan
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Hock Leong Ang
    Posted by Hock Leong Ang
    on Mar 06 2013 01:59 AM
    Intellectual305 points

    Hi Jonathan,

    After Install CodeSourcery GCC and CYGWin GCC, USB bulk is enumeration successfully

    Verification of USB bulk:

    Install program from http://www.ti.com/tool/sw-usb-win, execute usb_bulk_example.exe program from C:\Program Files\Texas Instruments\Stellaris\usb_examples.

    When key in x byte data in data entry, the x byte is written into device and later the x byte was read from device.

    The counter at LCD for Write and Read back also correct.

    Thus, the data transfer of USB Bulk is working fine with verification software.

    • Overall:

     This meant that USB bulk is able to connect to host PC and transfer in and out data file correctly.

    Thank you very much.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
12
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use