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 20, 2012 11:48 PM

    Hi Hewenjing,

             Yes. It is possible to boot multiple applications from the same flash.  You need to modify the default boot kernel for this purpose:

    C:\Program Files (x86)\Analog Devices\VisualDSP 5.0\TS\ldr\TS201_prom\TS201_prom.asm

    Approach 1:

    The flash should have two applications one from the address 0x0 and the other one can be from other sector. By default the codes from address 0x0 to 0x3FF will be downloaded which is the boot kernel. This code continues to download the code from the following address 0x400. You can add the GPIO check above this portion and add code to change the source index depending upon the state of the GPIO. In your case, if the second application code is placed at 0x10000 then the source index should be initialized to 0x10000 for that condition.

    xr0 = 0x400;;      // xr0 = source index

    xr3 = TCB_EPROM | TCB_NORMAL | TCB_INT;;// boot rom,prio=norm,2D=no,word=norm,int=yes,RQ=dsbl,chain=no

    Approach 2:

    You can also use the multiprocessing feature of the processor. The loader utility supports generating loader file with multiprocessor IDs.

    Best Regards,

    Jeyanthi

Reply
  • 0
    •  Analog Employees 
    on Jun 20, 2012 11:48 PM

    Hi Hewenjing,

             Yes. It is possible to boot multiple applications from the same flash.  You need to modify the default boot kernel for this purpose:

    C:\Program Files (x86)\Analog Devices\VisualDSP 5.0\TS\ldr\TS201_prom\TS201_prom.asm

    Approach 1:

    The flash should have two applications one from the address 0x0 and the other one can be from other sector. By default the codes from address 0x0 to 0x3FF will be downloaded which is the boot kernel. This code continues to download the code from the following address 0x400. You can add the GPIO check above this portion and add code to change the source index depending upon the state of the GPIO. In your case, if the second application code is placed at 0x10000 then the source index should be initialized to 0x10000 for that condition.

    xr0 = 0x400;;      // xr0 = source index

    xr3 = TCB_EPROM | TCB_NORMAL | TCB_INT;;// boot rom,prio=norm,2D=no,word=norm,int=yes,RQ=dsbl,chain=no

    Approach 2:

    You can also use the multiprocessing feature of the processor. The loader utility supports generating loader file with multiprocessor IDs.

    Best Regards,

    Jeyanthi

Children
No Data