I’m trying to debug the kernel module of imx_rpmsg_tty which we are using to communicate between LINUX OS and our embedded m4 FreeRTOS code.
I’m struggling to bring the module in a debugging session using VSCode IDE, it will be much appreciated if you help through. And I mean from the moment of enabling gdb / kgdb on imx8dx to connecting the host gdb and enabling it in vscode.
In order to help would you mind clarifying a bit more regarding:
What process did you use to deployed the kernel module to the target board?
Have you verified this kernel module on the device?
Are you specifically looking to debug based on the workflow not working?
Here is a previous article regarding the kernel module in question with a solution.
I know that I can use the TorizonCore builder with specifying in the tcbuild.yaml file the modules to be loaded, but I didn’t do that, as I am not trying to just load the kernel, as well I can load the module in either two cases by re-building the torizoncore kernel or just modprobe the module in. In my case, I loaded the module by modprobe but I don’t know if this is the right way to get from the debugger the required information neither I know how to set my kgdb and connect it to the vscode IDE.
yes, I did, and I am using it to transfer messages between the CPUs using rpmsg_lite as the module I am using is the imx_rpmsg_tty.
Not exactly, I am trying to figure things out on how I can receive the data between the CPUs as our system is a bit complicated since we are trying to transfer our protocol packets between the CPUs in RTE, and it would be much appreciated if there is a way to see how the kernel is managing the data before sending it to the bus.
Thanks for all the information. I can do a bit more research if this is possible via vscode.
Currently I know the primary suggested way of debugging the linux kernel(and bootloader) is via a serial port. This may be a faster solution if its possible for you to step up. Here is the developer guide on it.
And on the cortex-m side is our recommend Cortex-M debugging extension.
Would the former method suit your needs for debugging the Linux side kernel?