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/TDA2P-ACD: Invalid Magic String in Boot Image

Part Number: TDA2P-ACD

Tool/software: TI-RTOS

Hi All,

We are working on a custom TDA2P board. While booting from SD card we are getting the following error

 UART1 pin mux complete

 TDA2Px SBL Boot

 DPLL Configuration Completed

 Clock Domain Configuration Completed

 Module Enable Configuration Completed

 TI EVM PAD Config Completed

 TDA2Px DDR Configuration

 DDR Config Completed

 App Image Download Begins

 SD Boot - file open completed successfully
Invalid Magic String in Boot Image
Invalid Magic String in Boot Image
Invalid Magic String in Boot Image
Invalid Magic String in Boot Image
Invalid Magic String in Boot Image
Invalid Magic String in Boot Image
Invalid Magic String in Boot Image

 Valid App Image is not Available

 Putting MPU CPU1 in Off mode

We have traced that the above print log comes from SBLLibRprcImageParse() in the file sbl_lib_tda2xx_platform.c .

What causes this issue?

We do not have any eeprom in the custom board.

Regards,

Deepika

  • Hi Deepika,

    SBL experts will reply here soon, meanwhile you can look at this thread for similar issue and see if it gives you some directions (the problem there was caused by different memory configuration of the custom board):
    e2e.ti.com/.../599697

    Regards,
    Yordan
  • Hi Yordan,

    We have verified previously regarding the LISA_MAP settings in the below link
    e2e.ti.com/.../780644

    As we have not used ECC,we are using EMIF1 and EMIF2 in interleaved mode.

    Regards,
    Deepika
  • Hi Deepika,

    Did you check if the app image has valid magic string "RPRC" by opening in hex editor.
    If yes I would suggest you to check endianness.
    If that is also fine I would suggest you to load SBL using CCS and then debug to see what data is actually read.

    Regards,
    Rishabh

  • Hi Rishabh,
    Yes, we checked through CCS and could see that the magic string is different than that specified in the macro SBLLIB_RPRC_MAGIC_STRING.
    What is the reason of the magic string being different ?

    Regards,
    Deepika
  • Deepika,

    What value did you read?
    Also can you add cache invalidate operation before reading to make sure you are not reading stale data.

    Regards,
    Rishabh
  • Hi Rishabh,
    Also could you let me know how to check the endianness of Appimage ?

    Regards,
    Deepika
  • Deepika,

    You should check the multicore image generation utility call to see if you are passing BE or LE.

    Regards,
    Rishabh
  • Hi Rishabh,

    For Cache Invalidate do we need to enable SBL_DEV_BUILD ?

    Regards,
    Deepika
  • Hi Deepika,

    No you don't need SBL_DEV_BUILD for cache invalidate.
    TI SBL does not enable cache and MMU for TDA2P SBL and hence does not take care of cache invalidate/write back.
    Hence if you are enabling cache in your custom code you need to take care of cache management.
    TDA3xx SBL enables cache and takes care of cache maintenance.
    Also does this issue occurs for multiple cards/boards?
    I thought there were no issues with boot as you have been work on TDA2P for a long time.
    Has anything particular changed in between?

    Regards,
    Rishabh
  • Hi Rishabh,

    Yesterday we received custom boards for a different project. DDR3 is changed in this new revision. We have two 256MB connected to each EMIF(EMIF1 and EMIF2).
    We loaded with JTAG and tried DDR test which worked fine.
    We tried SD file read/write application,that also worked but SD boot is not working. It is giving the magic string error. We tried a clean build and different SD card but issue persists.
    We have not enabled cache in the custom code for SBL.

    Regards,
    Deepika
  • Deepika,

    Can you share the LISA map configurations?
    Also can you check if DDR is stable on the new board using CCS memory browser window.

    Regards,
    Rishabh
  • #ENABLE_ECC (0U) /* Added for removing ECC as it is disabled */


    if(TDA2XX_EMIF_MODE == SBLLIB_DUAL_EMIF_2X256MB)
    {
    SBLLibPrintf(SBLLIB_TRACE_LEVEL_DEBUG,
    " Two EMIFs in interleaved mode 2X256MB(512MB total)\n");
    /* MA_LISA_MAP_i */
    HW_WR_REG32(SOC_MA_MPU_CONF_REGS_BASE + LISA_MAP_0, 0x80540300U);
    HW_WR_REG32(SOC_MA_MPU_CONF_REGS_BASE + LISA_MAP_1, 0x80540300U);
    /* DMM_LISA_MAP_i */
    HW_WR_REG32(SOC_DMM_CONF_REGS_BASE + LISA_MAP_0, 0x80540300U);
    HW_WR_REG32(SOC_DMM_CONF_REGS_BASE + LISA_MAP_1, 0x80540300U);
    }

    Regarding DDR stability we tried all the test cases in ti/csl/example/ddr/ddr_test_app the test pattern was reflected on the address when we checked through memory browser.

    REgards
    Deepika

  • Hi Rishabh,

    Through CCS we are getting the following RPRCFile header details.

    rprcFileHeader->magicStr=0

    rprcFileHeader->entryPoint=0

    rprcFileHeader->rsvdAddr=0

    rprcFileHeader->sectionCount=0

    rprcFileHeader->rsvd=0

    These readings are taken taken inside SBLLibRprcImageParse()

    Is there any issue with SBLUtilsDDRReadEdma(),which is used to read header details

    Regards,

    Deepika

  • Deepika,

    As per the LISA mapping, there is 512 MB of DDR.
    This should not create any problems in SBLUtilsDDRReadEdma().
    Using CCS can you check if the RPRC image is getting copied at SBL_LIB_APP_IMAGE_DDR_ADDRESS i.e. 0x98000000.

    Regards,
    Rishabh
  • DDR Stress Test Application
    Enter any character for User Input else wait for few secs for AutoRun Option 
    
    UART read timeout (10 sec). Enable Auto Run !!
    
    DDR test - EMIF1 
    
    ********************************************************
    Running DDR test case 1-- Full memory read/write 
    Size of DDR is 0xFFFFFFF
    dst address 0x81FFF000
    dst address 0x83FFE000
    dst address 0x85FFD000
    dst address 0x87FFC000
    dst address 0x89FFB000
    dst address 0x8BFFA000
    dst address 0x8DFF9000
    dst address 0x8FFF8000 
    DDR-- Full memory read/write test is complete 
    
    ****************************************************************
    Running DDR test case 2 -- Random memory read/write
     
     Random DDR address 0x8E738000 size :0x1000
     Random DDR address 0x8E9D5000 size :0x1000
     Random DDR address 0x8E09F000 size :0x1000
     Random DDR address 0x8EF0E000 size :0x1000
     Random DDR address 0x8F1AB000 size :0x1000
    Test count number 0x0
    Test count number 0x1 
    DDR-- Random memory read/write test is complete 
    
    ****************************************************************
    Running DDR test case 3 -- Sequential memory read/write
     
    Test count number 0x0
    Test count number 0x1
    DDR-- Sequential memory read/write test is complete 
    ==============================================================
    
    ****************************************************************
    Running DDR test case 4 -- Sequential increment pattern 
     
    Test count number 0x0
    Test count number 0x1
    DDR-- Sequential increment pattern test is complete 
    ==============================================================
    
    DDR test - EMIF2 
    
    ********************************************************
    Running DDR test case 1-- Full memory read/write 
    Size of DDR is 0xFFFFFFF
    dst address 0x91FFF000
    dst address 0x93FFE000
    dst address 0x95FFD000
    dst address 0x97FFC000
    dst address 0x99FFB000
    dst address 0x9BFFA000
    dst address 0x9DFF9000
    dst address 0x9FFF8000 
    DDR-- Full memory read/write test is complete 
    
    ****************************************************************
    Running DDR test case 2 -- Random memory read/write
     
     Random DDR address 0x8D7D5000 size :0x1000
     Random DDR address 0x8DA72000 size :0x1000
     Random DDR address 0x8DD0F000 size :0x1000
     Random DDR address 0x8D3D9000 size :0x1000
     Random DDR address 0x8D675000 size :0x1000
    Test count number 0x0
    Test count number 0x1 
    DDR-- Random memory read/write test is complete 
    
    ****************************************************************
    Running DDR test case 3 -- Sequential memory read/write
     
    Test count number 0x0
    Test count number 0x1
    DDR-- Sequential memory read/write test is complete 
    ==============================================================
    
    ****************************************************************
    Running DDR test case 4 -- Sequential increment pattern 
     
    Test count number 0x0
    Test count number 0x1
    DDR-- Sequential increment pattern test is complete 
    ==============================================================
    
    DDR Stress Test Pass
    
    
    Hi Rishabh,

    SBL_LIB_APP_IMAGE_DDR_ADDRESS  is coming 0.

    We are stucking in the function SBLUtilsConfigAllVoltageRails() when we try to load sbl_sd_opp_nom_a15_0_debug.xa15fg .

    Inside this function we have PMHALVMSetOpp(). The return value of this  is showing failure and A15 core is getting disconnected.

    Attaching ddr stress test results.

    Regards,

    Deepika

  • I suspect some PMIC related issues but not able to figure out what is the cause of this.
  • Hi Deepika,

    Can you comment out PMHALVMSetOpp and then try the boot.
    It is possible that there are multiple issues, the other issue being SBL_LIB_APP_IMAGE_DDR_ADDRESS as 0x0.

    Regards,
    Rishabh
  • Hi Rishabh,

    At the end of SBLUtilsConfigAllVoltageRails() it is calling SblUtilsMMCSDLdoPowerOn, so the control is returning before setting the MMC LDO power. We will comment that function and let you know.

    Regards,
    Deepika
  • Rishabh,

    We tried commenting PMHALVMSetOpp() we failed at the next step here

    /* Configure Ganged rails */
    for (gangNum = SBLUTILS_VD_GANG_1;
    (((gangNum <= SBLUTILS_VD_GANG_MAX) && (numVdConfigured <= vdInfoSize))
    && (retVal == PM_SUCCESS));
    gangNum++)
    {
    numGangedRails = 0;
    for (index=0; index<vdInfoSize; index++)
    {
    if (vdInfoObj[index].gangId == gangNum)
    {
    gangedVdRails[numGangedRails] = vdInfoObj[index].vdId;
    numGangedRails++;
    numVdConfigured++;
    }
    }
    if(numGangedRails != 0U)
    {
    retVal = SblUtilsConfigGangedVdRails(&gangedVdRails[0],
    numGangedRails,
    oppId);

    Regards,
    Deepika
  • Hi Deepika,

    Can you comment out the PM API calls completely i.e. API SBLUtilsConfigAllVoltageRails from SBL main and then try.

    Regards,
    Rishabh
  • Hi Rishabh,

    We tried commenting SBLUtilsConfigAllVoltageRails() . it is still stucking at Invalid Magic String.

    Regards,
    Deepika
  • Deepika,

    You can keep this API commented for now.
    Can you check why DDR address is 0x0 as mentioned in your earlier reply.

    Regards,
    Rishabh
  • Hi Rishabh,

    Can the voltage rails function SBLUtilsConfigAllVoltageRails() and the invalid magic string be related. We have never faced any such issues before. Can you suggest some points to debug. When we try loading core binaries, A15 core gives data verification error but other core are loaded properly.

    Regards,
    Deepika
  • Hi Deepika,

    Did you check why DDR_LOAD_ADDRESS is coming as 0x0?
    At this point I would not worry too much about SBLUtilsConfigAllVoltageRails.
    Voltage rails come up with default values and the App Image load should work.
    To be absolutely sure you can also try the QSPI boot on this board as MMC LDOs are not needed in that case.

    This seems to be a DDR issue. Data verification error on A15 also points to the same.
    Can you check the DDR locations where A15 binary is loaded (refer map file) and see if DDR is stable in these regions.

    Regards,
    Rishabh
  • Hi Rishabh,

    Regarding DDR_LOAD_ADDRESS as 0x0 we are trying to figure out but still clueless.
    We do have QSPI on this board.Its read write is working fine.We can check QSPI boot.
    We will confirm and let you know.
    One more query, if there is a DDR issue then DDR TEST which we load from A15 should have failed. Is my understanding correct?

    Regards,
    Deepika

  • Deepika,

    DDR test is a basic test, it is not an extensive test like memtester.
    There can be system level scenarios where the test can pass like address wrap around, etc.
    Can you please check why the DDR load address is 0x0.
    You can load SBL via CCS and then do a single step to debug this.

    Regards,
    Rishabh
  • Hi Rishabh.

    Instead of using 512 Interleaved EMIF can I try using a single EMIF1 with 256 MB?

    I tried to load SBL via CCS and then do a single step to debug this but in one file sbl_utils_tda2xx.c we are not able to put breakpoints.
    I tried adding a while loop in the above file as suggested in the link e2e.ti.com/.../2919010
    But still not able to set the breakpoint. Also tried putting breakpoint in the disassembly of the above file but not able to locate the exact failing function.

    Regards,
    Deepika
  • Hi Rishabh,

    File Loader: Verification failed: Values at address 0xBFC20000 do not match Please verify target memory and memory map.

    CortexA15_0: GEL: File: /../vision_sdk/binaries/apps/tda2px_evm_bios_all/vision_sdk/bin/tda2px-evm/vision_sdk_a15_0_debug.xa15fg: a data verification error occurred, file load failed

    This is the error while loading through CCS. Can you please let us know what is the address 0xBFC20000 because this location is beyond our memory(512MB)

    Regards,

    Deepika

  • Deepika,

    Yes you can try single EMIF with 256 MB.
    But it won't help as error is with DDR load address being 0.

    My suggestion in other thread is while(1) loop which means code cannot proceed. If you are not hitting this loop then definitely that particular portion of code is not in the execution flow.
    Can you check the execution flow.

    Regards,
    Rishabh
  • Hi Deepika,

    A15 would have a region mapped at 0xBFC20000.
    Can you check the map file.
    You can map 0xA000_0000 to 0x8000_0000 in case you have only 512 MB DDR.

    Regards,
    Rishabh
  • Hi Rishabh,

    We are not able to put breakpoint in that file itself. Even if we try putting breakpoint in disassembly it hits the while(1) loop, as we are not able to put breakpoints in this file , so we are not able to put breakpoints in the APIs called from the file sbl_utils_tda2xx.c.

    Regards,
    Deepika
  • Hi Rishabh,

    We could see this address is mapped to SR0 region in the vision_sdk_a15_0_debug.xa15fg.map file

    Memory Configuration

    Name             Origin             Length             Attributes

    SRAM             0x402f0000         0x00010000         xrw

    OCMC_RAM1        0x40300000         0x00080000

    OCMC_RAM2        0x40400000         0x00100000

    OCMC_RAM3        0x40500000         0x00100000

    IPU1_1_CODE_MEM  0x82300000         0x00200000

    IPU1_1_DATA_MEM  0x83700000         0x00900000

    IPU1_0_CODE_MEM  0x82500000         0x00a00000

    IPU1_0_DATA_MEM  0x84000000         0x00f00000

    IPU2_CODE_MEM    0x82f00000         0x00200000

    IPU2_DATA_MEM    0x84f00000         0x00500000

    DSP1_CODE_MEM    0x83100000         0x00400000

    DSP1_DATA_MEM    0x85400000         0x02f80000

    DSP1_DATA_MEM_2  0x89702000         0x00100000

    DSP2_CODE_MEM    0x83500000         0x00200000

    DSP2_DATA_MEM    0x88380000         0x00680000

    DSP2_DATA_MEM_2  0x89802000         0x00100000

    NDK_MEM          0x81f00000         0x00400000

    A15_0_DATA_MEM   0x88a00000         0x00d00000

    EVE1_VECS_MEM    0x80000000         0x00080000

    EVE1_CODE_MEM    0x80080000         0x00200000

    EVE1_DATA_MEM    0x80280000         0x00d80000

    EVE2_VECS_MEM    0x81000000         0x00080000

    EVE2_CODE_MEM    0x81080000         0x00200000

    EVE2_DATA_MEM    0x81280000         0x00c80000

    SR1_FRAME_BUFFER_MEM 0x89903000         0x15efd000

    SR1_BUFF_ECC_ASIL_MEM 0x89700000         0x00001000

    SR1_BUFF_ECC_QM_MEM 0x89701000         0x00001000

    SR1_BUFF_NON_ECC_ASIL_MEM 0x89902000         0x00001000

    SR0              0xbfc00000         0x00020000

    HDVPSS_DESC_MEM  0xbfd00000         0x00100000

    REMOTE_LOG_MEM   0xbfc20000         0x00028000

    LINK_STATS_MEM   0xbfc48000         0x00040000

    SYSTEM_IPC_SHM_MEM 0xbfc88000         0x00078000

    DSP1_L2_SRAM     0x40800000         0x00048000

    DSP2_L2_SRAM     0x41000000         0x00048000

    Regards,

    Deepika

  • Hi Deepika,

    I am not sure if I understand you correctly. When the control is in while(1) loop, you can use "Move to line" or change volatile variable using CCS and do a single step. It seems strange that this operation fails for one particular file and works for other files.

    Regards,
    Rishabh
  • Hi Deepika,

    A15 memory map clearly shows that there is a region mapped to 0xB000_0000 region.
    Did you try the A15 MMU mapping as I had suggested previously.

    Regards,
    Rishabh
  • Hi Rishabh,

    We did 3 changes as follows:

    1) We changed the LISA map from interleaved to non interleaved and kept same as 512mb.

        /* MA_LISA_MAP_i */
           HW_WR_REG32(SOC_MA_MPU_CONF_REGS_BASE + LISA_MAP_0, 0x90400200U);
           HW_WR_REG32(SOC_MA_MPU_CONF_REGS_BASE + LISA_MAP_1, 0x80400100U);
           /* DMM_LISA_MAP_i */
           HW_WR_REG32(SOC_DMM_CONF_REGS_BASE + LISA_MAP_0, 0x90400200U);
           HW_WR_REG32(SOC_DMM_CONF_REGS_BASE + LISA_MAP_1, 0x80400100U);
      

    With this change we were able to see RPRC data at 0x98000000( SBL_LIB_APP_IMAGE_DDR_ADDRESS)

    2] We checked the a15's map file, we could see some sections beyond the memory range. So, as you suggested we changed the MMU in the a15_0.cfg file. the changes are as follows"

    // descriptor attribute structure

    var attrs1 = new Mmu.DescriptorAttrs();

    Mmu.initDescAttrsMeta(attrs1);

    attrs1.type = Mmu.DescriptorType_BLOCK;    // BLOCK descriptor

    attrs1.shareable = 2;                      // sharerable

    attrs1.attrIndx = 2;                       // Cached, normal memory

    // Set the descriptor for each entry in the address range

    for (var i=0x80000000; i < 0x90000000; i = i + 0x00200000) {

       // Each 'BLOCK' descriptor entry spans a 2MB address range

       Mmu.setSecondLevelDescMeta(i, i, attrs1);

    }

    // descriptor attribute structure

    var attrs2 = new Mmu.DescriptorAttrs();

    Mmu.initDescAttrsMeta(attrs2);

    attrs2.type = Mmu.DescriptorType_BLOCK;    // BLOCK descriptor

    attrs2.shareable = 2;                      // sharerable

    attrs2.attrIndx = 0;                       // Non-cache, normal memory

    // Set the descriptor for each entry in the address range

    for (var i=0x90000000; i < 0xA0000000; i = i + 0x00200000) {

       // Each 'BLOCK' descriptor entry spans a 2MB address range

       Mmu.setSecondLevelDescMeta(i, i-0x10000000, attrs2); (changed from 0x20000000 to 0x10000000)

    }

    3] We also made one change in the mem_segment_definition_bios.xs file. We commented the DDR3_BASE_ADDR_1        = DDR3_BASE_ADDR_1+512*MB;   as this will also result in out of memory range.

    The issue we see now is , SBL is successful, but the appimage does not gets loaded. We tried to load the core binaries through CCS and could see that all cores are running but no output on console, so suspending all the cores we could see the cores are waiting for IPC to attach. Could you please let us know if the above changes are affecting the IPC ?

    Regards,

    Deepika

  • Hi Deepika,

    Glad that the SBL issue is resolved. Can you share the updated xs files for me to review the changes.
    Also I would prefer if you can start a new thread for IPC issue and mark this one as resolved.

    Regards,
    Rishabh
  • Hi Rishabh,

    Thank you for the support. Attaching the xs and cfg files for review. Please let us know your comments.

    Also marking this thread as resolved.

    /*
     *******************************************************************************
     *
     * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
     * ALL RIGHTS RESERVED
     *
     *******************************************************************************
     */
    
    /*
     *  ======== mem_segment_definition.xs ========
     *  ======== Single file for the memory map configuration of all cores =========
     */
    
    function getMemSegmentDefinition_external(core)
    {
        KB=1024;
        MB=KB*KB;
    
        DDR3_ADDR                   = 0x80000000;
        DDR3_SIZE                   = 512*MB;
    
        /*
         * In case of ECC_FFI_INCLUDE, DDR3_BASE_ADDR_1 and DDR3_BASE_SIZE_1
         * are hard-coded in as values of gIpcNonCachedDataAddr and
         * gIpcNonCachedDataSize in Ipu1_0.cfg
         * If this DDR3_BASE_SIZE_0 is changed, update  Ipu1_0.cfg
         */
        DDR3_BASE_ADDR_0            = DDR3_ADDR;
        DDR3_BASE_SIZE_0            = 508*MB;
    
        /* The start address of the second mem section should be 16MB aligned.
         * This alignment is a must as a single 16MB mapping is used for EVE
         * to map SR0, REMOTE_LOG_MEM sections.
         * tlb_config_eveX.c need to be modified otherwise
         */
        DDR3_BASE_ADDR_1            = DDR3_BASE_ADDR_0 + DDR3_BASE_SIZE_0;
        DDR3_BASE_SIZE_1            = DDR3_SIZE - DDR3_BASE_SIZE_0;
        if(core=="ipu1_1" || core=="ipu1_0" || core=="ipu2" || core=="a15_0")
        {
            /*  for ipu1_0, ipu1_1, ipu2 DDR3_BASE_ADDR_1 should be
             *  in non-cached virtual address of
             *  DDR3_BASE_ADDR_1 + 512*MB
             */
           // DDR3_BASE_ADDR_1        = DDR3_BASE_ADDR_1+512*MB;
        }
    
        DSP1_L2_SRAM_ADDR           = 0x40800000;
        DSP1_L2_SRAM_SIZE           = 288*KB;
    
        DSP2_L2_SRAM_ADDR           = 0x41000000;
        DSP2_L2_SRAM_SIZE           = 288*KB;
    
        EVE1_SRAM_ADDR              = 0x42000000;
        EVE1_SRAM_SIZE              = 1*MB;
    
        EVE2_SRAM_ADDR              = 0x42100000;
        EVE2_SRAM_SIZE              = 1*MB;
    
        TOTAL_MEM_SIZE              = (DDR3_SIZE);
    
        /* First 512 MB - cached */
        /* EVE vecs space should be align with 16MB boundary, and if possible try to fit
         * the entire vecs+code+data in 16MB section. In this case a single TLB map would
         * be enough to map vecs+code+data of an EVE.
         * tlb_config_eveX.c need to be modified if any of these EVE memory sections or
         * SR1_FRAME_BUFFER_MEM section is modified.
         */
    
        /* EVE self-branch instruction block - EVE1_VECS
         * In SBL, EVE self-branch instruction is inserted @ 0x80000000 if no AppImage for EVE.
         * This could overwrites the code/data loaded at 0x80000000.
         * So Reserving a small memory block in the beginning of the DDR @0x8000 0000 for
         * EVE self-branch instruction if no AppImage for EVE.
         * If EVE enabled, then the EVE VECS/DATA/CODE is placed @0x8000 0000,
         * and hence we did not observe any issue.
         * If EVE is disabled, then also DO NOT remove this EVE1_VECS section @0x80000000,
         * if no AppImage for EVE. This could overwrites the code/data loaded at 0x80000000
         */
    
        EVE1_VECS_SIZE              = 0.5*MB;
        EVE1_CODE_SIZE              =   2*MB;
        EVE1_DATA_SIZE              =13.5*MB;
        EVE2_VECS_SIZE              = 0.5*MB;
        EVE2_CODE_SIZE              =   2*MB;
        EVE2_DATA_SIZE              =12.5*MB;
        NDK_DATA_SIZE               =   4*MB;
        IPU1_1_CODE_SIZE            =   2*MB;
        IPU1_1_DATA_SIZE            =   9*MB;
        IPU1_0_CODE_SIZE            =  10*MB;
        IPU1_0_DATA_SIZE            =  15*MB;
        IPU2_CODE_SIZE              =   2*MB;
        IPU2_DATA_SIZE              =   5*MB;//9*MB;
        DSP1_CODE_SIZE              =   4*MB;
        DSP1_DATA_SIZE              =  47.5*MB;//12.5*MB;
        DSP1_DATA_SIZE_2            =   1*MB;
        DSP2_CODE_SIZE              =   2*MB;
        DSP2_DATA_SIZE              =  6.5*MB;//12.5*MB;
        DSP2_DATA_SIZE_2            =   1*MB;
        /* A15_0_CODE_SIZE reduced since it is not used in .bld file.
         * Check .bld for details. Originally 2 + 14 MB.
         */
        A15_0_DATA_SIZE             =  13*MB;
        if(java.lang.System.getenv("OPENCL_INCLUDE") == "yes")
        {
            A15_0_DATA_SIZE_INC     =  101*MB /* in MB */
            A15_0_DATA_SIZE         =  (A15_0_DATA_SIZE + A15_0_DATA_SIZE_INC);
        }
    
        if(java.lang.System.getenv("ECC_FFI_INCLUDE")=="yes")
        {
            /* Ensure ECC regions are 64kB aligned */
            SR1_FRAME_BUFFER_SIZE       = 285*MB;//309*MB;
            SR1_BUFF_ECC_ASIL_SIZE      =   1*MB;
            SR1_BUFF_ECC_QM_SIZE        =  40*MB;
            SR1_BUFF_NON_ECC_ASIL_SIZE  =   1*MB;
        }
        else
        {
            SR1_BUFF_ECC_ASIL_SIZE      =   4*KB;
            SR1_BUFF_ECC_QM_SIZE        =   4*KB;
            SR1_BUFF_NON_ECC_ASIL_SIZE  =   4*KB;
            SR1_FRAME_BUFFER_SIZE       = 351*MB - (SR1_BUFF_ECC_ASIL_SIZE + SR1_BUFF_ECC_QM_SIZE + SR1_BUFF_NON_ECC_ASIL_SIZE);
            if(java.lang.System.getenv("OPENCL_INCLUDE") == "yes")
            {
                SR1_FRAME_BUFFER_SIZE   = SR1_FRAME_BUFFER_SIZE - A15_0_DATA_SIZE_INC;
            }
        }
    
        /* Second 512 MB - non-cached */
        /* The start address of the second mem section should be 16MB aligned.
         * This alignment is a must as a single 16MB mapping is used for EVE
         * to map SR0, REMOTE_LOG_MEM sections.
         * tlb_config_eveX.c need to be modified otherwise
         */
        REMOTE_LOG_SIZE             =  160*KB;
        SYSTEM_IPC_SHM_SIZE         =  480*KB;
        LINK_STATS_SIZE             =  256*KB;
        HDVPSS_DESC_SIZE            = 1024*KB;
        SR0_SIZE                    =  128*KB;
        OPENVX_SHM_SIZE             =    2*MB;
    
        if((java.lang.System.getenv("OPENCL_INCLUDE") == "yes"))
        {
            /* when OpenCL is enabled we need more SR0 space
             */
            SR0_SIZE                =  2*MB;
        }
    
    
        /* Cached Section */
        /* EVE vecs space should be align with 16MB boundary, and if possible try to fit
         * the entire vecs+code+data in 16MB section. In this case a single TLB map would
         * be enough to map vecs+code+data of an EVE.
         * tlb_config_eveX.c need to be modified if any of these EVE memory sections or
         * SR1_FRAME_BUFFER_MEM section is modified.
         */
    
        /* EVE self-branch instruction block - EVE1_VECS
         * In SBL, EVE self-branch instruction is inserted @ 0x80000000 if no AppImage for EVE.
         * This could overwrites the code/data loaded at 0x80000000.
         * So Reserving a small memory block in the beginning of the DDR @0x8000 0000 for
         * EVE self-branch instruction if no AppImage for EVE.
         * If EVE enabled, then the EVE VECS/DATA/CODE is placed @0x8000 0000,
         * and hence we did not observe any issue.
         * If EVE is disabled, then also DO NOT remove this EVE1_VECS section @0x80000000,
         * if no AppImage for EVE. This could overwrites the code/data loaded at 0x80000000
         */
    
        /* Changes for ECC
         * EVE code will run only from non-ECC region
         * All code section should be next to non-ECC region (using EVE section) to
         * allow them to be easily taken out of ECC region for debugging.
         * Make sure DSP1_DATA_ADDR_2 and DSP2_DATA_ADDR_2 are immediately after
         * SR1_BUFF_ECC_QM_ADDR and should be 2*MB in total - this size should
         * be kept constant across all platforms and should match the increment
         * to heapStats.heapSize in utils_xmc_mpu.c
         */
        EVE1_VECS_ADDR             = DDR3_BASE_ADDR_0;
        EVE1_CODE_ADDR             = EVE1_VECS_ADDR             + EVE1_VECS_SIZE;
        EVE1_DATA_ADDR             = EVE1_CODE_ADDR             + EVE1_CODE_SIZE;
        EVE2_VECS_ADDR             = EVE1_DATA_ADDR             + EVE1_DATA_SIZE;
        EVE2_CODE_ADDR             = EVE2_VECS_ADDR             + EVE2_VECS_SIZE;
        EVE2_DATA_ADDR             = EVE2_CODE_ADDR             + EVE2_CODE_SIZE;
        NDK_DATA_ADDR              = EVE2_DATA_ADDR             + EVE2_DATA_SIZE;
        IPU1_1_CODE_ADDR           = NDK_DATA_ADDR              + NDK_DATA_SIZE;
        IPU1_0_CODE_ADDR           = IPU1_1_CODE_ADDR           + IPU1_1_CODE_SIZE;
        IPU2_CODE_ADDR             = IPU1_0_CODE_ADDR           + IPU1_0_CODE_SIZE;
        DSP1_CODE_ADDR             = IPU2_CODE_ADDR             + IPU2_CODE_SIZE;
        DSP2_CODE_ADDR             = DSP1_CODE_ADDR             + DSP1_CODE_SIZE;
        IPU1_1_DATA_ADDR           = DSP2_CODE_ADDR             + DSP2_CODE_SIZE;
        IPU1_0_DATA_ADDR           = IPU1_1_DATA_ADDR           + IPU1_1_DATA_SIZE;
        IPU2_DATA_ADDR             = IPU1_0_DATA_ADDR           + IPU1_0_DATA_SIZE;
        DSP1_DATA_ADDR             = IPU2_DATA_ADDR             + IPU2_DATA_SIZE;
        DSP2_DATA_ADDR             = DSP1_DATA_ADDR             + DSP1_DATA_SIZE;
        A15_0_DATA_ADDR            = DSP2_DATA_ADDR             + DSP2_DATA_SIZE;
        SR1_BUFF_ECC_ASIL_ADDR     = A15_0_DATA_ADDR            + A15_0_DATA_SIZE;
        SR1_BUFF_ECC_QM_ADDR       = SR1_BUFF_ECC_ASIL_ADDR     + SR1_BUFF_ECC_ASIL_SIZE;
        DSP1_DATA_ADDR_2           = SR1_BUFF_ECC_QM_ADDR       + SR1_BUFF_ECC_QM_SIZE;
        DSP2_DATA_ADDR_2           = DSP1_DATA_ADDR_2           + DSP1_DATA_SIZE_2;
        SR1_BUFF_NON_ECC_ASIL_ADDR = DSP2_DATA_ADDR_2           + DSP2_DATA_SIZE_2;
        SR1_FRAME_BUFFER_ADDR      = SR1_BUFF_NON_ECC_ASIL_ADDR + SR1_BUFF_NON_ECC_ASIL_SIZE;
    
        /* Non Cached Section */
        /* The start address of the second mem section should be 16MB aligned.
         * This alignment is a must as a single 16MB mapping is used for EVE
         * to map SR0, REMOTE_LOG_MEM sections.
         * tlb_config_eveX.c need to be modified otherwise
         */
        SR0_ADDR                    = DDR3_BASE_ADDR_1;
        REMOTE_LOG_ADDR             = SR0_ADDR              + SR0_SIZE;
        LINK_STATS_ADDR             = REMOTE_LOG_ADDR       + REMOTE_LOG_SIZE;
        SYSTEM_IPC_SHM_ADDR         = LINK_STATS_ADDR       + LINK_STATS_SIZE;
        HDVPSS_DESC_ADDR            = SYSTEM_IPC_SHM_ADDR   + SYSTEM_IPC_SHM_SIZE;
        OPENVX_SHM_ADDR             = HDVPSS_DESC_ADDR      + HDVPSS_DESC_SIZE;
    
        if ((SR1_FRAME_BUFFER_ADDR + SR1_FRAME_BUFFER_SIZE) > (DDR3_BASE_ADDR_0 + DDR3_BASE_SIZE_0))
        {
          throw xdc.$$XDCException("MEMORY_MAP OVERFLOW ERROR ",
                                   "\nRegion End: " + "0x" + java.lang.Long.toHexString(DDR3_BASE_ADDR_0 + DDR3_BASE_SIZE_0) +
                                   "\nActual End: " + "0x" + java.lang.Long.toHexString(SR1_FRAME_BUFFER_ADDR + SR1_FRAME_BUFFER_SIZE));
        }
    
        if(java.lang.System.getenv("OPENVX_INCLUDE")=="yes")
        {
            if ((OPENVX_SHM_ADDR + OPENVX_SHM_SIZE) > (DDR3_BASE_ADDR_1 + DDR3_BASE_SIZE_1))
            {
                throw xdc.$$XDCException("MEMORY_MAP OVERFLOW ERROR with OpenVx",
                                   "\nRegion End: " + "0x" + java.lang.Long.toHexString(DDR3_BASE_ADDR_1 + DDR3_BASE_SIZE_1) +
                                   "\nActual End: " + "0x" + java.lang.Long.toHexString(OPENVX_SHM_ADDR + OPENVX_SHM_SIZE));
            }
        }
        else
        {
            if ((HDVPSS_DESC_ADDR + HDVPSS_DESC_SIZE) > (DDR3_BASE_ADDR_1 + DDR3_BASE_SIZE_1))
            {
                throw xdc.$$XDCException("MEMORY_MAP OVERFLOW ERROR",
                                   "\nRegion End: " + "0x" + java.lang.Long.toHexString(DDR3_BASE_ADDR_1 + DDR3_BASE_SIZE_1) +
                                   "\nActual End: " + "0x" + java.lang.Long.toHexString(HDVPSS_DESC_ADDR + HDVPSS_DESC_SIZE));
            }
        }
    
        if ((DDR3_BASE_SIZE_1 + DDR3_BASE_SIZE_0) > (TOTAL_MEM_SIZE))
        {
          throw xdc.$$XDCException("MEMORY_MAP EXCEEDS DDR SIZE ERROR ",
                                   "\nRegion End: " + "0x" + java.lang.Long.toHexString(DDR3_BASE_SIZE_1 + DDR3_BASE_SIZE_0) +
                                   "\nActual End: " + "0x" + java.lang.Long.toHexString(TOTAL_MEM_SIZE));
        }
    
        var memory = new Array();
        var index = 0;
    
        memory[index++] = ["IPU1_1_CODE_MEM", {
                comment : "IPU1_1_CODE_MEM",
                name    : "IPU1_1_CODE_MEM",
                base    : IPU1_1_CODE_ADDR,
                len     : IPU1_1_CODE_SIZE
            }];
        memory[index++] = ["IPU1_1_DATA_MEM", {
                comment : "IPU1_1_DATA_MEM",
                name    : "IPU1_1_DATA_MEM",
                base    : IPU1_1_DATA_ADDR,
                len     : IPU1_1_DATA_SIZE
            }];
        memory[index++] = ["IPU1_0_CODE_MEM", {
                comment : "IPU1_0_CODE_MEM",
                name    : "IPU1_0_CODE_MEM",
                base    : IPU1_0_CODE_ADDR,
                len     : IPU1_0_CODE_SIZE
            }];
        memory[index++] = ["IPU1_0_DATA_MEM", {
                comment : "IPU1_0_DATA_MEM",
                name    : "IPU1_0_DATA_MEM",
                base    : IPU1_0_DATA_ADDR,
                len     : IPU1_0_DATA_SIZE
            }];
        memory[index++] = ["IPU2_CODE_MEM", {
                comment : "IPU2_CODE_MEM",
                name    : "IPU2_CODE_MEM",
                base    : IPU2_CODE_ADDR,
                len     : IPU2_CODE_SIZE
            }];
        memory[index++] = ["IPU2_DATA_MEM", {
                comment : "IPU2_DATA_MEM",
                name    : "IPU2_DATA_MEM",
                base    : IPU2_DATA_ADDR,
                len     : IPU2_DATA_SIZE
            }];
        memory[index++] = ["DSP1_CODE_MEM", {
                comment : "DSP1_CODE_MEM",
                name    : "DSP1_CODE_MEM",
                base    : DSP1_CODE_ADDR,
                len     : DSP1_CODE_SIZE
            }];
        memory[index++] = ["DSP1_DATA_MEM", {
                comment : "DSP1_DATA_MEM",
                name    : "DSP1_DATA_MEM",
                base    : DSP1_DATA_ADDR,
                len     : DSP1_DATA_SIZE
            }];
        memory[index++] = ["DSP1_DATA_MEM_2", {
                comment : "DSP1_DATA_MEM_2",
                name    : "DSP1_DATA_MEM_2",
                base    : DSP1_DATA_ADDR_2,
                len     : DSP1_DATA_SIZE_2
            }];
    
        memory[index++] = ["DSP2_CODE_MEM", {
                comment : "DSP2_CODE_MEM",
                name    : "DSP2_CODE_MEM",
                base    : DSP2_CODE_ADDR,
                len     : DSP2_CODE_SIZE
            }];
        memory[index++] = ["DSP2_DATA_MEM", {
                comment : "DSP2_DATA_MEM",
                name    : "DSP2_DATA_MEM",
                base    : DSP2_DATA_ADDR,
                len     : DSP2_DATA_SIZE
            }];
        memory[index++] = ["DSP2_DATA_MEM_2", {
                comment : "DSP2_DATA_MEM_2",
                name    : "DSP2_DATA_MEM_2",
                base    : DSP2_DATA_ADDR_2,
                len     : DSP2_DATA_SIZE_2
            }];
    
        memory[index++] = ["NDK_MEM", {
                comment : "NDK_MEM",
                name    : "NDK_MEM",
                base    : NDK_DATA_ADDR,
                len     : NDK_DATA_SIZE
            }];
        memory[index++] = ["A15_0_DATA_MEM", {
                comment : "A15_0_DATA_MEM",
                name    : "A15_0_DATA_MEM",
                base    : A15_0_DATA_ADDR,
                len     : A15_0_DATA_SIZE
            }];
    
        memory[index++] = ["EVE1_VECS_MEM", {
                comment : "EVE1_VECS_MEM",
                name    : "EVE1_VECS_MEM",
                base    : EVE1_VECS_ADDR,
                len     : EVE1_VECS_SIZE
            }];
        memory[index++] = ["EVE1_CODE_MEM", {
                comment : "EVE1_CODE_MEM",
                name    : "EVE1_CODE_MEM",
                base    : EVE1_CODE_ADDR,
                len     : EVE1_CODE_SIZE
            }];
        memory[index++] = ["EVE1_DATA_MEM", {
                comment : "EVE1_DATA_MEM",
                name    : "EVE1_DATA_MEM",
                base    : EVE1_DATA_ADDR,
                len     : EVE1_DATA_SIZE
            }];
        memory[index++] = ["EVE2_VECS_MEM", {
                comment : "EVE2_VECS_MEM",
                name    : "EVE2_VECS_MEM",
                base    : EVE2_VECS_ADDR,
                len     : EVE2_VECS_SIZE
            }];
        memory[index++] = ["EVE2_CODE_MEM", {
                comment : "EVE2_CODE_MEM",
                name    : "EVE2_CODE_MEM",
                base    : EVE2_CODE_ADDR,
                len     : EVE2_CODE_SIZE
            }];
        memory[index++] = ["EVE2_DATA_MEM", {
                comment : "EVE2_DATA_MEM",
                name    : "EVE2_DATA_MEM",
                base    : EVE2_DATA_ADDR,
                len     : EVE2_DATA_SIZE
            }];
        memory[index++] = ["SR1_FRAME_BUFFER_MEM", {
                comment : "SR1_FRAME_BUFFER_MEM",
                name    : "SR1_FRAME_BUFFER_MEM",
                base    : SR1_FRAME_BUFFER_ADDR,
                len     : SR1_FRAME_BUFFER_SIZE
            }];
        memory[index++] = ["SR1_BUFF_ECC_ASIL_MEM", {
                comment : "SR1_BUFF_ECC_ASIL_MEM",
                name    : "SR1_BUFF_ECC_ASIL_MEM",
                base    : SR1_BUFF_ECC_ASIL_ADDR,
                len     : SR1_BUFF_ECC_ASIL_SIZE
        }];
        memory[index++] = ["SR1_BUFF_ECC_QM_MEM", {
                comment : "SR1_BUFF_ECC_QM_MEM",
                name    : "SR1_BUFF_ECC_QM_MEM",
                base    : SR1_BUFF_ECC_QM_ADDR,
                len     : SR1_BUFF_ECC_QM_SIZE
        }];
        memory[index++] = ["SR1_BUFF_NON_ECC_ASIL_MEM", {
                comment : "SR1_BUFF_NON_ECC_ASIL_MEM",
                name    : "SR1_BUFF_NON_ECC_ASIL_MEM",
                base    : SR1_BUFF_NON_ECC_ASIL_ADDR,
                len     : SR1_BUFF_NON_ECC_ASIL_SIZE
        }];
        memory[index++] = ["SR0", {
                comment : "SR0",
                name    : "SR0",
                base    : SR0_ADDR,
                len     : SR0_SIZE
            }];
        memory[index++] = ["HDVPSS_DESC_MEM", {
                comment : "HDVPSS_DESC_MEM",
                name    : "HDVPSS_DESC_MEM",
                base    : HDVPSS_DESC_ADDR,
                len     : HDVPSS_DESC_SIZE
            }];
        memory[index++] = ["REMOTE_LOG_MEM", {
                comment : "REMOTE_LOG_MEM",
                name    : "REMOTE_LOG_MEM",
                base    : REMOTE_LOG_ADDR,
                len     : REMOTE_LOG_SIZE
            }];
        memory[index++] = ["LINK_STATS_MEM", {
                comment : "LINK_STATS_MEM",
                name    : "LINK_STATS_MEM",
                base    : LINK_STATS_ADDR,
                len     : LINK_STATS_SIZE
            }];
        memory[index++] = ["SYSTEM_IPC_SHM_MEM", {
                comment : "SYSTEM_IPC_SHM_MEM",
                name    : "SYSTEM_IPC_SHM_MEM",
                base    : SYSTEM_IPC_SHM_ADDR,
                len     : SYSTEM_IPC_SHM_SIZE
            }];
    
        xdc.print("# !!! Core is [" + core + "] !!!" );
    
        memory[index++] = ["DSP1_L2_SRAM", {
                comment: "DSP1_L2_SRAM",
                name: "DSP1_L2_SRAM",
                base: DSP1_L2_SRAM_ADDR,
                len:  DSP1_L2_SRAM_SIZE
            }];
        memory[index++] = ["DSP2_L2_SRAM", {
                comment: "DSP2_L2_SRAM",
                name: "DSP2_L2_SRAM",
                base: DSP2_L2_SRAM_ADDR,
                len:  DSP2_L2_SRAM_SIZE
            }];
    
    if(java.lang.System.getenv("OPENCL_INCLUDE") == "yes")
    {
    /* This is a dummy section needed for OpenCL */
            L1DSRAM_ADDR = 0x00F00000;
            L1DSRAM_SIZE = 0x00008000;
            OCL_LOCAL_ADDR = 0x0083B000;
            OCL_LOCAL_SIZE = 0x00004000;
            memory[index++] = ["L1DSRAM", {
                comment: "L1DSRAM",
                name: "L1DSRAM",
                base: L1DSRAM_ADDR,
                len:  L1DSRAM_SIZE
            }];
    
    }
    
        if(java.lang.System.getenv("OPENVX_INCLUDE")=="yes")
        {
            memory[index++] = ["OPENVX_SHM_MEM", {
                    comment: "OPENVX_SHM_MEM",
                    name: "OPENVX_SHM_MEM",
                    base: OPENVX_SHM_ADDR,
                   len:  OPENVX_SHM_SIZE
            }];
        }
    
        return (memory);
    }
    
    

    /*******************************************************************************
    *  file name: a15_0.cfg
    *  Set A15 core 0 specific configuration
    *
    *******************************************************************************/
    
    var CurrentPlatform = java.lang.System.getenv("PLATFORM");
    var DualA15_smpbios = java.lang.System.getenv("DUAL_A15_SMP_BIOS");
    var OpenCL = java.lang.System.getenv("OPENCL_INCLUDE");
    var OpenCV = java.lang.System.getenv("ENABLE_OPENCV");
    
    xdc.print("# !!! Current build platform is [" + CurrentPlatform + "] !!!" );
    
    xdc.loadPackage('ti.sysbios').profile = "release";
    xdc.loadCapsule("src/rtos/bios_app_common/tda2px/cfg/BIOS_common.cfg");
    
    /* root of the configuration object model */
    var Program = xdc.useModule('xdc.cfg.Program');
    
    xdc.useModule('ti.sysbios.gates.GateHwi');
    var BIOS = xdc.useModule('ti.sysbios.BIOS');
    if(OpenCL=="yes")
    {
    var SecondsClock = xdc.useModule('ti.sysbios.hal.SecondsClock');
    }
    
    BIOS.cpuFreq.hi = 0;
    BIOS.cpuFreq.lo = 750000000; /* 750 MHz */
    
    if(DualA15_smpbios=="yes")
    {
       BIOS.smpEnabled = true;
    }
    else
    {
       BIOS.smpEnabled = false;
    }
    
    /*
     *  ======== IPC Configuration ========
     */
    Program.global.procName = "HOST";
    xdc.loadCapsule("src/rtos/bios_app_common/tda2px/cfg/IPC_common.cfg");
    
    
    var NdkProcToUse = java.lang.System.getenv("NDK_PROC_TO_USE");
    
    if(NdkProcToUse=="a15_0")
    {
       xdc.print("# !!! Linking to NDK !!!" );
       xdc.loadCapsule("src/rtos/bios_app_common/tda2px/cfg/NDK_config.cfg");
    }
    
    /*
     *  ======== Operating System Configuration ========
     */
    
    /* no rts heap */
    Program.heap = 0;
    Program.argSize = 100;  /* minimum size */
    if(OpenCL=="yes")
    {
        Program.stack = 0x4000;
    }
    else
    {
        Program.stack = 0x4000;
    }
    
    /* create a default heap */
    var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
    var heapMemParams = new HeapMem.Params();
    if(OpenCL=="yes")
    {
        heapMemParams.size = 0x6000000;
    }
    else
    {
        heapMemParams.size = 0x600000;
    }
    
    var Memory = xdc.useModule('xdc.runtime.Memory');
    Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
    if(OpenCL=="yes")
    {
        Memory.defaultHeapSize = 0x6000000;
    }
    
    /* Enable Cache */
    if(DualA15_smpbios=="yes")
    {
       var Cache = xdc.useModule('ti.sysbios.family.arm.a15.smp.Cache');
    }
    else
    {
       var Cache = xdc.useModule('ti.sysbios.family.arm.a15.Cache');
    }
    Cache.enableCache = true;
    
    /***********************************************
     *              MMU Configuration              *
     ***********************************************/
    var Mmu = xdc.useModule('ti.sysbios.family.arm.a15.Mmu');
    Mmu.enableMMU = true;
    
    /******************************************************************************
     *
     * SYS/BIOS assigns the following defaults to MAIR0 ATTR0, ATTR1 and ATTR2:
     *
     * ATTR0 -> 0x44 (mark memory region as non-cacheable normal memory)
     * ATTR1 -> 0x00 (mark memory region as device memory, i.e. strongly
     * ordered and non-cacheable)
     * ATTR2 -> 0xFF (mark memory region as normal memory, RW cacheable and
     * RW allocate)
     ******************************************************************************
     */
    
    
    
    // descriptor attribute structure
    var attrs0 = new Mmu.DescriptorAttrs();
    
    Mmu.initDescAttrsMeta(attrs0);
    
    attrs0.type = Mmu.DescriptorType_BLOCK;    // BLOCK descriptor
    attrs0.noExecute = true;                   // not executable
    attrs0.accPerm = 0;                        // read/write at PL1
    attrs0.shareable = 2;                      // shareable
    attrs0.attrIndx = 1;                       // strongly ordered and non-cacheable
    
    // Set the descriptor for each entry in the address range
    // NOTE: Currently mapping all region as non-cacheable, device memory.
    //If in future application want to use OCMC memories it needs to remove corresponding MMU entries from below and make it cacheable.
    for (var i=0x40000000; i < 0x60000000; i = i + 0x00200000) {
        // Each 'BLOCK' descriptor entry spans a 2MB address range
        Mmu.setSecondLevelDescMeta(i, i, attrs0);
    }
    
    // descriptor attribute structure
    var attrs1 = new Mmu.DescriptorAttrs();
    
    Mmu.initDescAttrsMeta(attrs1);
    attrs1.type = Mmu.DescriptorType_BLOCK;    // BLOCK descriptor
    attrs1.shareable = 2;                      // sharerable
    attrs1.attrIndx = 2;                       // Cached, normal memory
    
    // Set the descriptor for each entry in the address range
    for (var i=0x80000000; i < 0x90000000; i = i + 0x00200000) {
        // Each 'BLOCK' descriptor entry spans a 2MB address range
        Mmu.setSecondLevelDescMeta(i, i, attrs1);
    }
    
    // descriptor attribute structure
    var attrs2 = new Mmu.DescriptorAttrs();
    
    Mmu.initDescAttrsMeta(attrs2);
    attrs2.type = Mmu.DescriptorType_BLOCK;    // BLOCK descriptor
    attrs2.shareable = 2;                      // sharerable
    attrs2.attrIndx = 0;                       // Non-cache, normal memory
    
    // Set the descriptor for each entry in the address range
    for (var i=0x90000000; i < 0xA0000000; i = i + 0x00200000) {
        // Each 'BLOCK' descriptor entry spans a 2MB address range
        Mmu.setSecondLevelDescMeta(i, i-0x10000000, attrs2);
    }
    
    // Region for NDK packet data buffers.
    for (var i = 0; i < Program.cpu.memoryMap.length; i++)
    {
        memSegment = Program.cpu.memoryMap[i];
        if (memSegment.name == "NDK_MEM")
        {
            var attrs3 = new Mmu.DescriptorAttrs();
            Mmu.initDescAttrsMeta(attrs3);
            attrs3.type = Mmu.DescriptorType_BLOCK;    // BLOCK descriptor
            attrs3.noExecute = true;                   // not executable
            attrs3.shareable = 2;                      // shareable
            attrs3.accPerm = 0;                        // read/write at PL1
            attrs3.attrIndx = 2;                       // Mark mem regions as cached, normal memory
    
            // Set the descriptor for each entry in the address range
            for (var j=memSegment.base; j < (memSegment.base + memSegment.len); j = j + 0x00200000)
            {
                // Each 'BLOCK' descriptor entry spans a 2MB address range
                Mmu.setSecondLevelDescMeta(j, j, attrs3);
            }
        }
    }
    
    /* .text is allocated as per "codeMemory" defined in .bld file.
     * .data, .stack, .bss, .sysmem, etc are allocated as per
     * "dataMemory" defined in .bld file */
    Program.sectMap[".bss:extMemNonCache:remoteLogCoreShm"] = "REMOTE_LOG_MEM";
    Program.sectMap[".bss:extMemNonCache:hcfResourceTable"] = "REMOTE_LOG_MEM";
    Program.sectMap[".bss:extMemNonCache:ipcShm"]           = "SYSTEM_IPC_SHM_MEM";
    Program.sectMap[".bss:extMemNonCache:linkStats"]        = "LINK_STATS_MEM";
    if (java.lang.System.getenv("OPENVX_INCLUDE") == "yes")
    {
        Program.sectMap[".bss:extMemNonCache:tiovxObjDescShm"] = "OPENVX_SHM_MEM";
    }
    
    Program.sectMap[".bss:NDK_PACKETMEM"]                   = "NDK_MEM";
    Program.sectMap[".bss:NDK_MMBUFFER"]                    = "NDK_MEM";
    
    var InitXbar    = xdc.useModule("ti.sysbios.family.shared.vayu.IntXbar");
    
    
    /* Exception hook function */
    var ExceptionA15 = xdc.useModule('ti.sysbios.family.arm.exc.Exception');
    
    /* enable print of exception handing info */
    ExceptionA15.excHookFunc ='&Utils_a15ExceptionHookFxn';
    ExceptionA15.enableDecode=true;
    
    /* XDC runtime function */
    var Error = xdc.useModule("xdc.runtime.Error");
    Error.raiseHook = "&Utils_commonErrorRaiseHook";
    
    /* Add an idle thread 'Utils_idleFxn' that monitors interrupts. */
    var Idle = xdc.useModule("ti.sysbios.knl.Idle");
    
    if (DualA15_smpbios == "yes")
    {
        Idle.addCoreFunc('&Utils_idleFxn', 0);
        Idle.addCoreFunc('&Utils_idleFxn', 1);
    }
    else
    {
        Idle.addFunc('&Utils_idleFxn');
    }
    
    /* Assign GPTimer2 to be used for BIOS Clock 1-ms tick */
    /***********************************************
     *          CLOCK Module Configuraion          *
     ***********************************************/
    var Clock = xdc.useModule("ti.sysbios.knl.Clock");
    
    if(OpenCL=="yes")
    {
        Clock.tickMode = Clock.TickMode_PERIODIC;
    }
    else
    {
        Clock.tickMode = Clock.TickMode_PERIODIC;
        Clock.tickSource = Clock.TickSource_USER;
    }
    
    /***********************************************
    *           Timer Module Configuraion         *
    ***********************************************/
    /* Assign GPTimer2 to be used for Timestamp */
    /* Set to 1-ms Tick and Enable Wakeup for OVF interrupt */
    var Timer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');
    var timerParams = new Timer.Params();
    timerParams.period = 1000;
    timerParams.twer.ovf_wup_ena = 1;
    timerParams.tiocpCfg.emufree = 1;
    timerParams.tsicr.posted = 0;
    /* Timer ID = 1 for GPTimer2 and input clock runs at 20 MHz */
    Timer.intFreqs[1].hi = 0;
    Timer.intFreqs[1].lo = 20000000;
    Timer.create(1, '&mainA15TimerTick', timerParams);
    
    /* Assign GPTimer3 to be used for Timestamp */
    /* Timer ID = 2 for GPTimer3 and input clock runs at 20 MHz */
    var DMTimer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');
    var timerParams2 = new DMTimer.Params();
    timerParams2.tsicr.posted = 0;
    DMTimer.intFreqs[2].hi = 0;
    DMTimer.intFreqs[2].lo = 20000000;
    var DMTimestampProvider = xdc.useModule("ti.sysbios.timers.dmtimer.TimestampProvider");
    DMTimestampProvider.timerId = 2;
    DMTimestampProvider.useClockTimer = false;
    var Timestamp = xdc.useModule("xdc.runtime.Timestamp");
    Timestamp.SupportProxy = DMTimestampProvider;
    
    /* Indicate GPT2 & GPT3 are used */
    var TimerSupport = xdc.useModule('ti.sysbios.family.shared.vayu.TimerSupport');
    TimerSupport.availMask = 0x0006;
    
    /* In order to check how much percentange of Idle time the CPU is in Low power */
    var LocalTimestampProvider = xdc.useModule('ti.sysbios.family.arm.a15.TimestampProvider');
    
    /* Add POSIX Support */
    if(OpenCV=="yes")
    {
        var Settings = xdc.useModule('ti.sysbios.posix.Settings');
        Settings.supportsMutexPriority = true;
    }
    
    if(OpenCL=="yes")
    {
        var Settings = xdc.useModule('ti.sysbios.posix.Settings');
        Settings.supportsMutexPriority = true;
        xdc.global.oclProcName = "HOST";
        var OCL = xdc.useModule('ti.opencl.OpenCL');
        OCL.computeUnitList = "0";
        OCL.OCL_ipc_customized = true;
        OCL.OCL_memory_customized =true;
        OCL.OCL_HOSTPROG_base = Program.cpu.memoryMap["A15_0_DATA_MEM"].base;
        OCL.OCL_HOSTPROG_len  = Program.cpu.memoryMap["SR1_FRAME_BUFFER_MEM"].base - Program.cpu.memoryMap["A15_0_DATA_MEM"].base
                                + Program.cpu.memoryMap["SR1_FRAME_BUFFER_MEM"].len;
        OCL.OCL_GLOBAL_base   = Program.cpu.memoryMap["EVE2_CODE_MEM"].base;
        OCL.OCL_GLOBAL_len    = Program.cpu.memoryMap["EVE2_CODE_MEM"].len;
        OCL.OCL_LOCAL_base    = Program.cpu.memoryMap["OCMC_RAM2"].base;
        OCL.OCL_LOCAL_len     = Program.cpu.memoryMap["OCMC_RAM2"].len;
    }
    

    Regards,

    Deepika