element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet & Tria Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
ZedBoard Hardware Design Program in SDK is not executing completely, most probably due to inadequate stack,heap size or improper linker script for Zedboa
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 1 reply
  • Subscribers 341 subscribers
  • Views 229 views
  • Users 0 members are here
Related

Program in SDK is not executing completely, most probably due to inadequate stack,heap size or improper linker script for Zedboa

Former Member
Former Member over 11 years ago


Hello,
On ZedBoard I am doing one task, i.e. matrix multiplication for unequal dimension or say, rectangular matrices. My task is to design one Hardware Accelerator on PL of Zedboard. On ARM processor, I will execute one C prog in SDK, where it will call the Hardware Accelerator as well as it will do the same matrix multiplication on the software subject to ARM itself. Then it will compare the performance between Hardware Accelerator and Processor. I am following Xapp1170 with some modifications done on it, like I will multiply rectangular matrices of large dimension, say 1 x 1665 and 1665 x 9
Now I have generated PCore for the Accelerator of mtarix multiplication using Vivado HLS and checked that the PCore is okay by doing C/RTL Co-simulation.

Then in PlanAhead, XPS I did necessary connection between PS and PL and created the embedded source. After that, I will go to SDK. There I will create one application project where the c-code will call the Accelerator as well as it will do same matrix multiply operation on Processor.
Now in this regard, I am having problem , i.e. program for the required matrix dimensions gets halted and it is not executed completely. I am decerase the matrix dimension then by increasing the heap. stack size or by using appropriate linker script, the program get executed completely. So I think, my main task is to find out the proper linker script or appropriate stack size, heap size or if I have to do any further thing. I tried to track all these by decoing the ELF file. But I could not decode the ELF file properly. Is it possible to get to know the required stck, heap sizes or proper linker script from the ELF filke for my application project? I even don't know whether my program reuires more memory than it is available in Zedboard. Somewhere I found that "dec" section tells about the code size. I stuck to this project for inability to run the code in SDK, maybe due to linker script or stack, heap size mismatch. This is very essential as it is supposed to be used in some humanitarian purposes. So if anyone can help me in this regard, i.e. how to run the complete program in SDK by proper choice of linker script/stack size/ heap size or anything beyond these, I shall be ever grateful to you. I can post ELF details or anything You want to solve this problem. Thank You in advance. I am earnestly looking for your kind and important help.

  • Sign in to reply
  • Cancel
  • Former Member
    0 Former Member over 11 years ago

    First, you will need to look at you application and determine the memory required for all code, buffers as well as stack and heap areas. Guessing is not a good idea. If you do want to get a rough gauge of how much stack and heap area you are using, one crude way is to locate the memory area allocated to the stack and heap (open the .elf file for your application in the SDK Project Explorer Pane) and initialize the memory to a known pattern. Then run your program and, after it has completed, go back and look at the stack and heap memory and see how much of the initialized pattern has been over written. 

     

    You can set and observe the stack and heap size by opening the linker script in the SDK.

     

    You should also keep in mind that the ZedBoard only has 512 MB of DRAM vs 1 GB of DRAM for the ZC702 board targeted by XAPP1170, so you may need to modify the design to fit the smaller memory footprint.

     

    You may also want to look at this forum post for another approach to implementing your hardware accelerator: 

    http://zedboard.org/content/matrix-multiplication-vivado

     

    -Gary

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube