Resize DDR3 section and add custom section in SYS/BIOS projects

From DSignT Support Database
Jump to: navigation, search

To resize and relocate the default DDR3 RAM to base addres 0x80100000 and size 0xff00000 insert the following lines to your SYS/BIOS configuration file (e.g. app.cfg):

// section to detect and change DDR3 RAM
var memmap = Program.cpu.memoryMap;
// Find DDR3 in memory map
for (var i=0; i < memmap.length; i++)
    if (memmap[i].name == "DDR3")
        memmap[i].len=  0xff00000;
        print("DDR3 base/length was changed");

Create a new linker command file in your application directory (e.g. custom.cmd) and insert these lines:

    DDR3_MY (RWX)    : org = 0x80000000, len = 0x100000
    .myddr3data   >   DDR3_MY

The new data section .myddr3data can be used in your application by specifying the #pragma DATA_SECTION directive:

#pragma DATA_SECTION (my_ddr3_data, ".myddr3data");
volatile uint8_t my_ddr3_data[0x100000];

Verify the correct location by viewing your generated map file:

Arr u.png    back to top

Additional Tags

Contact Post.png Support Tool.png