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.

Linker error while compiling USB_DEV_ Bulk example in starterware

Other Parts Discussed in Thread: OMAPL138

Hi,

The PID and VID numbers are not getting reflected on PC after the USB session start function was uncommented from the example code.

Only after uncommenting of USB Session start function a USB device was detected on the PC.

But when we cross verified the VID and PID  of the device it showed them as both zeroes.

In the starterware example code VID and PID are 35 and  1CBE respectively,

Following are the observation made while compiling the USB_DEV_BULK starterware example:

1. The default Linker command file for the starterware example  pointed the ".far section to DDR2 " storage.

2. When we imported the Starterware code and compiled it showed an error  stating

".far points to SHRAM there isn't enough memory available".

      a. When we changed the pointer of  ".far section to DDR2" the error was gone ,but while the running the code it would hang the entire processor.

     b. When correction wasn't made it showed the previous error.

Can somebody kindly mention the remedy ?

  • HI,

    Could you please answer the following question to understand your issue,

    What is your board & processor ie EVM or custom ?

    Starterware version ie C6748 or OMAPL138?

    Try the attached .cmd file,

    5430.usb_dev_bulk.txt
    // ============================================================================
    // Linker Command File for Linking c674 DSP Programs
    //
    // These linker options are for command line linking only. For IDE linking,
    // you should set your linker options in Project Properties.
    //         -c                    Link Using C Conventions
    //        -stack     0x1000        Software Stack Size
    //        -heap    0x1000        Heap Area Size
    // ===========================================================================
    -stack 0x1000
    -heap 0x1000
    
    // ============================================================================
    //                         Specify the System Memory Map
    // ============================================================================
    MEMORY
    {
        L1P:    o = 0x11E00000        l = 0x00008000
        L1D:    o = 0x11F00000        l = 0x00008000
        L2:     o = 0x11800000        l = 0x00040000
        DDR2:   o = 0xC0000000        l = 0x08000000
    }
    
    // ============================================================================
    //                 Specify the Sections Allocation into Memory
    // ============================================================================
    SECTIONS
    {
        .cinit        >        DDR2               // Initialization Tables
        .pinit        >        DDR2               // Constructor Tables
        .init_array   >        DDR2               // 
        .binit        >        DDR2               // Boot Tables
        .const        >        DDR2               // Constant Data
        .switch       >        DDR2               // Jump Tables
        .text         >        DDR2               // Executable Code
        .text:_c_int00: align=1024 > DDR2         // Entrypoint
        
        GROUP (NEARDP_DATA)                       // group near data
        {
           .neardata
           .rodata
           .bss                                   // note: removed fill = 0
        }             >        DDR2
        .far: fill = 0x0, load > DDR2             // Far Global & Static Variables
        .fardata      >        DDR2               // Far RW Data
        .stack        >        DDR2               // Software System Stack
        .sysmem       >        DDR2               // Dynamic Memory Allocation Area
        
        .cio          >        DDR2               // C I/O Buffer
        .vecs         >        DDR2               // Interrupt Vectors
    }
    

  • Hi Vaishak,

    Vaishak says said:
    The PID and VID numbers are not getting reflected on PC after the USB session start function was uncommented from the example code.Only after uncommenting of USB Session start function a USB device was detected on the PC.But when we cross verified the VID and PID  of the device it showed them as both zeroes.

    When I ran the USB_dev_bulk starterware code, it gives the PID and VID properly as "0X1cbe" and "0X003". Please have a look at the snapshot of device descriptor given below. You haven't mentioned about the version of the starterware and the board used.

    However, I used OMAPL138 LCDK board and OMAPL138_StarterWare_1_10_03_03 package. I have not modified the code. It worked striaght away.

    What is the purpose for you to uncomment the commented code? As the file name/ pacakge is not mentioned by you, I am not be able to comment about those portion of the code and whether it is required or not! e.t.c.

    Vaishak says said:
     Following are the observation made while compiling the USB_DEV_BULK starterware example

    I use compiler version 5.4. Not observed any linker errors.

    Please revert for any further questions.

     

    Regards,

    Shankari

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

     

     

  • HI Vaishak,

    Are you able to get the PID and VID?

    Regards,

    Shankari