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.

CCS/AM5718: EXT_DATA size issue

Part Number: AM5718

Tool/software: Code Composer Studio

Hi TI:

Our customers need to expand the size of EXT_DATA when developing DSP applications.

But after the expansion, it was found that only a part of DSP application was started.

The log of the original normal startup is as follows:

The logs that cannot be started normally after expanding memory are as follows:

config.bld/rsc_table.h:

/*
 * Copyright (c) 2013-2015, Texas Instruments Incorporated
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * *  Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * *  Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * *  Neither the name of Texas Instruments Incorporated nor the names of
 *    its contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

/*
 *  ======== config.bld ========
 *
 */
var Build = xdc.useModule('xdc.bld.BuildEnvironment');

/* Shared region definition used in app */
var evmDRA7XX_SR_0 = {
        name: "SR_0", space: "data", access: "RWX",
        base: 0xBFC00000, len: 0x100000,
        comment: "SR#0 Memory (1 MB)"
};
/*  Memory Map for ti.platforms.evmDRA7XX:dsp1
 *
 *  --- External Memory ---
 *  Virtual     Physical        Size            Comment
 *  ------------------------------------------------------------------------
 *  9500_0000   ???0_0000    40_0000  (   4 MB) EXT_CODE
 *  9540_0000   ???0_0000    30_0000  (   3 MB) EXT_HEAP
 *  9570_0000   ???0_0000    70_0000  (   7 MB) EXT_DATA
 *  9F00_0000   ???0_0000     6_0000  ( 384 kB) TRACE_BUF
 *  9F06_0000   ???6_0000     1_0000  (  64 kB) EXC_DATA
 *  9F07_0000   ???7_0000     2_0000  ( 128 kB) PM_DATA (Power mgmt)
 */
var evmDRA7XX_ExtMemMapDsp = {
    EXT_CODE: {
        name: "EXT_CODE",
        base: 0x95000000,
        len:  0x00400000,
        space: "code",
        access: "RWX"
    },
    EXT_DATA: {
        name: "EXT_DATA",
        base: 0x95700000,
        len:  0x00700000,
        space: "data",
        access: "RW"
    },
    EXT_HEAP: {
        name: "EXT_HEAP",
        base: 0x95400000,
        len:  0x00300000,
        space: "data",
        access: "RW"
    },

    TRACE_BUF: {
        name: "TRACE_BUF",
        base: 0x9F000000,
        len:  0x00060000,
        space: "data",
        access: "RW"
    },
    EXC_DATA: {
        name: "EXC_DATA",
        base: 0x9F060000,
        len:  0x00010000,
        space: "data",
        access: "RW"
    },
    PM_DATA: {
        name: "PM_DATA",
        base: 0x9F070000,
        len:  0x00020000,
        space: "data",
        access: "RWX"  /* should this have execute perm? */
    },
    VPDMA_DATA:{
        name: "VPDMA_DATA",
        base: 0x9A000000,
        len:  0x01000000,
        space: "data",
        access: "RW"  
    },    
    APP_BUF_DATA_MEM: {
		name: "APP_BUF_DATA_MEM",
        base: 0xC0000000,
        len:  0x20000000,
        space: "APP_BUF_DATA_MEM",
        access: "RW"
    },	
    SR_0: {
        name: evmDRA7XX_SR_0.name,
        base: evmDRA7XX_SR_0.base,
        len:  evmDRA7XX_SR_0.len,
        space: "data",
        access: "RW"
    }
};

Build.platformTable["ti.platforms.evmDRA7XX:dsp1"] = {
    externalMemoryMap: [
        [ "EXT_CODE", evmDRA7XX_ExtMemMapDsp.EXT_CODE ],
        [ "EXT_DATA", evmDRA7XX_ExtMemMapDsp.EXT_DATA ],
        [ "EXT_HEAP", evmDRA7XX_ExtMemMapDsp.EXT_HEAP ],
        [ "TRACE_BUF", evmDRA7XX_ExtMemMapDsp.TRACE_BUF ],
        [ "EXC_DATA", evmDRA7XX_ExtMemMapDsp.EXC_DATA ],
        [ "PM_DATA", evmDRA7XX_ExtMemMapDsp.PM_DATA ],
        [ "VPDMA_DATA", evmDRA7XX_ExtMemMapDsp.VPDMA_DATA ],
		[ "APP_BUF_DATA_MEM", evmDRA7XX_ExtMemMapDsp.APP_BUF_DATA_MEM ],
        [ evmDRA7XX_SR_0.name, evmDRA7XX_ExtMemMapDsp.SR_0 ],
    ],
    codeMemory: "EXT_CODE",
    dataMemory: "EXT_DATA",
    stackMemory: "EXT_DATA",
};


/*  Memory Map for ti.platforms.evmDRA7XX:ipu1
 *
 *  --- External Memory ---
 *  Virtual     Physical        Size            Comment
 *  ------------------------------------------------------------------------
 *  0000_4000   ???0_4000     F_C000  (  ~1 MB) EXT_CODE
 *  8000_0000   ???0_0000    20_0000  (   2 MB) EXT_DATA
 *  8020_0000   ???0_0000    30_0000  (   3 MB) EXT_HEAP
 *  9F00_0000   ???0_0000     6_0000  ( 384 kB) TRACE_BUF
 *  9F06_0000   ???6_0000     1_0000  (  64 kB) EXC_DATA
 *  9F07_0000   ???7_0000     2_0000  ( 128 kB) PM_DATA (Power mgmt)
 */
var evmDRA7XX_ExtMemMapIpu1 = {
    EXT_CODE: {
        name: "EXT_CODE",
        base: 0x00004000,
        len:  0x000FC000,
        space: "code",
        access: "RWX"
    },
    EXT_DATA: {
        name: "EXT_DATA",
        base: 0x80000000,
        len:  0x00200000,
        space: "data",
        access: "RW"
    },
    EXT_HEAP: {
        name: "EXT_HEAP",
        base: 0x80200000,
        len:  0x00300000,
        space: "data",
        access: "RW"
    },
    TRACE_BUF: {
        name: "TRACE_BUF",
        base: 0x9F000000,
        len:  0x00060000,
        space: "data",
        access: "RW"
    },
    EXC_DATA: {
        name: "EXC_DATA",
        base: 0x9F060000,
        len:  0x00010000,
        space: "data",
        access: "RW"
    },
    PM_DATA: {
        name: "PM_DATA",
        base: 0x9F070000,
        len:  0x00020000,
        space: "data",
        access: "RWX"  /* should this have execute perm? */
    },
    SR_0: {
        name: evmDRA7XX_SR_0.name,
        base: evmDRA7XX_SR_0.base,
        len:  evmDRA7XX_SR_0.len,
        space: "data",
        access: "RW"
    }
};

Build.platformTable["ti.platforms.evmDRA7XX:ipu1"] = {
    externalMemoryMap: [
        [ "EXT_CODE", evmDRA7XX_ExtMemMapIpu1.EXT_CODE ],
        [ "EXT_DATA", evmDRA7XX_ExtMemMapIpu1.EXT_DATA ],
        [ "EXT_HEAP", evmDRA7XX_ExtMemMapIpu1.EXT_HEAP ],
        [ "TRACE_BUF", evmDRA7XX_ExtMemMapIpu1.TRACE_BUF ],
        [ "EXC_DATA", evmDRA7XX_ExtMemMapIpu1.EXC_DATA ],
        [ "PM_DATA", evmDRA7XX_ExtMemMapIpu1.PM_DATA ],
        [ evmDRA7XX_SR_0.name, evmDRA7XX_ExtMemMapIpu1.SR_0 ]
    ],
    codeMemory: "EXT_CODE",
    dataMemory: "EXT_DATA",
    stackMemory: "EXT_DATA",
};

/*  Memory Map for ti.platforms.evmDRA7XX:ipu2
 *
 *  --- External Memory ---
 *  Virtual     Physical        Size            Comment
 *  ------------------------------------------------------------------------
 *  0000_4000   ????_????    5F_C000  (  ~6 MB) EXT_CODE
 *  8000_0000   ????_????    60_0000  (   6 MB) EXT_DATA
 *  8060_0000   ????_????   960_0000  (  86 MB) EXT_HEAP
 *  9F00_0000   9F00_0000     6_0000  ( 384 kB) TRACE_BUF
 *  9F06_0000   9F06_0000     1_0000  (  64 kB) EXC_DATA
 *  9F07_0000   9F07_0000     2_0000  ( 128 kB) PM_DATA (Power mgmt)
 */
var evmDRA7XX_ExtMemMapIpu2 = {
    EXT_CODE: {
        name: "EXT_CODE",
        base: 0x00004000,
        len:  0x005FC000,
        space: "code",
        access: "RWX"
    },
    EXT_DATA: {
        name: "EXT_DATA",
        base: 0x80000000,
        len:  0x00600000,
        space: "data",
        access: "RW"
    },
    EXT_HEAP: {
        name: "EXT_HEAP",
        base: 0x80600000,
        len:  0x09600000,
        space: "data",
        access: "RW"
    },
    TRACE_BUF: {
        name: "TRACE_BUF",
        base: 0x9F000000,
        len:  0x00060000,
        space: "data",
        access: "RW"
    },
    EXC_DATA: {
        name: "EXC_DATA",
        base: 0x9F060000,
        len:  0x00010000,
        space: "data",
        access: "RW"
    },
    PM_DATA: {
        name: "PM_DATA",
        base: 0x9F070000,
        len:  0x00020000,
        space: "data",
        access: "RWX"  /* should this have execute perm? */
    },
    SR_0: {
        name: evmDRA7XX_SR_0.name,
        base: evmDRA7XX_SR_0.base,
        len:  evmDRA7XX_SR_0.len,
        space: "data",
        access: "RW"
    }
};

Build.platformTable["ti.platforms.evmDRA7XX:ipu2"] = {
    externalMemoryMap: [
        [ "EXT_CODE", evmDRA7XX_ExtMemMapIpu2.EXT_CODE ],
        [ "EXT_DATA", evmDRA7XX_ExtMemMapIpu2.EXT_DATA ],
        [ "EXT_HEAP", evmDRA7XX_ExtMemMapIpu2.EXT_HEAP ],
        [ "TRACE_BUF", evmDRA7XX_ExtMemMapIpu2.TRACE_BUF ],
        [ "EXC_DATA", evmDRA7XX_ExtMemMapIpu2.EXC_DATA ],
        [ "PM_DATA", evmDRA7XX_ExtMemMapIpu2.PM_DATA ],
		[ evmDRA7XX_SR_0.name, evmDRA7XX_ExtMemMapIpu2.SR_0 ]
    ],
    codeMemory: "EXT_CODE",
    dataMemory: "EXT_DATA",
    stackMemory: "EXT_DATA",
};
7268.rsc_table.h

Memory expanded from 7M to 8M. The modification method is as follows:

The processor we use is am5718

Linux is running on A15

Linux SDK version 03.01.00.06

RTOS version 03.01.00.06

Do you have any suggestions

  • Hello,

    Please attach the Linux device tree file where you define the memory allocations.

    You said there was normal startup where the code worked fine. What do your working files look like?

    Regards,

    Nick

  • Hi Nick:

    reserved-memory {
    #address-cells = <2>;
    #size-cells = <2>;
    ranges;

    ipu2_cma_pool: ipu2_cma@95800000 {
    compatible = "shared-dma-pool";
    reg = <0x0 0x95800000 0x0 0x3800000>;
    reusable;
    status = "okay";
    };

    dsp1_cma_pool: dsp1_cma@99000000 {
    compatible = "shared-dma-pool";
    reg = <0x0 0x99000000 0x0 0x4000000>;
    reusable;
    status = "okay";
    };

    ipu1_cma_pool: ipu1_cma@9d000000 {
    compatible = "shared-dma-pool";
    reg = <0x0 0x9d000000 0x0 0x2000000>;
    reusable;
    status = "okay";
    };

    cmem_block_mem_0: cmem_block_mem@a0000000 {
    reg = <0x0 0xa0000000 0x0 0x0c000000>;
    no-map;
    status = "okay";
    };

    cmem_block_mem_1: cmem_block_mem@c0000000 {
    reg = <0x0 0xc0000000 0x0 0x20000000>;
    no-map;
    status = "okay";
    };
    };

    cmem {
    compatible = "ti,cmem";
    #address-cells = <1>;
    #size-cells = <0>;
    #pool-size-cells = <2>;
    status = "okay";

    cmem_block_0: cmem_block@0 {
    reg = <0>;
    memory-region = <&cmem_block_mem_0>;
    cmem-buf-pools = <1 0x0 0x0c000000>;
    };

    cmem_block_1: cmem_block@1 {
    reg = <1>;
    memory-region = <&cmem_block_mem_1>;
    cmem-buf-pools = <1 0x0 0x20000000>;
    };
    };

    This project is developed by the customer. The information given to us is that the abnormal startup log is different from the normal log information, so it is considered that the loading is not successful.

    Development tool is CCS

  • Is this post about the same project? https://e2e.ti.com/support/processors/f/791/t/855698

    If so, I will close this thread and we can continue the conversation on that thread.

    Regards,

    Nick

  • Yes, these two are the same project. 

  • Got it. I will continue this discussion on the thread DSP space size issue, feel free to post replies there.