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.

csl libraries

Other Parts Discussed in Thread: SPRC203

I am building a dsp/bios application using bios_5_20_05 and linked to rom selected.

whenever I link I get the following undefined symbols:
 _CSL_chipInit         main.obj
 _CSL_dmaxHwControl    \main.obj
 _CSL_dmaxHwSetup      main.obj
 _CSL_dmaxInit         main.obj
 _CSL_dmaxOpen         main.obj
 _CSL_intcEventEnable  main.obj
 _CSL_intcGlobalEnable main.obj
 _CSL_intcHookIsr      main.obj
 _CSL_intcInit         main.obj
 _CSL_intcOpen         main.obj
 _CSL_intcSetVectorPtr main.obj
 _CSL_mcaspHwControl   main.obj
 _CSL_mcaspHwSetup     main.obj
 _CSL_mcaspInit        main.obj
 _CSL_mcaspOpen        main.obj
 _CSL_mcaspResetCtrl   main.obj

I have searched and search for libraries for this thing and added all the known ones from 5.2 and csl_c672x_* directories in \c6000, but nothing helps.
I have compared make files and cmd files and pjt files with what I have built before and I can find nothing missing. I went through the users guide and a number of other pdfs and everything I see is there.
What am I doing wrong?????

Thanks,
Don

  • Don,

    Please download sprc203.zip from this page.  It contains c67xdsplibR.lib and fastrts67xR.lib.  Add those libraries to your project as well as lnk.cmd included in the zip file.  More detailed info can be found in Chapter 2.2 of sprs277.

    Brad

  • The appnote 'Using ROM Contents on TMS320C672x' http://focus.ti.com/general/docs/litabsmultiplefilelist.tsp?literatureNumber=spraas8 may be of help.
    Gagan

     

  • I was already using one form of this (the BIOSRom.* packages and rom672x.out) but I took out the tcf file and used the cmd file you suggested. And it does compile without error but I don't have the rtdx and other functions I had hoped for. 

    If I put the tcf file and the generated cmd file back in, of course, the BIOSRom and rom672x stuff come back and I still get the same error. 

    Is there a way I can add the packages you recommend to the tcf file?

    I can live without those functions, most of my code is straight csl or C calls that does not use it but I had hoped this time to be able to do more analysis with the other functions.

     

    Thanks, Don

  • I don't think they were suggesting you remove the .tcf file out of your project. BIOS, CSL, FastRTS and DSPLIB can all coexist, and the command file can be stripped down to include only the parts related to the FastRTS and DSPLIB (the other compiler sections are included in the BIOS-generated .cmd file). Then you can add the shell of the command file in addition to the BIOS-generated command file (you can use both as long as they play nice - you aren't limited to just one .cmd file).

  • Ok. So I put my cmd back in with the memory specifications removed- they are already defined in the generated cmd.

    Things look better but here is the current problem:

    if I do not include rts67plus.lib, I have the following undefined symbols: __ftable, __strasgi, _atexit, _fprintf

     

    If I do include rts67plus, then _c_int00 and __stack are redefined by rts67plus.

     

    I am also using code generation tools 6.1.4- would this contribute to the problem? I notice it is pulling the rts67plus from its own library.

     

    Thanks for the help,

    Don

  • I get no errors now.

    This is what I did. At some point, flailing around, I put into the tcf file that it should use the c67xdsplibR.lib as my rts library.

    I found this and took it out and it did nothing to change the problem but then I decided that it was probably using the rts67plus.lib as default and removed that from my personal .cmd file.

    It compiles without error and even though some of the  math functions appear to be claimed by rts67plus.lib, I see in the trampoline assignments that there are allocations for them in ROM space.

     

    Does this sound right to you?

     

    Thanks,

    Don

  • Hi Don,

    If you zip up your tcf and linker command file I'd like to take a look at them.  It sounded a little funny to use c67xdsplibR.lib as an rts library since that is not an rts library.  ?

    Brad

  • Ok, I have (hopefully) attached the file.

    And remember that I removed that file from the tcf, I didn't include it.

    linker.zip
  • Sorry to say, but it looks really screwed up to me.  Are you using BIOS or not?  The fact that you have a tcf indicates you're using BIOS.  However, the fact that you're using CSL_INTC instead of the BIOS HWI module and the fact that your linker command file is defining things like stack, heap, .text placement, etc. indicates that you're not using BIOS!  [^o)]

    I'm going to go with the assumption that you WANT to use BIOS.  Here are some tips:

    • Don't use the CSL INTC module.  Use HWI from BIOS instead.  There is integration of HWI into the BIOS tcf.
    • Don't include rts67plus.lib in your linker.cmd file as it would be included by the bios-generated cmd file.
    • Don't specify stack or heap in your custom linker.cmd file.  Stack is specified in the Global section of BIOS and heap can be added in the MEM section for any given section.
    • Your linker command file should only define the IROM sections in the MEMORY area.  The SDRAM and internal RAM would be specified in the BIOS generated linker.cmd file.
    • The SECTIONS piece of your linker command file should only allocate .fastRts, .dsplib, and .fastRtsbss.  Leave the first two exactly as they currently are and allocate .fastRtsbss into one of the sections defined in your BIOS tcf.
    • Add both your linker command file and the BIOS linker command file to the project.
    • Make sure your project options specify 67x+ architecture in the compiler options (something like -mv67p or -mv67plus but not -mv6700).

    If you get any build errors please post the exact error message.

    Brad

  •  

    • Don't use the CSL INTC module.  Use HWI from BIOS instead.  There is integration of HWI into the BIOS tcf.  *commented out: DONE*
    • Don't include rts67plus.lib in your linker.cmd file as it would be included by the bios-generated cmd file. *wasn't there to being with, so DONE*
    • Don't specify stack or heap in your custom linker.cmd file.  Stack is specified in the Global section of BIOS and heap can be added in the MEM section for any given section. *commented out: DONE*
    • Your linker command file should only define the IROM sections in the MEMORY area.  The SDRAM and internal RAM would be specified in the BIOS generated linker.cmd file. *Done*
    • The SECTIONS piece of your linker command file should only allocate .fastRts, .dsplib, and .fastRtsbss.  Leave the first two exactly as they currently are and allocate .fastRtsbss into one of the sections defined in your BIOS tcf. *DONE*
    • Add both your linker command file and the BIOS linker command file to the project. *DONE*
    • Make sure your project options specify 67x+ architecture in the compiler options (something like -mv67p or -mv67plus but not -mv6700). *DONE*

    I am sending you some screen shots of the things you mention above to see that they are the way you want them, the zip is called CCS.zip.
    ccs.zip
  • Looked good for the most part.  The only thing I noticed was the warning/error in your build window.  It mentioned a CSL_intc* API which seemed odd since I thought you had gotten rid of that.  Was that an old error?  Does it build properly now?  Any warnings or errors?

  • Here is a screen shot of the first page of errors- I am sure you can figure what the rest are based upon what you see.

    It is probably worth noting that this is exactly where the thread began. It is starting to sound like I can't use those commands with the ROM, since you picked them out as being part of the csl_intc* stuff.

    errors.zip
  • Actually, I guess it doesn't matter because I can still get the math stuff from the ROM. That is all I really need, besides getting back the time I spent screwing with this.

  • In DefectHistory.txt for codegen 6.1.10 I found the following:

    DefectHistory.txt said:
    ------------------------------------------------------------------------------
    FIXED SDSCM00031037
    ------------------------------------------------------------------------------

    Summary : Too many relocation overflow error messages when placement
    fails
    Fixed in : 6.1.9
    Severity : S2 - Major
    Affected Component : Linker

    Description:
    When the linker is unable to fit .text into the memory segment
    requested in the cmd file, we see a lot of relocation error messages
    instead of simple "could not fit" error messages.



    Please update your codegen to the latest version by downloading 6.1.10 from here. Make sure you go to Help -> About -> Component Manager and select 6.1.10 as your build tools after you install them. Then restart CCS and do a Rebuild All. See if that changes your error message.

    Brad
  • You will get the same error if a symbol is undefined.

    I will happily update to the code generation tools and try this but if it doesn't help, I am going on with the project and including the csl stuff.

     

  • Well you definitely need to include the \csl_C672x\dsp\lib\csl_C6727.lib to get rid of the undefined symbol *errors*, but the relocation warnings (or were they errors?) may be explained by the bug Brad posted. The CSL_intc stuff should be stripped from your code entirely if you are using BIOS as the HWI and INTC modules do not play together nicely.

  • Actually to get rid of all the errors both of the libraries- the mentioned above and the intc stuff. If they won't work well together then I will have to see about replacing those commands.

     

    I downloaded cgt 10 and the latest, 23. with 10, the messages about the overflow DO go away but the symbols remain undefined. with 23, the overflow messages are back along with the undefines.

     

    Ok, what I understand is that to use the ROM, I need to find an replace any csl_intc commands because it does not work well with the ROM. 

    What I have now, then is the bios tcf and generated files plus a small cmd that includes at least the csl_c2767.lib. the intc comes out and I write or find other commands to do the same thing.

    Thanks for the help.

    Don

  • don morgan said:

    Ok, what I understand is that to use the ROM, I need to find an replace any csl_intc commands because it does not work well with the ROM. 

    Just to clarify, there is nothing wrong between the CSL_INTC module and the ROM. The ROM does contain the BIOS v5.20 kernel which you can leverage if you choose to use BIOS. You are not required to use BIOS, but if you do you should use the BIOS HWI module to configure/service your interrupts instead of the INTC module. If you use the INTC module instead of the HWI module in a BIOS project you can break the state of your system (basically the BIOS scheduler is not aware of any INTC-initiated interrupts, so for example it may change context in the middle of an ISR - this is catastrophic).

    Basically if you do not need/use BIOS you can continue to configure and service your interrupts through the INTC module, but if you are using BIOS you do not need INTC and should remove it completely. If you are unfamiliar with the HWI module let us know and we can help you convert your code. I do seem to recall someone on my team writing some collateral for converting the INTC examples to BIOS projects so I will try to find this in case it is useful.

    *edited for clarity*

  • don morgan said:

     

    Ok, what I understand is that to use the ROM, I need to find an replace any csl_intc commands because it does not work well with the ROM. 

    I said not to use CSL_INTC with BIOS.  That comment is independent of any ROM usage.

    don morgan said:

    What I have now, then is the bios tcf and generated files plus a small cmd that includes at least the csl_c2767.lib. the intc comes out and I write or find other commands to do the same thing.

    Thanks for the help.

    Don

    Use BIOS HWI instead of CSL INTC.

  • Thanks, Tim, I would like to use the bios and any reference you have would be greatly appreciated.

    I have written applications that were completely C and bit setting and I thought I would like to use the bios this time. The company I am doing this for got a PADK card for me to start development on and I just took their basic I/O application and began trying to see what I could do with that idea in mind.

     

    And thanks, Brad, I think I have a good idea now how it goes together. I look forward to using the CSL stuff and I hope it does simply the work.

     

    Don

     

  • I (believe I) made all the changes per the article but I am getting errors in the c62.h file on Void and Fxn- they are undefined and for the life of me, I can't find the definition (please note the caps) I have checked other includes and other processors and see they all use the same types but I just don't see the file I am supposed to include to enable them.

     

    What am I missing, please?

     

    Thanks,

    Don  

  • Include the .h file that's auto-generated by BIOS.  It includes all the header files that it uses, including the one that defines those types (std.h).

  • I had done that but in reverse order to the instructions. I didn't even see it until you had me look again to see that I had done it.

    Thanks, that did it.

    Don