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.

linking problem with 55xdspx.lib

Hi,

I am able to successfully build and run the test LED program, then I am trying to add dsp function calls to LED.

I downloaded the dsplib_2.40.000, and copy the 55xdspx.lib to the xxx\c5500\lib directory, add the code to call


add(x,y,r,NX, scale); just like the dsplib example code "add"; also add the 55xdspx.lib in the LED linker option.

When I compile, I got the following error. I spent several hours and not getting anywhere.

Can someone help? Thanks,

<Linking>

 

fatal error: file "C:\\Program Files\\Texas

Instruments\\ccsv4\\tools\\compiler\\c5500\\lib\\55xdspx.lib<add.obj>"

specifies "C55x CPU Rev 2.x", which is not compatible with "C55x CPU Rev

3.x" specified in a previous file or on the command line

 

>> Compilation failure

C:\Program Files\Texas Instruments\ccsv4\utils\gmake\gmake: *** [led.out] Error 1

C:\Program Files\Texas Instruments\ccsv4\utils\gmake\gmake: Target `all' not remade because of errors.

Build complete for project led

fatal error: file "C:\\Program Files\\Texas

Instruments\\ccsv4\\tools\\compiler\\c5500\\lib\\55xdspx.lib<add.obj>"

specifies "C55x CPU Rev 2.x", which is not compatible with "C55x CPU Rev

3.x" specified in a previous file or on the command line

 

>> Compilation failure

C:\Program Files\Texas Instruments\ccsv4\utils\gmake\gmake: *** [led.out] Error 1

C:\Program Files\Texas Instruments\ccsv4\utils\gmake\gmake: Target `all' not remade because of errors.

Build complete for project led

 

 

 

  • The CPU revision in the C5505 is 3.3 which is the latest C55x CPU. The C5505 is the first DSP that has the 3.3 C55x CPU. The reason you got the error message is because the project specifies an option which is only available for the C5505. Please do the following things to resolve the error.  I assume that you included the dsplib library to the project succesfully.

    - The "led" project is using a library called "usbstk5505bsl.lib". So, first of all, you have to rebuild the library. 
    1) Go the "Project" menu and select "Import Existing CCS/CCE Eclipse Project”.
    2) Click "Browse" button and Select “....\usbstk5505\lib”. Then you should see "usbstk5505bsl" in the Projects window. Make sure that the small box is checked and then click "Finish" button.
    3) Now, you should see "usbstk5505bsl" under C/C++ Projects window as an active project.
    4) Go to the "Project" menu and select "Properties".
    5) Select "Basic Options" under C5000 compiler
    6) Remove "5505" in the box of "device + optional revision of target silicon". (it should be empty)
    7) Now, click OK button
    9) Re-build the active project. If you get some warning messages, just try to rebuild the active project again. You should not get any warning/error messages.
    10) Check out the date of "usbstk5505bsl.lib" under  “....\usbstk5505\lib”.

    - Now, you go back to the "led" project.
    11) select "led" project as an active project
    12) Go to the "Project" menu and select "Properties".
    13) Select "Basic Options" under C5000 compiler
    14) Remove "5505" in the box of "device + optional revision of target silicon". (it would be empty box)
    16) Now, click OK button
    17) Re-build the active project. You won't get the error message.

    Good luck!

    Regards,

    Peter Chung

     

     

  • Thanks Peter. Very nice; it works perfectly now. Just little wondering, are you downgrade the CPU revision to 2.x now?

    Should we really run it as 3.x? So perhaps compile dsplib as 3.x?

    Ben

  • Ben,

    The C55x compiler allows you to use huge memory model with the C5505. If you do not specify C5505 DSP to the compiler, you can use large or small memory model.

    - small memory model: only 16 bit data address is used for data access.

    - large memory model: 23-bit data address is used but ther is memory boundary limitation. The offset address should be within 64K. If offset address goes over 64K, it will be wrapped around.

    - huge memory model: 23-bit data address without 64K boundary limit.

    And, there are other benefits of using CPU 3.3, but as long as you are OK with the performance of your code, and you don't need huge memory model, then you should be fine.

    If you really want to use 3.3 optoin. You should rebuild the DSPLIB with large memory option.  (FYI, the led project is using large memory model)

    Regards,

    Peter Chung

     

  • Hi Peter,

    Just want to be complete, if it's not too much trouble, can you tell me how to modify the Blt55xx.bat to build dsplib 3.3, or do I need to create a new project and import all the files and configure the settings to build dsplib ver 3.3?

    Thanks,

    Ben

  • Ben,

    I have not used the Blt55xx.bat to rebuild the dsplib library. But, you don't need to build the entire DSPLIB. The way that I use is to include each source file that I need.

    The DSPLIB package includes full souce code, so you can add the source files of what you need into your project.  When you include the source files, please make sure that you use file specific options. The led project uses algebraic assembly option but the DSPLIB files are written in mnemonic assembly, so you should select mnemonic assembly option for each DSPLIB file.

    [File Specific option]

    - put a cusor on a file and righ click

    -select properties

    - Select "C/C++ Build" on the left top side

    - under C5000 compiler, choose "Runtime Model Options"

    - Uncheck the box of "Codegen .... algebraic..."

    - Choose mnemonic for "Select Assembly Source Language"

     

    Good Luck!

    Peter

     

    Thanks,

    Peter Chung

     

  • Thanks Peter. You answered exactly what I was looking for.

    Earlier I encountered the problem of mnemonic vs. algebrac conflicts when I was compiling CSL within the LED project. (I copied the CSL source to the LED directory). I didn't know how to resolve the conflict. I think you just gave me the answer I was look for.

    Ben 

  • Is there a possibility to compile the 55xdspx.lib for CPU Rev 3.x?

    If i downgrade my CPU to revision 2.x i get problems with other libraries (for example cslVC5505.lib) that require CPU revision 3.x?

    Thanks, 

    Martin 

  • I think you can build it for CPU rev 3.3. Try the following option. 

    set OPTIONS= -g -ml -vcpu:3.3 

     

    Regards,

    Peter Chung

  • Do i have to set this option in the "Blt55xx.bat"-file?

    If i execute the bat-file the *.lib-files get deleted. Do i have to execute the bat-file in a specific folder? At the beginning of the bat-file there is a command "call c:\ti\dosrun.bat" - this file does not exist. Do i have to include this file (where do i get it from)?

    Thanks for your help, 

    Martin