I am using MACNICA_HELIO v1.3 to do some work。
I have build a kernel and rootfs with Anstrom, the version is:
The Angstrom Distribution cyclone5 ttyS0
Angstrom v2014.12 - Kernel 3.10.31-ltsi+
but I can’t run the sample in folder /home/root/altera, when I run the command ./scroll_client, the result is:
root@cyclone5:~/altera# ls
blink hello scroll_client syschk toggle
root@cyclone5:~/altera# ./scroll_client -1
Failed opening fifo frequency_fifo_scroll
root@cyclone5:~/altera#
who can tell me the reason. thanks.
Some informaion:
there is no file in /sys/class/leds, and there is no folder /sys/bus/platform/drivers/leds-gpio.
Thank you. I have not understand the reason and your explantion now.
I have tried other prebuild image and I found GSRD13.1 works well, and some other images have
not the altera example.
But, I have used the follow code implement the function for controling Leds:
custom_led_map = (uint32_t*)(lw_bridge_map + CUSTOM_LEDS_0_BASE);
// Blink the LED ten times
printf("开始%s LED %d...\n", light_status? "打开":"关闭", light_number);
orignal_status = *custom_led_map;
if(light_status)
{
// Turn all LEDs on
orignal_status |= (0x1<<light_number);
}
else
{
orignal_status &= ~(0x1<<light_number);
}
*custom_led_map = orignal_status;
printf("完成任务!\n");