Zynq C++ best practices: Globals vs Main() objects - stack+heap questions
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.
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?