February 20, 2019 at 18:17 #23912
Just starting with VisualKernel and it’s looking quite good, however I have had some problems with the kernel version that was cerated during the sample Hello World kernel module creation.
I have changed the kernel configuration and recompiled the kernel. How do I tell VisualKernel to update?
Regards.February 20, 2019 at 20:36 #23915
Please try using the VisualKernel Project Properties -> Module Build Settings -> Kernel Symbols for Debugging setting. It will allow caching the symbols/sources for the new kernel and using them for debugging the module.February 21, 2019 at 17:54 #23920
Thanks for the response.
My setup is as follows: Debugging with Visual Studio 2017 Professional on Windows 10, using a VMware Linux with Debian Stretch AMD64 and a Raspberry Pi CM3.
I am using VisualKernel downloaded from your website, not from any source repository. What I have done.
1.- Delete all VisualKernel
1.1.- Windows files(C:\KernelCache, %LOCALAPPDATA%\VisualDebugger, %USERPROFILE%\source\repos\LinuxKernelModue*)
1.2.- VMware Linux files (/opt/KernelCache)
1.3.- Windows registry (HKCU\Software\Sysprogs)
2.- Open Visual Studio 2017, and create a new Linux Kernel Module project.
2.1.- Use SSH connections to the Linux machine and the Raspberry Pi.
2.2.- The Raspberry Pi kernel and cross compile tools are installed and used to create kernel and modules.
2.3.- The kernel and modules are installed correctly on the Raspberry Pi.
3.- Put a break point in the sample driver init function and start debug
4.- Select debug over Ethernet and VisualKernel tries to create the kdboe module.
4.1.- First problem is that the URL that VisualKernel tries to open to download the kdbgoe tarball is invalid. I managed to download the tarball by hand and can give it to VisualKernel when prompted.
4.2.- The kdbgoe module does not compile because CONFIG_HOTPLUG_CPU is not set in the kernel downloaded in step 3.2.
4.2.1.- I can fix the kdbgoe_io.c compilation by adding a #ifdef CONFIG_HOTPLUG_CPU around the cpu_down(i) call.
4.2.- Compilation now fails in irqsync.c and I can’t find the prototype for the init_timer that it is calling.
I think I have tried all alternatives of trying to add different kernels via the VisualKernel Project Properties -> Module Build Settings -> Kernel Symbols for Debugging setting and when I try to select it I only have the original kernel built in step 2.2. I have added things manualy, copied, rebuilt from scratch, nothing seems to work.
As far as I know your default kernel should be sufficient for me, but I can’t get use it due to the kdbgoe problems.
Any suggestions?February 22, 2019 at 05:42 #23928
First of all, thanks for reporting the broken link for the kgdboe download.
Second of all, KGDBoE will likely not work with Raspberry Pi (or may work very unreliably). Please try using a JTAG debugger instead as described in this tutorial.
We have also updated the documentation page for the supported debug methods to reflect the advantages and limitations of various debug methods. Hope this explains. Let us know if you have any further questions.February 26, 2019 at 18:00 #23995
I now have the Olimex debugger connectedto the Raspberry Pi and I can debug! Thanks for your suggestion.
Next problem, I need to customize the VisualKernel kernel, enable a few modules. How do I do that? I have tried everything I can and I still can’t get VisualKernel to recognize that it has to update the debug kernel.
Regards.February 27, 2019 at 05:23 #24004
Are you using VisualKernel to build the kernel itself, or have you already built and installed it manually?February 27, 2019 at 09:25 #24010
I tried to build it manually but couldn’t find how to tell VisualKernel to use my version, so since I have been using the kerenel automatically built by VisualKernel.
I have tried changing the Project properties…->Module build settings->Kernel version. Adding my own directory, importing symbols, etc. Whatever I do it just says, version incorrect and I eventually have to go back to the VisualKernel version.February 28, 2019 at 03:10 #24024
Please try clicking the “Manage cached Linux Kernel Symbols” link in the kernel symbol selector:
This will show all kernel symbols cached by Visual Kernel for that machine. If they are no longer relevant, please delete them and import another kernel by pressing the “Import symbols/sources” button.
Attachments:You must be logged in to view attached files.February 28, 2019 at 09:05 #24027
I’ve done that. Whatever I add does not appear in the kernel symbols list.
I tried again yesterday and eventually ended up with a non-working system and had to remove all the directories generated bu VisualKernel and start again. Takes a couple of hours. For the moment I’ll try and push what I have as far as possible. Hopefully I can get enough working to go on with.
Is there any way I can debug kernel boot?February 28, 2019 at 19:49 #24028
Sorry for the inconvenience. It’s hard to say why the system would end up being unusable; the only explanation we could think about is that some file transfers were not fully completed.
BTW, we are working on an update to VisualKernel that will use our new highly optimized file transfer engine, so it will considerably speed up file and directory transfers when caching kernel symbols.
You can debug the kernel boot if you are using JTAG or VMWare gdb stub by selecting “attach to a crashed/hanging system”. This will bypass any attempts to connect to the target via SSH and will proceed with a low-level connection, even if the kernel has not started yet. Please ensure that you have address space randomization disabled before trying this though as VisualKernel will not be able to detect the load address of the kernel unless it can connect to it via SSH.
You must be logged in to reply to this topic.