Forum Discussion
Altera_Forum
Honored Contributor
21 years agoLinux Application
Greetings, Long story here... I have taken the Linux Ref Design provided by Microtronix and I have added a PIO -> user_pio. I have re-generated the system and compiled my design in Quartus. ...
Altera_Forum
Honored Contributor
21 years agoHi Terry,
There are several approaches for you. The "standard" way is to write a driver in kernel (the way Microtronix did for PIO buttons), implementing your PIO device as some kind of device Linux knows (the button is implemented as a character device). Then you can add the device node under /dev/ directory and read/write it as a file. You can also take advantage of uClinux (no virtual memory and no memory protection) and read/write your device directly, but remember to bypass the cache. This is a quick (but dirty) approach. (It looks like you have tried this approach, but as long as you turned on the 31 bit of the USER_PIO_BASE, I don't think it caused the system crash). Good luck, wentao