3 Replies to “Zynq 7000 – tricks and gotchas on baremetal messaging”

  1. Dear Henry,

    I have watched your videos several times and wonder what is the best way to share a big chunk of memory between two cores of Arty-Z7-20? Note that I have already watched your tutorials on how to run two bare-metal applications and share data between two cores using OCM, but this tutorial does not really share the DDR memory between two cores. Each core has its own dedicated part of memory without any overlap.

    To give you more detail on what my goal is: I want to read a big chunk of data (something in oder of 10 MB) on CPU#0 and put that into DDR memory, and then let the CPU#1 know when I am done via a flag (which I know how to do with OCM). Following this, I want CPU#1 to access the data that CPU#0 put in DDR and write it to the SD card, while CPU#0 starts to read the 2nd chunk of data spontaneously. To do this, it is clear that I need to modify the ldscript of two cores, so they share part of the memory, but it seems memory overlap somehow blocks the CPU#1 from starting up. I am also trying to avoid using Linux here and keep my applications simple. I wonder if you have any information on how to do this.


    • That is not true. You do not need to do anything to share memory – it is already shared! There is nothing left to do.
      What you need to be careful is with cache, which is unique to each core.
      The ld script only dictates where the text (binary) will be loaded, the position of heap and stack. But it has nothing to do with the actual addressing.
      The right thing to do is, using ldscript, load one application in one block, load the other application (in other core) in a block above. This has been done in the video.
      Then leave one block above the second, which you can hardcode the address to access from both cores freely. There is nothing to be done here other than carefully planning – memory is already shared.