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.

reusing PSP audio example - does not link

Other Parts Discussed in Thread: OMAP-L137

Hi all,

I need to reuse the PSP McASP example in my own code. Since I've successfully compiled and run the example, I've simply copy-pasted most of the code from it into my own code, adapted McASP configuration for my own needs, adapted DSP/BIOS conf by looking at the DSP/BIOS conf of the example. Compilation is fine. But when it comes to link, I get the following errors:

 undefined          first referenced                                       
  symbol                in file                                            
 ---------          ----------------                                       
 _Mcasp_IOMFXNS     C:\\Programs\\TI\\projects\\touch\\Debug\\touchcfg.obj 
 _Mcasp_PARAMS      C:\\Programs\\TI\\projects\\touch\\Debug\\touch_main.obj
 _Mcasp_init        C:\\Programs\\TI\\projects\\touch\\Debug\\touch_main.obj
 _Psc_ModuleClkCtrl C:\\Programs\\TI\\projects\\touch\\Debug\\touch_main.obj
 _configureMcasp    C:\\Programs\\TI\\projects\\touch\\Debug\\touch_main.obj
 _edma3init         C:\\Programs\\TI\\projects\\touch\\Debug\\touch_main.obj
 _hEdma             C:\\Programs\\TI\\projects\\touch\\Debug\\touch_main.obj

I remembered that prior to compiling and running the PSP example I had to compile some other projects. So I tried to add the following as library: mcaspDit_evmInit.obj, Mcasp.obj, Mcasp_edma.obj and Mcasp_ioctl.obj. Undefined symbole messages for _Mcasp_IOMFXNS,  _Mcasp_PARAMS, _Mcasp_init disappear, but then I get a huge list of undefined symbols for EDMA.

What am I doing wrong? How can I fix those link errors? Or is there another (maybe simpler) way to use McASP(0)?

Thanks you very much

Andreas

  • Andreus,

    What chip and platform are you using?

    What version of the PSP drivers are you trying to get working?

  • Andreas,

    the L137 PSP examples should compile out of the box if you set the environmental variables according to the:

    C:\Program Files\Texas Instruments\pspdrivers_01_xx_xx\docs\C6747\C6747_BIOSPSP_Userguide.pdf

    This is mentioned also at:

    http://tiexpressdsp.com/index.php/Getting_Started_Guide_for_C6747#Building_a_project

    You probably got an error that it can not find some libraries as well.

  • @David: I have a OMAP-L137 on a Spectrum Digital EVM Rev. E. I only use the C6747. PSP Drivers v1.20.

    @Mariana: Thank you for your answer. Maybe I was not very clear: I can compile, link and run the PSP examples without any problems. But I'd like to use the McASP example as a starting point for my own project. Now I found that it might be better if I just copy the complete example project folder and change the source code and DSP/BIOS conf afterwards (and not what I've done: created a project from scratch and copy-pasted code/conf from the examples).

    I need to use McASP0 (because I need 16 serializers). So some few questions remain:

    1) Do I have to change/add anything in order to use McASP0 instead of McASP1/2?

    2) Do configureMcasp() and Mcasp_init() work for McASP0 as well?

    3) Is it correct to use Psc_ModuleClkCtrl(Psc_DevId_1,PSC_MCASP0_LPSC,TRUE) when I put "#define PSC_MCASP0_LPSC 7"?

    I'm new to DSPs so I'm having quite some trouble to correctly figure out how to initialize the C6747 and use peripherals without using the PSP. Are there any other ways/examples/explanations/guides/wikis to use peripherals (in particular McASP) on the OMAP-L137/C6747?

    Thanks a lot for your answers!

    Andreas

     

  • Andreas Weishaupt said:
    Now I found that it might be better if I just copy the complete example project folder and change the source code and DSP/BIOS conf afterwards (and not what I've done: created a project from scratch and copy-pasted code/conf from the examples).

    That could save you some time.

    Andreas Weishaupt said:
    1) Do I have to change/add anything in order to use McASP0 instead of McASP1/2?

    The McASP used by the project is the McASP1. This is defined by the device ID in the tcf file:

    Andreas Weishaupt said:
    2) Do configureMcasp() and Mcasp_init() work for McASP0 as well?

    I did not find the configureMcASP function. If you mean configureAudio, you might need to adjust the pin mux configurations. Please see:

    http://focus.ti.com/general/docs/litabsmultiplefilelist.tsp?literatureNumber=sprab06a

    section 10.5 of the TMS320C6745/C6747 DSP System Reference Guide

    Yes for Mcasp_init, find source codes at:

    ...\pspdrivers_01_xx_xx\packages\ti\pspiom\mcasp\src\Mcasp.c

    Andreas Weishaupt said:
    3) Is it correct to use Psc_ModuleClkCtrl(Psc_DevId_1,PSC_MCASP0_LPSC,TRUE) when I put "#define PSC_MCASP0_LPSC 7"?

    need to check.

    Andreas Weishaupt said:
    I'm new to DSPs so I'm having quite some trouble to correctly figure out how to initialize the C6747 and use peripherals without using the PSP. Are there any other ways/examples/explanations/guides/wikis to use peripherals (in particular McASP) on the OMAP-L137/C6747?

    Find the user guides in the product folder:

    http://focus.ti.com/docs/prod/folders/print/omap-l137.html#technicaldocuments

    Please also see the documentation included in the PSP installation, for example:

    ...\pspdrivers_01_20_00\packages\ti\pspiom\mcasp\docs

    You can allways search at the forums, www.ti.com, and in the wiki for information. Like:

    http://tiexpressdsp.com/index.php/Using_a_PSP_Driver_in_DSP/BIOS

     

  • Hi Andreas,

    Just noticed that you are probalby using the McASP Dit example:

    C:\Program Files\Texas Instruments\pspdrivers_01_30_00\packages\ti\pspiom\examples\evm6747\mcaspDit

    Not the regular audio example:

    C:\Program Files\Texas Instruments\pspdrivers_01_30_00\packages\ti\pspiom\examples\evm6747\audio

    So here are the answers:

    Andreas Weishaupt said:
    1) Do I have to change/add anything in order to use McASP0 instead of McASP1/2?

    Same answer as before, but please notice that only McASP2 can support DIT. Please see page 11 (section 1.2) of the:

    TMS320C674x/OMAP-L1x Processor Multichannel Audio Serial Port (McASP)

    Andreas Weishaupt said:
    2) Do configureMcasp() and Mcasp_init() work for McASP0 as well?

    For configure audio you would need to adapt the pimux, please see source at:

    C:\Program Files\Texas Instruments\pspdrivers_01_30_00\packages\ti\pspiom\platforms\evm6747\src\mcaspDit_evmInit.c

    You would need to recompile the project:

    C:\Program Files\Texas Instruments\pspdrivers_01_30_00\packages\ti\pspiom\platforms\evm6747\build\ccs3\evmInit.pjt

    And then "Rebuild all" you project, but again, DIT just works for McASP2.

    Same answer for McASP_init.

    Andreas Weishaupt said:
    3) Is it correct to use Psc_ModuleClkCtrl(Psc_DevId_1,PSC_MCASP0_LPSC,TRUE) when I put "#define PSC_MCASP0_LPSC 7"?

    Yes, please see page 93 of the:

    TMS320C6745/C6747 DSP System Reference Guide

    but again, DIT just works for McASP2 - :)

  • Thank you very much, Mariana. I think with your information I'll make it work properly. I don't use DIT. I've just taken this example for configuration as it does not include the audio/codec stuff which I don't need. I'll use McASP0 in burst/DSP mode with 16 serializers.

    Best regards and thanks again for your help.

    Andreas

     

  • If you are not using DIT, you can use the project:

    C:\Program Files\Texas Instruments\pspdrivers_01_30_00\packages\ti\pspiom\examples\evm6747\mcasp\build\ccs3\mcaspSampleMaster.pjt

  • Hi again, Mariana.

    I cannot find the example you have. Where can I find it? It might be very useful to me.
    Its not included with PSP v1.20, neither with version 1.30.00.05.

    Thanks.

    Andreas