cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
253 Views
Registered: ‎03-21-2019

Zynq C++ best practices: Globals vs Main() objects - stack+heap questions

Hello all,

Preface

We are developing a hexepod parallel manipulator (stewart platform) controller using the Zybo, a Zynq-7000 dev board (1 GB of DDR).

Everything is wonderful about the project and we couldnt be happier. Thanks Xilinx for the really outstanding products and development tools.

Recently we changed the way our bare-metal app is designed: we previously had most of our c++ objects declared globally. For whatever reason, this felt bad and I migrated all the object creation to the main() function before while(1).

In constructing objects from main(), the program hangs unless we increase both the stack and heap size.  Increasing only stack or only heap results in the same hang behavior.

Questions

1) Are there any performance impacts on creating object globally vs dynamically on the zynq? ie in both bases are the objects essentially just getting created in different sections of the DDR?

2) In your experiences, is there one practice that is more accepted or encouraged than the other?

3) Can anyone point me to information on the heap and stack specific to the Zynq?

 

Thanks kindly for your guidance.

Kyle

 

0 Kudos
0 Replies