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/TMDSICE3359: Specifying memory sections in the ICSS examples

Part Number: TMDSICE3359
Other Parts Discussed in Thread: AM3359

Tool/software: Code Composer Studio

I am looking at the NIMU ICSS examples for the AM3359 ICEv2 board. I have a question about the memory sections.

In the configPkg/linker.cmd file, the following sections are defined:

MEMORY
{
    SRAM_LO (RWX) : org = 0x402f0000, len = 0x400
    SRAM_HI (RWX) : org = 0x402f0400, len = 0xfc00
    OCMC_SRAM (RWX) : org = 0x40300000, len = 0x10000
    APP_CODE_MEM : org = 0x80000000, len = 0x200000
    APP_CACHED_DATA_BLK0_MEM : org = 0x80200000, len = 0x100000
    APP_CACHED_DATA_MEM : org = 0x80300000, len = 0x1400000
    APP_UNCACHED_DATA_BLK3_MEM : org = 0xa0000000, len = 0x200000
    APP_CACHED_DATA_BLK1_MEM : org = 0x81700000, len = 0xf400000
    APP_CACHED_DATA_BLK2_MEM : org = 0x90b00000, len = 0x8000000
}

The APP_CACHED_DATA_BLK0_MEM section is used by the /ti/build/pruss/lnk_a8_a9_a15_REV1.cmd linker command file (in the PDK) in order to presumably place the PRU firmware into cached memory.

However I cannot see anywhere in the project where these sections are defined. Specifically, in the cclink_icev2AM335x.cfg file and the am335x_app_icev2_wSoCLib.cfg files,  the is nothing about memory sections other than the "normal" c_int00 section:

/* Aligning c_int00 section to default start address 0x80000000 */
Program.sectMap[".c_int00"] = new Program.SectionSpec();
Program.sectMap[".c_int00"].loadAddress = 0x80000000

I also do not see where the sections are specified to be cached, as the name implies.

It seems these come from some kind of platform definition, but I can't see anything in the evmAM3359 platform that defines these "CACHED" sections instead of the "normal" DDR3 section.

How are these sections specified in these projects such that they end up in the configPkg/linker.cmd file?

  • The answer is it's the packages/ti/build/am335x/config_am335x_a8.bld file which is included onto the xs command line by the "build configuration file" parameter in project settings (CCS Build > XDCTools > Advanced Options).

    It is passed to xs using the -b parameter.

    This file (which is not used by all the demo projects) defines the sections like this:

    +-----------------------------+
    | APP_CODE_MEM                | 2MB
    +-----------------------------+
    | APP_CACHED_DATA_BLK0_MEM    | 1MB
    +-----------------------------+
    | APP_CACHED_DATA_MEM         | 20MB
    +-----------------------------+
    | APP_CACHED_DATA_BLK1_MEM    | 244MB
    +-----------------------------+
    | APP_CACHED_DATA_BLK2_MEM    | 128MB
    +-----------------------------+
    | NOT USED                    | Remaining MB
    +-----------------------------+
    
    DDR: 0xA0000000 (2nd 512MB - Non-Cached)
    +-----------------------------+
    |                             |
    | APP_UNCACHED_DATA_BLK3_MEM  | 2MB
    +-----------------------------+
    |     NOT USED                | Remaining MB
    +-----------------------------+