This question uses some Xilinx-specific terminology.
I'm currently working with a Zynq Ultrascale+ MPSoC (CPU + FPGA in same package). I'm using a QSPI flash chip to hold the CPU configuration code, FPGA bitstream, and application (.elf). I need to transfer const data from flash to ram (external DDR) upon device initialization. There is no OS running. What's the best way to achieve this? I think I have a couple options:
1) Use BOOTGEN (flash image generation tool) to somehow store the data at a specific location in flash (not sure if this is even possible?). Then I can modify the FSBL to do a memcpy() after the DDR initialization. For the memcpy(), I would have to use the physical addresses of both the source and destination.
2) Write a C program that contains an array of const data. BOOTGEN would figure out where to locate this data in flash so I wouldn't have to worry about that. Then I could perform a memcpy() with my array as source data and a physical DDR address for the destination.
This data will eventually be accessed by the FPGA, so in either case I would have to mark out a section of DDR as reserved and non-cacheable.
Do either of these options seem reasonable? Is there a better way?