UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Participant mayflowers4972
Participant
145 Views
Registered: ‎04-11-2017

SDK application file .elf and variable storage in DDR

Jump to solution

Hello Everyone.

I have a bare metal SDK application running on ZedBoard. I am also using XilFFS library to read data from SD card and store in onboard DDR.

I found that the .elf file is stored in DDR and also the variables used in the application. I used "xil_printf("Address of variable is : %x",&VariableName).

Now some of the address of the variables (in DDR) coincide with the address in DDR where I want to store SD card data. Eg: one variable sits at 0x008A_9C30 while I write 7840000 Bytes of data in DDR starting at 0x0088_8C00. We can see the overlap!. Because of this the for loop that writes 7840000 bytes of data enters deadlock!.

Why OCM is not used for variable storage?

Also, how can I get to know the range of DDR used by SDK application file and also the variables used in it?

By using the SDK Disassembly I saw the application is stored in DDRs starting range 0x0010_0000

Please help me in understanding this..

Thank You

 

Best Regards

PK

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
89 Views
Registered: ‎10-30-2017

Re: SDK application file .elf and variable storage in DDR

Jump to solution

Hi @mayflowers4972 ,

You can specify the memory of variable and applicaiton in Linker script file. Please refer the linker script file and provide the proper memories for individual segments to avoid over lapping. Also you can change assign the amount of memory for application using stack and heap size. Please check the linker script and modify it as per requirement.

Best Regards,
Srikanth
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.

2 Replies
Highlighted
Xilinx Employee
Xilinx Employee
90 Views
Registered: ‎10-30-2017

Re: SDK application file .elf and variable storage in DDR

Jump to solution

Hi @mayflowers4972 ,

You can specify the memory of variable and applicaiton in Linker script file. Please refer the linker script file and provide the proper memories for individual segments to avoid over lapping. Also you can change assign the amount of memory for application using stack and heap size. Please check the linker script and modify it as per requirement.

Best Regards,
Srikanth
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.

Participant mayflowers4972
Participant
50 Views
Registered: ‎04-11-2017

Re: SDK application file .elf and variable storage in DDR

Jump to solution

Hi @savula ,

Thank You for the answer and sorry for the late reply!.

I found additional information on linker scripts at 

https://www.xilinx.com/html_docs/xilinx2018_1/SDK_Doc/SDK_tasks/task_generatingalinkerscriptforanapplication.html

 

Besr Regards

Ponnanna

 

0 Kudos