wichayen
Member level 2
nios ii ide
now i am using nios II . i have problem about register access. please see below
#define LED (*(volatile unsigned int*)(GPIO_LED_BASE+0x0))
int main(void)
{
LED = 1; <-- this line is not work ( line 1)
IOWR=32DIRECT(GPIO_LED_BASE, 0, 1); <-- this line is work ( line 2)
return 0;
}
LED = 1; this line is not work. the assambly code of line 1 and 2 is same but line1 is not run. i already try to bebug, only line2 is work.
can any one help me to solve is problem?
now i am using nios II . i have problem about register access. please see below
#define LED (*(volatile unsigned int*)(GPIO_LED_BASE+0x0))
int main(void)
{
LED = 1; <-- this line is not work ( line 1)
IOWR=32DIRECT(GPIO_LED_BASE, 0, 1); <-- this line is work ( line 2)
return 0;
}
LED = 1; this line is not work. the assambly code of line 1 and 2 is same but line1 is not run. i already try to bebug, only line2 is work.
can any one help me to solve is problem?