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.

Failed to run Starterware's example code usb_dev_msc on LCDKC6748

Other Parts Discussed in Thread: OMAPL138

Dear All,

I fail to run the C6748 Starterware example usb_dev_msc on LCDKC6748. In CCS I can build usb_dev_msc, connect to LCDKC6748 via JTAG (Below is the output message from Console),

C674X_0: Output: Target Connected.
C674X_0: Output: ---------------------------------------------
C674X_0: Output: Memory Map Cleared.
C674X_0: Output: ---------------------------------------------
C674X_0: Output: Memory Map Setup Complete.
C674X_0: Output: ---------------------------------------------
C674X_0: Output: PSC Enable Complete.
C674X_0: Output: ---------------------------------------------
C674X_0: Output: PLL0 init done for Core:372MHz, EMIFA:SYSCLK3=93 / DIV4P5=82.67 MHz
C674X_0: Output: DDR initialization is in progress....
C674X_0: Output: PLL1 init done for DDR:132MHz
C674X_0: Output: Using mDDR settings
C674X_0: Output: mDDR init for 132 MHz is done
C674X_0: Output: ---------------------------------------------

download Debug\usb_dev_mcs.out, but then fail to run. The following screen shot depicts this symptom:

As you can see, the Resume icon is disabled, as well as the run cursor doesn't appear and stop at the main() function.  And I also find that, if I modify the main() function like:

    while (1);

  USBDMSCInit(0, (tUSBDMSCDevice *)&g_sMSCDevice);

The additional while (1); prevents the function USBDMSCInit() to be called and then Resume icon will be enabled. As other example code, such as usb_dev_serial, work perfectly, I think this should not be an hardware issue. 

I'll appreciate if anyone could advise. Thanks in advance!

Regards,

Oliver

  • Hi Oliver,

    The following might be one of the causes.

    1.If the same source file is opened twice in the CCS with one file-instance, modified, not saved and the other file, unmodified.

    2.If the working directory or the work folder path had some problem, change it to a new one.

    3.Try deleting the target configuration file( *.cxml) exist if any and create a new one.

    Give the screen shot too.

    Regards,

    Shankari

     

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------

  • Dear Shankari,
    First thank you for your prompt reply and comments.
    According to your comments, again I import the existing C6748 Starterware usb_dev_msc sample project, create a target configuration (*.ccxml) with XDS100v2 emulator and (C6748) LCDK, create a debug configuration with the target configuration just created, start to debug this project on LCDK. Finally this program starts to run and attaches to PC Host as a mass storage device. Thanks to your suggestion!


    I think the symptom I described in my last post was caused by the inappropriate target configuration file. My goal is to run the usb_dev_msc code on our own board, rather than LCDK. Though I have a target configuration file which fits other example code, e.g., usb_dev_serial, running on our own board, that target configuration file seems not fit usb_dev_msc. The symptom is what I described in my last post.

    1537.target_configuraiton.zip

    You can find the target configuration files I used in the attached zip file:

    lcdkC6748.ccxml: The file that fits LCDK

    EVK29_emul.ccxml & EVK29.gel: The files that normally fit our own board

    Could you advise how to solve this issue?

    Regards,

    Oliver

  • Hi Oliver,

    Try to create a hello word project If you want to debug on your custom board.

    And also, Please mention the generic board name as "OMAPL138" & connection type while you are creating the project

    You can use default OMAPL138 gel file for your custom board and modify the OMAPL138 gel file as per your hw (custom)changes such operating freq, pinmux , memory map etc.,

  • Dear Titus,

    I have run our own C6748 board using the target configuration file I mentioned in my last post for a long time. What is strange is that that target configuration fits most Starterware example except usb_dev_msc.

    Do you have any idea about which GEL file CCS will use by default if I create a target configuration file for LCDK? Maybe I can compare the differences between the default one and the one I use. How do you think?

    Regards,

    Oliver

  • Hi,

    I fail to run the C6748 Starterware example usb_dev_msc on LCDKC6748. In CCS I can build usb_dev_msc, connect to LCDKC6748 via JTAG (Below is the output message from Console),

    I have also faced the same problem,

    Just, I have deleted the "target config .cxml" which is created by myself,

    Simply, I had been imported the "C6748 usb starterware pjt" and gave debug option & finally got worked since the

    C6748 starterware project itself take care that which configuration need to load.

    Please Have a try.

    Have you tried the Shankari suggestions?

    If yes, Got any issues!

  • Dear Titus,

    Yes, I had tried Shankari's suggestion. In my second post in this thread you can find what I did and the result. His 3rd suggestion (create and use new target configuration file) works if I use LCDK.

    Now the problem left is to debug why our target configuration file that fits most Starterware example code on our own board doesn't fit usb_dev_msc.

    Any further comment on this issue?

    Regards,

    Oliver

  • Hi,

    Now the problem left is to debug why our target configuration file that fits most Starterware example code on our own board doesn't fit usb_dev_msc.


    I presume that you want to debug USB starterware code on your custom (own) board?

    Is it correct,

    If yes, First try with "hello world" project.

    If it is custom board, Have you tried ever load ARM/DSP app successfully through  debugger?

    http://processors.wiki.ti.com/index.php/Programming_mDDR/DDR2_EMIF_on_OMAP-L1x/C674x

    http://processors.wiki.ti.com/index.php/DDR_Interface_Drive_Strength

    http://processors.wiki.ti.com/index.php/DDR_Routing_Checklist#DDR2.2FmDDR.2FDDR3_Routing_Checklist

    http://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/115/p/326804/1137919.aspx#1137919

    http://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/115/t/119596.aspx

  • Dear Titus,

    Now I've identified that the GEL file I've used for a long time on our own (custom) board doesn't get along with the Starterware example code usb_dev_msc. Now I'm comparing it with the pdk_C6748_2_0_0_0\C6748_StarterWare_1_20_03_03\tools\gel\C6748_LCD.gel, because C6748_LCD.gel works smoothly with usb_dev_msc. 

    Anyway, thanks for your reply and help! 

    Regards,

    Oliver

  • Dear Titus & Shankari,

    Finally I find the root cause of this symptom. In the file ramdisk.c a 16 MByte of buffer is declared: 

    #define RAM_DISK_SIZE (1024 * 1024 * 16)

    unsigned char ram_disk[RAM_DISK_SIZE];

    This is OK for LCDK because it owns 128MByte DDR2. However, on our board there is only 8 MByte mDDR. Decreasing this buffer to 1M Byte solves this issue: The Resume icon in CCS Debug perspective will be enabled after downloading .out file to C6748. 

    Thanks for all your kind help! :)

    Regards,

    Oliver