using Creator to build/debug Linux kernel code



  • Hi, all -

    With significant help from some people here, I recently was able to configure Creator to build and debug apps for the Beaglebone Black. I'd like to look into taking this to the next step, which for me is working on code for kernel space.

    I'm trying to run this kernel example on the BBB, but it fails on the read routine. So I'd like to try debugging it through Creator. Is this possible?

    EDIT: I should point out that I'm not even getting it to build right now. I suspect the problem is with the kernel header files. I copied them from the BBB's /usr/src directory to my host, but am getting copious errors.

    So, if I'm trying to perform an unnatural act here, please feel free to discourage me.


  • Lifetime Qt Champion

    Hi,

    It's been a long time since I've done something like that.

    One thing you can try is to run a gdbserver on the target to debug the module (see here for gdb kernel debugging)

    Maybe take a look at the OpenOCD project.

    You can cross-compile a kernel from your desktop machine but that requires a bit more setup.



  • It's been a long time since I've done something like that.

    It very well may be a bad idea. It's certainly asking a lot of a GUI library to handle builds for embedded/kernel code. I was just hopeful that I could be lazy and use Creator for everything. I guess I'll have to learn the CLI version of GDB now, something I've been avoiding for years.

    One thing you can try is to run a gdbserver on the target to debug the module (see here for gdb kernel debugging)

    Yeah, that's using a VM and emulating...not a direction I want to go in.

    Thanks for looking, but I think this is one problem I can't solve with Qt tools.


  • Lifetime Qt Champion

    You can connect to a remote gdbserver from Qt Creator. See the remote debugging documentation.

    I think you misunderstood, what was suggested is that you can do this with QEMU but that is also applicable to hardware. It's just easier to show with the emulator because it's something that everybody can install.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.