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.

Don't know how to set the address (origine) of MEMORY segments with xdc.cfg.Program

Hello,

I'm using xdc and I want to speed up the load process to the target board. I have read this post and found excellent hints:

http://e2e.ti.com/support/microcontrollers/tms570/f/312/p/103218/368255.aspx#368255

 

But I don't know how to configure the tool in order to have the auto-generated .xdl as I want. The tool generated this:

MEMORY
{
FLASH (RX) : org = 0x0, len = 0x200000
IRAM (RWX) : org = 0x8000000, len = 0x28000
}

But according to the post, I have to set IRAM in a different way.

In the .cfg file, I can map the segments without problem with this code:

//For instance.

Program.sectMap[".init_array"] = new Program.SectionSpec();
Program.sectMap[".init_array"].loadSegment = Program.platform.dataMemory;

And then .init_array for instance is place into IRAM. But I cannot control the address of IRAM.

Which js code I have to use in order to do that?

In the help, I found this code:

      [
            "IRAM",
            {
                comment: "64KB IRAM",
                name: "IRAM",
                base: 0x20000000,
                len: 0x00010000
            }
        ]
    ];


 But It doesn't compile, IPlatform isn't recognized.

 

Simon