How can I debug Loadable Kernel Modules (*.ko) using SDK?
Kernel module debug has been simplified through the OS aware debug feature, available in Vivado 2016.1.
The steps below describe the procedure to debug kernel modules using System Debugger and the OS Aware Debug feature.
1) Set up the path mapping for the module as shown below:
2) Add the symbol file vmlinux to both the processors:
3) Enable the OS Aware Debug option for the CPU:
4) Add a break-point at the function mymodule_exit:
5) Load the module into kernel space using the insmod command: (in the debugger window make sure the processor is running)
6) Issue the rmmod command:
7) At this stage, the debugger should hit the break-point set in step 4, and as a result the rmmod command will not remove the module from kernel space.