Altera_Forum
Honored Contributor
16 years agoSimply blink a led with uCLinux
Hi i want to blink a led inside my linux, i can do it without problems using NIOS2-IDE but not inside Linux! What do i need to enable in makemenuconfig?
Thanks. This is my program..#include <stdio.h># include </home/aprado/LinuxFPGA/NOMMU/nios2-linux/uClinux-dist/linux-2.6.x/include/asm-nios2/nios2.h>
int main(void)
{
printf("hello world\n");
while(1){
*na_led_green = 1;
};
}
the error i get In file included from hello.c:2:
/home/aprado/LinuxFPGA/NOMMU/nios2-linux/uClinux-dist/linux-2.6.x/include/asm-nios2/nios2.h:82:28: asm/pio_struct.h: No such file or directory
hello.c: In function `main':
hello.c:7: error: `np_pio' undeclared (first use in this function)
hello.c:7: error: (Each undeclared identifier is reported only once
hello.c:7: error: for each function it appears in.)
hello.c:7: error: syntax error before ')' token
what is inside my ASM-NIOS2 $ ls
asm-offsets.h nios2.h