Forum Discussion
Altera_Forum
Honored Contributor
21 years agoI had the exact same error message with Quartus 4.2 and NIOS 1.0.0. The problem arose when I upgraded Quartus from 4.0 to 4.2, it seems to be related to the fact that the 4.2 install creates a components dir located at c:/altera/quartus42/sopc_builder/components but the NIOS IDE still has it’s components at C:\altera\kits\nios2\components.
In both of these dirs there is a component called “altera_avalon_dma” a quick file compare shows that dma the components are different. More specifically the file altera_avalon_dma.c located in c:/altera/quartus42/sopc_builder/components/Hal/src (the new dma component). This file contains a new case sentence called “ALT_DMA_SET_MODE_128” (line 199), exactly the name as in the error message. So the problem seems to be that “ALT_DMA_SET_MODE_128” is not defined anywhere (as the error massage states). This indicates that the NIOS IDE is using the new DMA component and not the one located in C:\altera\kits\nios2\components. I found out that there must be another file that should contain the definition for “ALT_DMA_SET_MODE_128”, but this file was apparently not updated during the quartus 4.2 installation. After some searching I found this file. It’s located in “C:\altera\kits\nios2\components\altera_hal\HAL\inc\sys” and is called alt_dma_dev.h So to fix the problem I copied the new dma component dir from “c:/altera/quartus42/sopc_builder/components” to “C:\altera\kits\nios2\components” overwriting the old one (I don’t now if this I necessary but I did it anyway). Then I edited the C:\altera\kits\nios2\components\altera_hal\HAL\inc\sys\ alt_dma_dev.h file adding the line “#define ALT_DMA_SET_MODE_128 (0xA)” at line 92. I then rebuild the project without errors. Please let me know if this works for you or if I have forgotten something.