Forum Discussion
Altera_Forum
Honored Contributor
15 years agoThe question actually was: are you sure those addresses are not used by the compiler for anything else?
You'd better never use a constant for a memory buffer since the code is not portable and you don't know if that memory range is free. The best way to define a DMA buffer is using an array, static or malloc-ed or using a system define for the pointer address. Then, instead of void* tx_data = 0x9000000 : static int tx_data[BUFFER_SIZE]; or int * tx_data; tx_data = (int*)malloc(BUFFER_SIZE*sizeof(int)); or int * tx_data = DMA_MEMORY_BASE_ADDRESS; (where DMA_MEMORY_BASE_ADDRESS is defined automatically by sopc builder in your system file) However, in your specific case, if you know that memory range is available, the error can be due to the fact you are exceeding max dma length.