Mapping program and data to SDRAM on TS201 Ezkit

Hi,

I'm a newbie with TS201 and I'm trying to map the program code and data to the SDRAM on Ts201 EZ-KIT. In tehe default LDF, nothing is mapped to the SDRAM sections, so i thought some INPUT_SECTIONS commands might be needed to add in SECTIONS{}.

First,from“VDSP 5.0 Linker and Ulitities Manual”, it seems that i should pay attention to the input section named of program (for code) and data1 (for data). However, the functions can not be achieved by adding the following instrucitons to the default LDF.

sdram_code

{

  INPUT_SECTIONS($OBJECTS(program) $LIBRARIES(data1))

} > MSSD0

sdram_data

{

  INPUT_SECTIONS($OBJECTS(data1) $LIBRARIES(data1))

} > MSSD0

Secondly, the other sections,like ctor、data2,are already defined in the default .ldf file. I'm not sure whether it's needed to mapping such sections to SDRAM.

Thirdly, in my program heaps are used and the memory areas of M4DataB is resevered for heaps by default. Since the default allocated heaps are limited, I also want to allocate some SDRAM memory to the heap. I have attempted to set up the memory heap at runtime using heap_install and modifying the LDF as following:

SECTIONS

{

..

my_own_heapseg

{

_ldf_my_own_heap_base = .;

_ldf_my_own_heap_size = MEMORY_SIZEOF();

}>HOST

..

}

If i have mapped the code and data to SDRAM, are the above instrucitons still necessary to set up heaps in SDRAM? Can the memory be allocated using calloc automatically rather than heap_calloc? 

Here is my project files,could you give me some help to force it to run on SDRAM?

Thanks,

Jane.He 

sdram_map.rar.zip
Parents
  • 0
    •  Analog Employees 
    on Jun 18, 2012 7:30 AM

    Hi,

           To answer your questions:

    1. For mapping the code and data into the external SDRAM the LDF commands you have used are correct. You may use a unique section name as below instead of the standard program and data1 options.

    sdram_code

    {

      INPUT_SECTIONS($OBJECTS(SDRAM_code) )

    } > MSSD0

    sdram_data

    {

      INPUT_SECTIONS($OBJECTS(SDRAM_data))

    } > MSSD0

    You may have to add explicit section commands in the code with the SDRAM_code and SDRAM_data to map the specific code and data to external SDRAM. Otherwise the complete code and data will be mapped to both the internal memory and the external memory.

    2. You need not define the other sections in the LDF for the SDRAM.

    3. For using an additional heap from SDRAM please refer the Using Multiple Heaps chapter on the TigerSHARC Compiler manual.

    Also I could not open the files you have sent. Can you resend them only in zipped format?

    Best Regards,

    Jeyanthi

Reply
  • 0
    •  Analog Employees 
    on Jun 18, 2012 7:30 AM

    Hi,

           To answer your questions:

    1. For mapping the code and data into the external SDRAM the LDF commands you have used are correct. You may use a unique section name as below instead of the standard program and data1 options.

    sdram_code

    {

      INPUT_SECTIONS($OBJECTS(SDRAM_code) )

    } > MSSD0

    sdram_data

    {

      INPUT_SECTIONS($OBJECTS(SDRAM_data))

    } > MSSD0

    You may have to add explicit section commands in the code with the SDRAM_code and SDRAM_data to map the specific code and data to external SDRAM. Otherwise the complete code and data will be mapped to both the internal memory and the external memory.

    2. You need not define the other sections in the LDF for the SDRAM.

    3. For using an additional heap from SDRAM please refer the Using Multiple Heaps chapter on the TigerSHARC Compiler manual.

    Also I could not open the files you have sent. Can you resend them only in zipped format?

    Best Regards,

    Jeyanthi

Children
No Data