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.

How to use ACPY3?

Hello,

 

Programming the EDMA3 using the Low-Level Driver tells me to use ACPY3 for simple memory-to-memory copies. EDMA3_LLD.pdf mentions on page 16-13 that it's really easy to set up. Just one bit of information is missing: "The dmaHandle is provided via DMAN3 (DMA Manager) which is not shown." Now I have been looking for docs in all the wrong places but couldn't find any information how I can get this dmaHandle...

I tried to understand Framework Components DMAN3/ACPY3 Users Guide but failed. The few hundred lines of code don't suggest it's easy to use ACPY3 and I couldn't find out where to get my Handle, neither.

Couldn't you please show me a simple usage example of ACPY3? A (working) example that is so easy as the DSP/BIOS Integration workshop and the wiki suggests?

 

Many thanks,

Markus

 

  • ow after updating to this version (3.3.79), my decoder is not working
    for
    any kind of DMA trasfers using ACPY3. The decoder hangs in ACPY3_Wait
    even
    for the cases which CCS 3.3.38 was able to pass.
  • What version of Framework Components are you using ? What device/simulator will you try and run your usage example on ?

  • Hello Gunjan,

     

    The Framework Components is version 2_23_01. The code has to run on the C6747 of an OMAPL137 now and on an Integra a bit later.

     

    TIA!

    Markus

  • Have you tried the following example:-

    <FC_INSTALL_DIR>/examples/ti/sdo/fc/dman3/examples/fastcopy/omapL137_bios/fastcopytest.pjt

    Try loading this pjt file in CCS and running the executable on the device (or simulator).

     

    Using ACPY3 for performing DMA transfers requires that an IDMA3 handle be available. This handle has to be obtained using the DMAN3 APIs. The example I am pointing you to, shows two methods of obtaining IDMA3 handles. 

    The example_nonAlgorithmDMAN3Usage() shows how a non-algorithm user of the EDMA3 hardware would request an IDMA3 Handle (using DMAN3) and then use it to call ACPY3 APIs to configure DMA transfers.

    The second part of the example, shows how an algorithm that implements the IDMA3 interface is granted resources via DMAN3 and then uses ACPY3 to configure DMA transfers.

    With this background and this example, maybe the documentation you have already gone through, will make more sense. 

  • Thanks for the advice! For now it seems that I have to understand the sources without running them on my DSP: I can't get the sources to compile :( What I did in CCS4 was:

    • File->Import->Existing CCS [...] Projects
    • Select search directory: <FC_INSTALL_DIR>/examples/ti/sdo/fc/dman3/examples/fastcopy/omapL137_bios
    • Checked discovered project fastcopy
    • Checked "Copy sources into workspace
    • Finish

    This went smootly, but alas! it doesn't compile:


    **** Build of configuration Debug for project fastcopy ****

    C:\Programme\Texas Instruments\ccsv4\utils\gmake\gmake -k all
    'Building file: ../dman3_config.c'
    'Invoking: Compiler'
    "C:/Programme/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.0.4/bin/cl6x" -mv6200 -g --define=xdc_target_types__=ti/targets/std.h --include_path="C:/Programme/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.0.4/include" --include_path="c:/Programme/Texas Instruments/xdctools_3_20_07_86/packages/" --include_path="c:/C674x_dsp_1_00_00_11/framework_components_2_23_01/fctools/packages/" --include_path="c:/C674x_dsp_1_00_00_11/framework_components_2_23_01/packages/" --include_path="c:/Programme/Texas Instruments/bios_5_41_09_34/packages/ti/bios/include/" --diag_warning=225 --preproc_with_compile --preproc_dependency="dman3_config.pp"  "../dman3_config.c"
    'Finished building: ../dman3_config.c'
    ' '
    'Building file: ../dman3_lld_config.c'
    'Invoking: Compiler'
    "C:/Programme/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.0.4/bin/cl6x" -mv6200 -g --define=xdc_target_types__=ti/targets/std.h --include_path="C:/Programme/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.0.4/include" --include_path="c:/Programme/Texas Instruments/xdctools_3_20_07_86/packages/" --include_path="c:/C674x_dsp_1_00_00_11/framework_components_2_23_01/fctools/packages/" --include_path="c:/C674x_dsp_1_00_00_11/framework_components_2_23_01/packages/" --include_path="c:/Programme/Texas Instruments/bios_5_41_09_34/packages/ti/bios/include/" --diag_warning=225 --preproc_with_compile --preproc_dependency="dman3_lld_config.pp"  "../dman3_lld_config.c"
    "../dman3_lld_config.c", line 144: warning: function declared implicitly
    "../dman3_lld_config.c", line 149: warning: function declared implicitly
    "../dman3_lld_config.c", line 197: warning: function declared implicitly
    "../dman3_lld_config.c", line 205: warning: function declared implicitly

    'Finished building: ../dman3_lld_config.c'
    ' '
    'Building target: fastcopy.out'
    'Invoking: Linker'
    "C:/Programme/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.0.4/bin/cl6x" -mv6200 -g --define=xdc_target_types__=ti/targets/std.h --diag_warning=225 -z -m"fastcopy.map" --warn_sections -i"C:/Programme/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.0.4/lib" -i"C:/Programme/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.0.4/include" --reread_libs --rom_model -o "fastcopy.out"  "./dman3_lld_config.obj" "./dman3_config.obj" -l"libc.a" "../fastcopytest.cmd"
    <Linking>
    error: cannot find file "fastcopytestcfg.cmd"
    warning: creating output section ".cinit" without a SECTIONS specification
    warning: creating output section ".const" without a SECTIONS specification
    warning: creating output section ".far" without a SECTIONS specification
    warning: creating output section ".stack" without a SECTIONS specification
    warning: creating output section ".text" without a SECTIONS specification
    warning: creating ".stack" section with default size of 0x400; use the -stack
       option to change the default size
    "../fastcopytest.cmd", line 17: warning: memory range not found: L1DSRAM on
       page 0
    "../fastcopytest.cmd", line 17: error: run placement fails for object
       ".internal", size 0x0 (page 0)
    "../fastcopytest.cmd", line 18: warning: memory range not found: L1DSRAM on
       page 0
    "../fastcopytest.cmd", line 18: error: run placement fails for object ".image",
       size 0x0 (page 0)


     undefined first referenced                                                                                                   
      symbol       in file                                                                                                        
     --------- ----------------                                                                                                   
     _main     C:\Programme\Texas Instruments\ccsv4\tools\compiler\C6000 Code Generation Tools 7.0.4\lib\rts6200.lib<args_main.obj>

    error: unresolved symbols remain
    "../fastcopytest.cmd", line 10: error: undefined symbol "_FCPY_TI_IFCPY" used
       in expression
    "../fastcopytest.cmd", line 11: error: undefined symbol "_FCPY_TI_IDMA3" used
       in expression
    error: errors encountered during linking; "fastcopy.out" not built


    >> Compilation failure
    gmake: *** [fastcopy.out] Error 1
    gmake: Target `all' not remade because of errors.


    Hmm :( I'll see if I get along

  • Source code may be hard to follow unless you can step through it (using CCS), since there are some #ifdef(s) etc, that may be hard to follow.

    So I tried doing something similar to what you were trying, and I managed to successfully build the project. 

    * File -> Import -> CCS -> Legacy CCSv3.3 Project

    * Select a project file -> fastcopytest.pjt          (NOT fastcopytest-llrm.pjt. I noticed from some of your error messages that CCS was also trying to import this second pjt file, lets

                                                                                      concentrate on the first one only for now)

    * Once I imported it, it gave me a one line error in my Migration.log:-

    !WARNING: File 'fastcopytest.cmd' explicitly references a TConf-generated linker-command file (line 4). Please remove this reference when migration completes - CCS now automatically handles generated files during project-build.

    I followed the above instructions, and removed that line from fastcopytest.cmd from my project listing.

    * After that I had to adjust set some environment variables and adjust some build settings (all related to paths) to  make sure all sources could be found. 

    FC_INSTALL_DIR

    XDAIS_INSTALL_DIR -> FC_INSTALL_DIR/fctools

    BIOS_INSTALL_DIR

    XDC_INSTALL_DIR

    Make sure the examples/fastcopy and examples/fastcopy/omapl137_bios directories are in the path as well.

    The example built fine after the above steps. I don't have a simulator or board right now to run this imported/rebuilt executable on, so this is as far as I got.

    Maybe you could try the steps I have listed above ?!

    Thanks,

    Gunjan

  • Gunjan (or anyone else):

    Thanks for the useful information here.  I do have some follow up questions related to this post: Do I have to use code composer to run this sample?  Is there a way of launching this from the command line?   Where are the binaries for this application?

    Thanks,
    Chris

  • Chris,

    Since these Framework Components ACPY3 tests are all DSP-only executables, you need CCS to run them on the board. For examples, if look under:-

    <FC_INSTALL_DIR>/examples/ti/sdo/fc/dman3/examples/fastcopy/<device_name>//fastcopytest_<device_name>.x<ext> 

    For e.g, there's the following for omapL1137:-

    omapL137_bios/fastcopytest_omapL137.x674

     

    Thanks,

    Gunjan.