zhemao / interrupt_example

An example of how to use Avalon interrupts on the Cyclone V FPGA
13 stars 8 forks source link

Cant complie the fpga_uinput.c file,,issues reagarding kernel header files #5

Open shahidkhan6651 opened 7 years ago

shahidkhan6651 commented 7 years ago

hi, i have dwonloaded your example code from github and trying to cross compile the driver module on ubuntu-x86 pc kernel version 3.13 . i am compiling using linaro tool chain arm compiler for altera cycolne v board. my kernel version of board is 3.10.31-ltsi but the make file gives error .says cnt find the /linx/init.h .i even redirected the compiler to the source folder of kernel bt didnt work.please help immediately .please tell as if the kernel location in make file m putting the soruce folder of kernel is that correct or is it some version mismatch issue>???

shahidkhan6651 commented 7 years ago

Problem solved .when i used cross compiler provided with ds-5 instead of linaro tool chain provided with yocto ..module compiled error free.relief for me..what i can conclude is that there was version mismatch between kernel source and cross compiler Rest any better explainations invited :)

shahidkhan6651 commented 7 years ago

Hey there by above steps i compiled module succesfully and inserted module .the handler got registered bt on pushing buttons i am not seeing any print on system any guidance to troubleshoot this plz?

shahidkhan6651 commented 7 years ago

got the above working as well. on altera cyclonev board .the pio core's edge capture and interrupt mask registers were not being reset each time after interrupt so interrupt was being generated. iwrote code in my interrupt handler to reset the edge capture and interupt mask reg to eachtime interrupt comes so dat interrupt gets generated each time. :)

sbinet commented 3 years ago

hi there,

apologies for digging this old thread/issue from the grave. I am trying to compile this example as well, but I am missing instructions to retrieve the exact/correct kernel headers.

as anybody managed to do so? (it's 2021 and the few links that one can gather from discussions on various forums are dead) nice bonus points would be instructions packaged as a docker container :)

sbinet commented 3 years ago

FYI, I've gathered all the necessary inputs for rebuilding a socfpga-3.10-ltsi kernel there: