Altera_Forum
Honored Contributor
11 years agoNIOS II CustomComponent Programming Problem
Hi all,
I have created a LED register in vhdl and created qsys component out of that. Connected it to the nios processor as shown in below images. Created NIOS project and when I am trying to run the code the register is not updated. But if I access with the base address of the memory map generated, it is getting updated. Kindly someone let me know what could be the issue. I included system.h and written a simple program to edit the led base register. From memory I am able to access and blink led. But from C program I am not able to control it. # include <stdio.h> # include "system.h" int main() { unsigned int* ledbaseaddr =(unsigned int *) LEDREG_0_BASE; // unsigned int i; while(1) { *ledbaseaddr = 0xFF; //for(i=0;i<100;i++); *ledbaseaddr = 0x00; } } http://www.alteraforum.com/forum/attachment.php?attachmentid=10302&stc=1 http://www.alteraforum.com/forum/attachment.php?attachmentid=10300&stc=1 http://www.alteraforum.com/forum/attachment.php?attachmentid=10301&stc=1 http://www.alteraforum.com/forum/attachment.php?attachmentid=10302&stc=1 Regards, Phaniendra