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 issue with FFT libraries downloaded from SPRC081 on 28335

Other Parts Discussed in Thread: CCSTUDIO

Hi Everyone, 

 

I am using a F28335 processor, and am trying to setup the FFT libraries downloaded from sprc081. The issue I'm having is when compiling the code, I receive the following error. 

 

The specific code I am trying to build is located in fft\cstb\fft128r\build, however I've received the same error on each included project, regardless of the .cmd and .map files I have included. Has anybody came across a solution to this error or know where the Tag_Memory_Model attribute value is specified? 

 

-----------------------------  build.pjt - Debug  -----------------------------

[Linking...] "C:\Program Files\Texas Instruments\C2000 Code Generation Tools 5.2.1\bin\cl2000" -@"Debug.lkf"

<Linking>

fatal error: file

   "C:\\tidcs\\c28\\dsp_tbox\\fft\\cstb\\fft128r\\build\\Debug\\fftrd.obj" has

   a Tag_Memory_Model attribute value of "2" that is different than one

   previously seen ("1"); combining incompatible files

  • For F28335 you should use large memory model (-ml in compilier options) and may be unified memory model (I don't remember exectly). See library docs for what compilier option is used for building this library and compare with options in your project.

  • To follow up with the answer to my own question, the problem ended up being the default linker library files specified, stb.lib in particular. Everything seems to be working properly once I removed the library linker paths, manually added the libraries, and changed the .cmd file due to a memory mapping issue.

    Cheers 

  • Hello Ryan,

     

    I experienced the same problem you described. It tried your solution, but at first it did not solve the problem. However, it did help me to get a better feedback from the compiler where the actual problem was. It turned out that the STB.LIB memory model was different than my project memory model. My project was in "Large Memory Model" and clearly my STB.LIB wasn't. I still have no clue what memory model was used to compile the supplied STB.LIB, but I solved it all by recompiling the STB.LIB with a slightly modified build batch file. (See http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/172/t/70523.aspx for some hints on this recompilation.) The original batch file looks like this:...

     

    @REM   *************************************************************************
    @REM   ** Texas  Instruments Inc.
    @REM   ** Script file for builing the driver libraries
    @REM   **
    @REM   *************************************************************************
    @cd    ..\src
    @echo  Assembling Source Files .....
    @asm2000 -v28 -q -gs  DLOG4CHC.asm   ..\obj\DLOG4CHC.obj    -l ..\lst\DLOG4CHC.lst
    @asm2000 -v28 -q -gs  sgti1c.asm     ..\obj\sgti1c.obj    -l ..\lst\sgti1c.lst
    @asm2000 -v28 -q -gs  Sintb360.asm   ..\obj\Sintb360.obj    -l ..\lst\Sintb360.lst

    @echo  Done !

    @cd  ..\obj
    @echo Deleting the old library file (stb.lib) ....
    @del ..\lib\stb.lib
    @echo .
    @echo .
    @echo  Building archives .....
    @ar2000 -rv ..\lib\stb.lib DLOG4CHC.obj
    @ar2000 -rv ..\lib\stb.lib sgti1c.obj
    @ar2000 -rv ..\lib\stb.lib Sintb360.obj
    @echo  ***************************    DONE    *********************************

    And what I did is just add the "-mf" command line parameter to all three asm2000 lines. So these three lines now look like this:...

     

    @asm2000 -v28 -q -gs -mf DLOG4CHC.asm   ..\obj\DLOG4CHC.obj    -l ..\lst\DLOG4CHC.lst
    @asm2000 -v28 -q -gs -mf sgti1c.asm     ..\obj\sgti1c.obj    -l ..\lst\sgti1c.lst
    @asm2000 -v28 -q -gs -mf Sintb360.asm   ..\obj\Sintb360.obj    -l ..\lst\Sintb360.lst

    This "-mf" forces the assembler to generate Large Memory Model object files. And this did the trick. It all works fine with me now too...!!!

     

    Thanks for your post which pushed me in the right direction...!!!

     

    Best regards, Johan.

     

  • Hello Johan,

    Thanks for this insight. Using CCSv3 and an F28335, I got the FFT examples compiled eventually, though I had to change some additional settings.  I'll  post them here.

    Starting from a clean installed c:\tidcs\c28\ with C28x_FPU_fastRTS, stb_lib and dsp_tbox\fft

    In both build.bat files in FFT and stb_lib I added -mf and set PATH=%PATH%;C:\CCStudio_v3.3MCU\C2000\cgtools\bin to the asm2000.

    Also I had to make an OBJ directory in the stb_lib.

    As example I used C:\tidcs\c28\dsp_tbox\fft\cstb\fft256c\build\build.pjt

    IN the /Project/Build Options/Linker Libraries, I had to add 

    search path : C:\tidcs\c28\C28x_FPU_fastRTS\V100\lib

    include libraries: remove rts2800.lib, add rts2800_fpu32_fast_supplement.lib

    Then, after a Build Clean, Build Entire Project, the errors were gone.

    Best regards, Wim