I was able to program the FPGA and also run the code, however every time it attempts to allocate a buffer to transfer the waveform via AXI DMA malloc is returning a 0/NULL value for the buffer address. If I am correct this means that malloc is unable to obtain memory. I'm running this demo as is directly from your git repo.
The error that occurs due to this 0 buffer address varies, for petalinux it causes a memory violation error when it tries to copy the waveform to the buffer. For bare metal it copies fine, but then the AXI DMA copy never completes presumably due to the bad 0 address.
Do you have any tips for me on how to get this demo running? If there is any additional information I can provide just let me know.
I did find it curious that fnAllocBuffer takes an "addr" corresponding to the dmaAddr on the zmod but then doesn't use it for anything, could that be related?
Question
s4fq7
Hey Digilent,
I've successfully run the low_level_zmod_adc_dac demo on my board with a ADC and DAC ZMOD.
https://reference.digilentinc.com/reference/programmable-logic/eclypse-z7/low_level_zmod_adc_dac
I next decided to run the zmod_dac demo using both petalinux and baremetal.
https://github.com/Digilent/Eclypse-Z7/tree/zmod_dac/master
I was able to program the FPGA and also run the code, however every time it attempts to allocate a buffer to transfer the waveform via AXI DMA malloc is returning a 0/NULL value for the buffer address. If I am correct this means that malloc is unable to obtain memory. I'm running this demo as is directly from your git repo.
The error that occurs due to this 0 buffer address varies, for petalinux it causes a memory violation error when it tries to copy the waveform to the buffer. For bare metal it copies fine, but then the AXI DMA copy never completes presumably due to the bad 0 address.
Do you have any tips for me on how to get this demo running? If there is any additional information I can provide just let me know.
I did find it curious that fnAllocBuffer takes an "addr" corresponding to the dmaAddr on the zmod but then doesn't use it for anything, could that be related?
Thanks!
void* fnAllocBuffer(uintptr_t addr, size_t size) { uint32_t *buf = (uint32_t *)malloc(size); return buf; }
Link to comment
Share on other sites
11 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.