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.

RTOS/TMS320C6678: Keystone Multicore Forum (C66, 66A, AM5, TCI)

Part Number: TMS320C6678
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

Hello!

 I want to use three EDMA3 channels. I use the following codes to request the channels.

    // EDMA variables
    EDMA3_DRV_Handle hEDMA;
    EDMA3_DRV_Result EDMA_Result = EDMA3_DRV_SOK;
    uint32_t EDMA_ID = 0;
    EDMA3_DRV_PaRAMRegs EDMA_PaRAM_1 = {0,0,0,0,0,0,0,0,0,0,0,0};
	EDMA3_DRV_PaRAMRegs EDMA_PaRAM_2 = {0,0,0,0,0,0,0,0,0,0,0,0};
    EDMA3_DRV_PaRAMRegs EDMA_PaRAM_3 = {0,0,0,0,0,0,0,0,0,0,0,0};

    // Initialisation EDMA
    hEDMA = edma3init(EDMA_ID, &EDMA_Result);

    // Request a Channel 1 from Resource Manager
    uint32_t EDMA_TCC_1  = EDMA3_DRV_TCC_ANY; // Transfer complete code (TCC)
    uint32_t EDMA_chID_1 = EDMA3_DRV_DMA_CHANNEL_ANY; // Channel ID
    EDMA_Result = EDMA3_DRV_requestChannel (hEDMA, &EDMA_chID_1, &EDMA_TCC_1, (EDMA3_RM_EventQueue)0, NULL, NULL);
    if (EDMA_Result == EDMA3_DRV_SOK) {
        printf("DMA channel %d request successful.\n", EDMA_chID_1);
    } else {
        printf("DMA channel %d request failed with code #%d!\n", EDMA_chID_1, EDMA_Result);
    }
    
    // Request a Channel 2 from Resource Manager
	uint32_t EDMA_TCC_2  = EDMA3_DRV_TCC_ANY; // Transfer complete code (TCC)
    uint32_t EDMA_chID_2 = EDMA3_DRV_DMA_CHANNEL_ANY; // Channel ID
    EDMA_Result = EDMA3_DRV_requestChannel (hEDMA, &EDMA_chID_2, &EDMA_TCC_2, (EDMA3_RM_EventQueue)0, NULL, NULL);
    if (EDMA_Result == EDMA3_DRV_SOK) {
        printf("DMA channel %d request successful.\n", EDMA_chID_2);
    } else {
        printf("DMA channel %d request failed with code #%d!\n", EDMA_chID_2, EDMA_Result);
    }

    // Request a Channel 3 from Resource Manager
    uint32_t EDMA_TCC_3  = EDMA3_DRV_TCC_ANY; // Transfer complete code (TCC)
    uint32_t EDMA_chID_3 = EDMA3_DRV_DMA_CHANNEL_ANY; // Channel ID
    EDMA_Result = EDMA3_DRV_requestChannel (hEDMA, &EDMA_chID_3, &EDMA_TCC_3, (EDMA3_RM_EventQueue)0, NULL, NULL);
    if (EDMA_Result == EDMA3_DRV_SOK) {
        printf("DMA channel %d request successful.\n", EDMA_chID_3);
    } else {
        printf("DMA channel %d request failed with code #%d!\n", EDMA_chID_3, EDMA_Result);
    }

Only two channels are allocated (chID_1 and chID_2), the third channel (chID3) have the error -132(EDMA3_DRV_E_DMA_CHANNEL_UNAVAIL).

DMA channel 0 request successful.
DMA channel 1 request successful.
DMA channel 1002 request failed with code #-132!

I am using:

  • CCSv7.3
  • Processor SDK RTOS v04.02.00
  • Compiler TI v8.1.4
  • EDMA3 LLD v 2.12.5.

How to request three EDMA3 channels?

  • Hi,

    RTOS team have been notified. They will post their feedback directly here.

    Best Regards,
    Yordan
  • Hi,

    For the -132:
    /** The requested DMA Channel not available */
    #define EDMA3_DRV_E_DMA_CHANNEL_UNAVAIL (EDMA3_DRV_E_BASE-4)

    Trace back into \ti\sdo\edma3\drv\src\edmd3_drv_basic.c, function EDMA3_DRV_Result EDMA3_DRV_requestChannel (EDMA3_DRV_Handle hEdma,
    uint32_t *pLCh,
    uint32_t *pTcc,
    EDMA3_RM_EventQueue evtQueue,
    EDMA3_RM_TccCallback tccCb,
    void *cbData)

    It means EDMA3_RM_allocResource() not able to allocate the resource. It could be some issue with the static resource allocation under ti\sdo\edma3\drv\sample\src\platforms\sample_c6678_cfg.c. Please check sampleInstInitConfig for the channels allowed to allocate.

    Also, check the link:
    e2e.ti.com/.../6632

    Regards, Eric
  • Hi, Iding!

    What edits do you need to make in the file sample_c6678_cfg.c? The topic in the link shows the edits for dm6446.

    What do the 0x3FFFF bits mean in ownPaRAMSets?

    EDMA3_RM_InstanceInitConfig sampleInstInitConfig[NUM_EDMA3_INSTANCES][EDMA3_MAX_REGIONS] =
    	{
    		/* EDMA3 INSTANCE# 0 */
    		{
    			/* Resources owned/reserved by region 0 */
    			{
    				/* ownPaRAMSets */
    				/* 31     0     63    32     95    64     127   96 */
    				{0x3FFF0003u, 0x00000000u, 0x00000000u, 0x00000000u,
    				/* 159  128     191  160     223  192     255  224 */
    				 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,
    				/* 287  256     319  288     351  320     383  352 */
    				 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,
    				/* 415  384     447  416     479  448     511  480 */
    				 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},
    
    				/* ownDmaChannels */
    				/* 31     0     63    32 */
    				{0x00000003u, 0x00000000u},
    
    				/* ownQdmaChannels */
    				/* 31     0 */
    				{0x00000001u},
    
    				/* ownTccs */
    				/* 31     0     63    32 */
    				{0x00000003u, 0x00000000u},
    
    				/* resvdPaRAMSets */
    				/* 31     0     63    32     95    64     127   96 */
    				{0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,
    				/* 159  128     191  160     223  192     255  224 */
    				 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,
    				/* 287  256     319  288     351  320     383  352 */
    				 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,
    				/* 415  384     447  416     479  448     511  480 */
    				 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,},
    
    				/* resvdDmaChannels */
    				/* 31     0     63    32 */
    				{0x00000000u, 0x00000000u},
    
    				/* resvdQdmaChannels */
    				/* 31     0 */
    				{0x00000000u},
    
    				/* resvdTccs */
    				/* 31     0     63    32 */
    				{0x00000000u, 0x00000000u},
    			},

    Do I understand correctly that EDMA3_MAX_REGIONS is the number of cores?
    What does the parameter NUM_EDMA3_INSTANCES mean? Why are the two beside the instances?

    How do I configure the ownPaRAMSets parameter?

    Where can I read about the settings in the file sample_c6678_cfg.c? In EDMA3 Driver User Guide there is only mention of the parameters, but nothing is said about how to configure them.

  • Hi,

    /** Maximum Shadow Regions supported by the EDMA3 Controller */
    #define EDMA3_MAX_REGIONS (8U)
    This is not the number of the cores.

    /* Number of EDMA3 controllers present in the system */
    #define NUM_EDMA3_INSTANCES 3u
    The C6678 has 3 EDMA channel controller (CC)

    How do I configure the ownPaRAMSets parameter?
    {0x3FFF0003u, ====> This means Paramset 0,1, 16, 17 .... 29 is available, it is enough when you only use 3 EDMA channels

    Where can I read about the settings in the file sample_c6678_cfg.c? In EDMA3 Driver User Guide there is only mention of the parameters, but nothing is said about how to configure them.
    ===> Look at edma3_rm.h file EDMA3_RM_InstanceInitConfig to understand this. Below change should work for you,

    /* EDMA3 INSTANCE# 0 */
    {
    /* Resources owned/reserved by region 0 */
    {
    /* ownPaRAMSets */
    /* 31 0 63 32 95 64 127 96 */
    {0x3FFF000Fu, 0x00000000u, 0x00000000u, 0x00000000u,
    /* 159 128 191 160 223 192 255 224 */
    0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,
    /* 287 256 319 288 351 320 383 352 */
    0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,
    /* 415 384 447 416 479 448 511 480 */
    0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u},

    /* ownDmaChannels */
    /* 31 0 63 32 */
    {0x0000000Fu, 0x00000000u},

    /* ownQdmaChannels */
    /* 31 0 */
    {0x00000001u},

    /* ownTccs */
    /* 31 0 63 32 */
    {0x0000000Fu, 0x00000000u},

    /* resvdPaRAMSets */
    /* 31 0 63 32 95 64 127 96 */
    {0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,
    /* 159 128 191 160 223 192 255 224 */
    0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,
    /* 287 256 319 288 351 320 383 352 */
    0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,
    /* 415 384 447 416 479 448 511 480 */
    0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,},

    /* resvdDmaChannels */
    /* 31 0 63 32 */
    {0x00000000u, 0x00000000u},

    /* resvdQdmaChannels */
    /* 31 0 */
    {0x00000000u},

    /* resvdTccs */
    /* 31 0 63 32 */
    {0x00000000u, 0x00000000u},
    },

    Regards, Eric

  • Hi,
    Yes, I tried it. The error is still present.
  • Hi,

    Do you rebuild the EDMA RM library after changing the code? If it is still not working, you may need to step through the EDMA3_DRV_Result EDMA3_DRV_requestChannel() function to see where the error came from.

    Regards, Eric
  • How can I rebuild the EDMA RM library? Tell me please how it's done?
  • Please check edma3_lld_2_xx_xx_xx\packages\ti\sdo\edma3\rm\docs user guide, section 2.4.1

    Regards, Eric
  • Hi, Eric!

    Thank you for reply. When executing the command gmake libs FORMAT=ELF, I have the following error:

    D:\TI\edma3_lld_2_12_05_29\packages>gmake libs FORMAT=ELF
    # Making generic/c674:debug:edma3_lld_rm
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=674 PROFILE_674=d
    ebug
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Making generic/c674:release:edma3_lld_rm
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=674 PROFILE_674=r
    elease
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Making generic/c64p:debug:edma3_lld_rm: -for big_endian
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=64p PROFILE_64p=d
    ebug ENDIAN=big
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Making generic/c64p:release:edma3_lld_rm: -for big_endian
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=64p PROFILE_64p=r
    elease ENDIAN=big
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Making generic/c64p:debug:edma3_lld_rm
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=64p PROFILE_64p=d
    ebug ENDIAN=little
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Making generic/c64p:release:edma3_lld_rm
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=64p PROFILE_64p=r
    elease ENDIAN=little
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Making generic/c66:debug:edma3_lld_rm: -for big_endian
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=66 PROFILE_66=deb
    ug ENDIAN=big
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Making generic/c66:release:edma3_lld_rm: -for big_endian
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=66 PROFILE_66=rel
    ease ENDIAN=big
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Making generic/c66:debug:edma3_lld_rm
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=66 PROFILE_66=deb
    ug ENDIAN=little
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Making generic/c66:release:edma3_lld_rm
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=66 PROFILE_66=rel
    ease ENDIAN=little
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Making generic/m3:debug:edma3_lld_rm
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=m3 PROFILE_m3=deb
    ug
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Compiling src/edma3resmgr.c to obj/generic/m3/debug/edma3resmgr.oem3 ...
    /home/gtbldadm/processor-sdk-rtos-morty-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sys
    roots/x86_64-linux/usr/share/ti/ti-cgt-arm/bin/armcl  -ppd=obj/generic/m3/debug/.deps/edma3resmgr.P
    -c -qq -pdsw225 --endian=little -mv7M3 --abi=eabi -eo.oem3 -ea.sem3 --symdebug:dwarf   -Dxdc_target_
    name__=M3 -Dxdc_target_types__=ti/targets/arm/elf/std.h -Dxdc_bld__profile_debug -Dxdc_bld__vers_1_0
    _4_6_1 -D_DEBUG_=1  -DGENERIC   -DGENERIC -DGENERIC    -I/home/gtbldadm/processor-sdk-rtos-morty-bui
    ld/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/share/ti/ti-cgt-arm/
    include -I. -I../../../.. -Isrc -fr=obj/generic/m3/debug -fs=obj/generic/m3/debug -fc src/edma3resmg
    r.c
    process_begin: CreateProcess(NULL, /home/gtbldadm/processor-sdk-rtos-morty-build/build-CORTEX_1/arag
    o-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/share/ti/ti-cgt-arm/bin/armcl -ppd=obj/gen
    eric/m3/debug/.deps/edma3resmgr.P -c -qq -pdsw225 --endian=little -mv7M3 --abi=eabi -eo.oem3 -ea.sem
    3 --symdebug:dwarf -Dxdc_target_name__=M3 -Dxdc_target_types__=ti/targets/arm/elf/std.h -Dxdc_bld__p
    rofile_debug -Dxdc_bld__vers_1_0_4_6_1 -D_DEBUG_=1 -DGENERIC -DGENERIC -DGENERIC -I/home/gtbldadm/pr
    ocessor-sdk-rtos-morty-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linu
    x/usr/share/ti/ti-cgt-arm/include -I. -I../../../.. -Isrc -fr=obj/generic/m3/debug -fs=obj/generic/m
    3/debug -fc src/edma3resmgr.c, ...) failed.
    make (e=2): ═х єфрхЄё  эрщЄш єърчрээ√щ Їрщы.
    gmake[1]: *** [obj/generic/m3/debug/edma3resmgr.oem3] Error 2
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake: *** [edma3_lld_rm_generic] Error 2
    
    D:\TI\edma3_lld_2_12_05_29\packages>

    Me env.mk file: 

    env.mk.txt
    # File: env.mk. This file contains all the paths and other ENV variables
    
    #
    # Module paths
    #
    
    # Directory where all internal software packages are located; typically 
    #  those that are checked into version controlled repository. In this case all
    #  the OMX components and SDK/OMX demo.
    INTERNAL_SW_ROOT ?= D:/TI/edma3_lld_2_12_05_29
    
    # Directory where all external (imported) software packages are located; typically 
    #  those that are NOT checked into version controlled repository. In this case,
    #  compiler tool chains, BIOS, XDC, Syslink, IPC, FC, CE, drivers, codecs, etc.
    EXTERNAL_SW_ROOT ?= D:/TI
    
    # Destination root directory.
    #   - specify the directory where you want to place the object, archive/library,
    #     binary and other generated files in a different location than source tree
    #   - or leave it blank to place then in the same tree as the source
    #DEST_ROOT = E:/Temp/edma3_lld_02_11_02_03
    
    # Utilities directory. This is required only if the build machine is Windows.
    #   - specify the installation directory of utility which supports POSIX commands
    #     (eg: Cygwin installation or MSYS installation).
    #UTILS_INSTALL_DIR = /home/gtbldadm/processor-sdk-rtos-morty-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/c667x-evm/usr/share/ti/ti-xdctools-tree
    UTILS_INSTALL_DIR = D:/TI/xdctools_3_32_02_25_core
    
    # Set path separator, etc based on the OS
    # On windows if sh.exe is installed (cygwin installs) make will execute
    # commands on sh or it executes on windows cmd prompt. When executing on sh,
    # unix style command seperator is used.
    ifeq ($(OS),Windows_NT)
      PATH_SEPARATOR = ;
      UTILSPATH = $(UTILS_INSTALL_DIR)/bin/
      ifeq (cygwin,$(findstring cygwin,$(PATH)))
      COMMAND_SEPERATOR = ;
      else
      COMMAND_SEPERATOR = &
      endif
    else 
      # else, assume it is linux
      PATH_SEPARATOR = :
      COMMAND_SEPERATOR = ;
    endif
    
    # BIOS
    bios_PATH = D:/TI/bios_6_46_05_55
    bios_INCLUDE = $(bios_PATH)/packages
    
    # XDC
    xdc_PATH = D:/TI/xdctools_3_32_02_25_core
    xdc_INCLUDE = $(xdc_PATH)/packages
    
    # EDMA3 LLD
    edma3_lld_PATH = D:/TI/edma3_lld_2_12_05_29
    include $(edma3_lld_PATH)/packages/component.mk
    
    #
    # Tools paths
    #
    # Cortex-M3
    CODEGEN_PATH_M3 = /home/gtbldadm/processor-sdk-rtos-morty-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/share/ti/ti-cgt-arm
    # Cortex-M4
    CODEGEN_PATH_M4 = /home/gtbldadm/processor-sdk-rtos-morty-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/share/ti/ti-cgt-arm
    # Cortex-A8
    CODEGEN_PATH_A8 = /home/gtbldadm/processor-sdk-rtos-morty-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/share/ti/ti-cgt-arm
    # Cortex-A8 GCC
    CODEGEN_PATH_A8_GCC = /home/gtbldadm/processor-sdk-rtos-morty-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/share/ti/gcc-arm-none-eabi
    
    # Cortex-A15
    CODEGEN_PATH_A15 = /home/gtbldadm/processor-sdk-rtos-morty-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/share/ti/gcc-arm-none-eabi
    # Cortex-A15_GCC
    CODEGEN_PATH_A15_GCC = /home/gtbldadm/processor-sdk-rtos-morty-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/share/ti/gcc-arm-none-eabi
    
    # ARM-9
    CODEGEN_PATH_ARM9 = /home/gtbldadm/processor-sdk-rtos-morty-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/share/ti/ti-cgt-arm
    # ARM-9 GCC
    CODEGEN_PATH_A9_GCC = /home/gtbldadm/processor-sdk-rtos-morty-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/share/ti/gcc-arm-none-eabi
    
    # DSP - Since same toolchain does not support COFF and ELF, there are two entries
    #        This would go away when one version supports both formats
    CODEGEN_PATH_DSP = D:/TI/ti-cgt-c6000_8.1.3
    CODEGEN_PATH_DSPELF = D:/TI/ti-cgt-c6000_8.1.3
    
    # ARP32
    CODEGEN_PATH_ARP32 = $(EXTERNAL_SW_ROOT)/ARP32_1.0.2
    
    # Commands commonly used within the make files
    
    RM = $(UTILSPATH)rm
    RMDIR = $(UTILSPATH)rm -rf
    MKDIR = $(UTILSPATH)mkdir
    ECHO = @$(UTILSPATH)echo
    # MAKE = $(UTILSPATH)make
    EGREP = $(UTILSPATH)egrep
    CP = $(UTILSPATH)cp
    
    # This is to avoid using full blown cygwin - chmod is really needed only linux
    ifeq ($(OS),Windows_NT)
    CHMOD = @echo
    else
    CHMOD = $(UTILSPATH)chmod
    endif
    
    #
    # XDC specific ENV variables
    #
    
    # XDC Config.bld file (required for configuro) ; Derives from top-level omx_PATH
    CONFIG_BLD_XDC_674 = $(edma3_lld_PATH)/packages/config.bld
    CONFIG_BLD_XDC_64p = $(edma3_lld_PATH)/packages/config.bld
    CONFIG_BLD_XDC_64t = $(edma3_lld_PATH)/packages/config.bld
    CONFIG_BLD_XDC_a8 = $(edma3_lld_PATH)/packages/config.bld
    CONFIG_BLD_XDC_arm9 = $(edma3_lld_PATH)/packages/config.bld
    CONFIG_BLD_XDC_66 = $(edma3_lld_PATH)/packages/config.bld
    CONFIG_BLD_XDC_m3 = $(edma3_lld_PATH)/packages/config.bld
    CONFIG_BLD_XDC_m4 = $(edma3_lld_PATH)/packages/config.bld
    CONFIG_BLD_XDC_a15 = $(edma3_lld_PATH)/packages/config.bld
    
    XDCPATH = $(bios_PATH)/packages;$(xdc_PATH)/packages;$(edma3_lld_PATH)/packages;
    export XDCPATH
    
    XDCROOT = $(xdc_PATH)
    XDCTOOLS = $(xdc_PATH)
    export XDCROOT
    export XDCTOOLS
    
    #TMS470_CGTOOLS = $(CODEGEN_PATH_M3)
    CGTOOLS = $(CODEGEN_PATH_DSP)
    CGTOOLS_ELF = $(CODEGEN_PATH_DSPELF)
    #export TMS470_CGTOOLS
    
    #CODESOURCERYCGTOOLS = $(CODEGEN_PATH_A8)
    #export CODESOURCERYCGTOOLS
    
    # Nothing beyond this point
    

    How do I compile the library?

  • Hi,

    Can you try with gmake -f makefile_c66x libs FORMAT=ELF to see if you can rebuild?

    Regards, Eric
  • Hi, Eric!
    I tried to rebuild the library. But I never got the result. The library files (D:\TI\edma3_lld_2_12_05_29\packages\ti\sdo\edma3\rm\lib\c6678-evm\66) in directories release and debug have not changed.
    Here is my log:

    D:\TI\edma3_lld_2_12_05_29>set ROOTDIR=D:/TI/edma3_lld_2_12_05_29
    
    D:\TI\edma3_lld_2_12_05_29>set PATH=D:/TI/xdctools_3_32_02_25_core
    
    D:\TI\edma3_lld_2_12_05_29>cd packages
    
    D:\TI\edma3_lld_2_12_05_29\packages>gmake -f makefile_c66x libs FORMAT=ELF
    # Making generic/c66:debug:edma3_lld_rm: -for big_endian
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=66 PROFILE_66=debug ENDIAN=big
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Making generic/c66:release:edma3_lld_rm: -for big_endian
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=66 PROFILE_66=release ENDIAN=big
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Making generic/c66:debug:edma3_lld_rm
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=66 PROFILE_66=debug ENDIAN=little
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Making generic/c66:release:edma3_lld_rm
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=66 PROFILE_66=release ENDIAN=little
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    
    D:\TI\edma3_lld_2_12_05_29\packages>

    What am I doing wrong?

  • Hi,

    Can you do a clean then build, like gmake clean -f makefile_c66x libs FORMAT=ELF

    Regards, Eric
  • Hi,

    I thought using that command to save time by without building all the libraries. Seems there are some issue with that. Let me try and update you.

    Regards, Eric
  • Hi,

    This command (gmake clean -f makefile_c66x libs FORMAT=ELF) was cleaned, i.e. has deleted all the libraries for C66x. But the command gmake -f makefile_c66x libs FORMAT=ELF still does not build libraries.

  • Hi,

    Here is what I tried:

    C:\ti\edma3_lld_2_12_05_29\packages>set PATH=C:\TI\xdctools_3_50_03_33_core
    C:\ti\edma3_lld_2_12_05_29\packages>set ROOTDIR=c:\ti\edma3_lld_2_12_05_29
    C:\ti\edma3_lld_2_12_05_29\packages>gmake libs FORMAT=ELF

    This took hours, but I can build all the libraries.

    Also, in your SYSBIOS configuration, it should have something like this:
    var Edma = xdc.loadPackage ("ti.sdo.edma3.drv.sample");
    var drv = xdc.loadPackage ("ti.sdo.edma3.drv");
    var rm = xdc.loadPackage ("ti.sdo.edma3.rm");

    Please confirm, this determines which EDMA libraries is linked. You can check the build log or memory map file. There should also code in your application to determine which global configuration is used, such like:
    extern EDMA3_DRV_GblConfigParams sampleEdma3GblCfgParams[];

    Then the change of (allowing more EDMA channels) would be in the file edma3_lld_2_12_05_29\packages\ti\sdo\edma3\drv\sample\src\platforms\sample_c6678_cfg.c, checked the mapped file to make sure where sampleInstInitConfig[] came from.

    Regards, Eric
  • Hi Eric!

    I tried to make these actions, but nothing happened. Here is the log:

    Microsoft Windows [Version 6.1.7601]
    (c) Корпорация Майкрософт (Microsoft Corp.), 2009. Все права защищены.
    
    C:\Users\MYurkov>D:
    
    D:\>cd D:\TI\edma3_lld_2_12_05_29\packages
    
    D:\TI\edma3_lld_2_12_05_29\packages>set PATH=D:\TI\xdctools_3_32_02_25_core
    
    D:\TI\edma3_lld_2_12_05_29\packages>set ROOTDIR=D:\TI\edma3_lld_2_12_05_29
    
    D:\TI\edma3_lld_2_12_05_29\packages>gmake libs FORMAT=ELF
    # Making generic/c674:debug:edma3_lld_rm
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=674 PROFILE_674=debug
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Making generic/c674:release:edma3_lld_rm
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=674 PROFILE_674=release
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Making generic/c64p:debug:edma3_lld_rm: -for big_endian
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=64p PROFILE_64p=debug ENDIAN=big
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Making generic/c64p:release:edma3_lld_rm: -for big_endian
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=64p PROFILE_64p=release ENDIAN=big
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Making generic/c64p:debug:edma3_lld_rm
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=64p PROFILE_64p=debug ENDIAN=little
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Making generic/c64p:release:edma3_lld_rm
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=64p PROFILE_64p=release ENDIAN=little
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Making generic/c66:debug:edma3_lld_rm: -for big_endian
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=66 PROFILE_66=debug ENDIAN=big
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Making generic/c66:release:edma3_lld_rm: -for big_endian
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=66 PROFILE_66=release ENDIAN=big
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Making generic/c66:debug:edma3_lld_rm
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=66 PROFILE_66=debug ENDIAN=little
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Making generic/c66:release:edma3_lld_rm
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=66 PROFILE_66=release ENDIAN=little
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake[1]: Nothing to be done for `all'.
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Making generic/m3:debug:edma3_lld_rm
    gmake -C D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm PLATFORM=generic CORE=m3 PROFILE_m3=debug
    gmake[1]: Entering directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    # Compiling src/edma3resmgr.c to obj/generic/m3/debug/edma3resmgr.oem3 ...
    /home/gtbldadm/processor-sdk-rtos-morty-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/share/ti/ti-cgt-arm/bin/armcl  -ppd=obj/generic/m3/debug/.deps/edma3resmgr.P -c -qq -pdsw225 --endian=little -mv7M3 --abi=eabi -eo.oem3 -ea.sem3 --symdebug:dwarf   -Dxdc_target_name__=M3 -Dxdc_target_types__=ti/targets/arm/elf/std.h -Dxdc_bld__profile_debug -Dxdc_bld__vers_1_0_4_6_1 -D_DEBUG_=1  -DGENERIC   -DGENERIC -DGENERIC    -I/home/gtbldadm/processor-sdk-rtos-morty-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/share/ti/ti-cgt-arm/include -I. -I../../../.. -Isrc -fr=obj/generic/m3/debug -fs=obj/generic/m3/debug -fc src/edma3resmgr.c
    process_begin: CreateProcess(NULL, /home/gtbldadm/processor-sdk-rtos-morty-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/share/ti/ti-cgt-arm/bin/armcl -ppd=obj/generic/m3/debug/.deps/edma3resmgr.P -c -qq -pdsw225 --endian=little -mv7M3 --abi=eabi -eo.oem3 -ea.sem3 --symdebug:dwarf -Dxdc_target_name__=M3 -Dxdc_target_types__=ti/targets/arm/elf/std.h -Dxdc_bld__profile_debug -Dxdc_bld__vers_1_0_4_6_1 -D_DEBUG_=1 -DGENERIC -DGENERIC -DGENERIC -I/home/gtbldadm/processor-sdk-rtos-morty-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/share/ti/ti-cgt-arm/include -I. -I../../../.. -Isrc -fr=obj/generic/m3/debug -fs=obj/generic/m3/debug -fc src/edma3resmgr.c, ...) failed.
    make (e=2): ═х єфрхЄё  эрщЄш єърчрээ√щ Їрщы.
    gmake[1]: *** [obj/generic/m3/debug/edma3resmgr.oem3] Error 2
    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'
    gmake: *** [edma3_lld_rm_generic] Error 2
    
    D:\TI\edma3_lld_2_12_05_29\packages>

  • Hi,

    Apparently, there is some toolchain setup issue that the build broke in the beginning

    # Compiling src/edma3resmgr.c to obj/generic/m3/debug/edma3resmgr.oem3 ...

    /home/gtbldadm/processor-sdk-rtos-morty-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/share/ti/ti-cgt-arm/bin/armcl  -ppd=obj/generic/m3/debug/.deps/edma3resmgr.P -c -qq -pdsw225 --endian=little -mv7M3 --abi=eabi -eo.oem3 -ea.sem3 --symdebug:dwarf   -Dxdc_target_name__=M3 -Dxdc_target_types__=ti/targets/arm/elf/std.h -Dxdc_bld__profile_debug -Dxdc_bld__vers_1_0_4_6_1 -D_DEBUG_=1  -DGENERIC   -DGENERIC -DGENERIC    -I/home/gtbldadm/processor-sdk-rtos-morty-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/share/ti/ti-cgt-arm/include -I. -I../../../.. -Isrc -fr=obj/generic/m3/debug -fs=obj/generic/m3/debug -fc src/edma3resmgr.c

    process_begin: CreateProcess(NULL, /home/gtbldadm/processor-sdk-rtos-morty-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/share/ti/ti-cgt-arm/bin/armcl -ppd=obj/generic/m3/debug/.deps/edma3resmgr.P -c -qq -pdsw225 --endian=little -mv7M3 --abi=eabi -eo.oem3 -ea.sem3 --symdebug:dwarf -Dxdc_target_name__=M3 -Dxdc_target_types__=ti/targets/arm/elf/std.h -Dxdc_bld__profile_debug -Dxdc_bld__vers_1_0_4_6_1 -D_DEBUG_=1 -DGENERIC -DGENERIC -DGENERIC -I/home/gtbldadm/processor-sdk-rtos-morty-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/x86_64-linux/usr/share/ti/ti-cgt-arm/include -I. -I../../../.. -Isrc -fr=obj/generic/m3/debug -fs=obj/generic/m3/debug -fc src/edma3resmgr.c, ...) failed.

    make (e=2): ═х єфрхЄё  эрщЄш єърчрээ√щ Їрщы.

    gmake[1]: *** [obj/generic/m3/debug/edma3resmgr.oem3] Error 2

    gmake[1]: Leaving directory `D:/TI/edma3_lld_2_12_05_29/packages/ti/sdo/edma3/rm'

    gmake: *** [edma3_lld_rm_generic] Error 2

    Attached is my env.mk, you can refer to it. The toolset version might be different, but the build process should work.

    env.mk

    Regards, Eric

  • Hello Eric!
    Sorry for the long absence.
    I tried to compile with your file env.mk, but the error remained.
    I do not understand what the problem may be.
  • Hello!
    I did not manage to compile the EDMA3 library. What actions should I take to get the result?