This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/PROCESSOR-SDK-AM335X: Debugging loadable Linux kernel module

Part Number: PROCESSOR-SDK-AM335X

Tool/software: Code Composer Studio

I'm using am335x-evm board with sdk-linux-rt-am335x-evm-04.01.00.06 and CCSv7

I want to debug kernel module over JTAG (blackhawk USB560v2) . When the module is build-in I have no issues with debbuging, however loadable .ko file gives error when i try to put brake point - it says there is no code associated with the brakepoint location.

After insmod i use "cat /sys/module/mymodule/sections/.text" to get code offset for the module then "Load Symbols.." from CCS debug menu. I have also DEBUG_INFO set in kernel configuration.

Is it because CCS cannot load correctly symbols from .ko file ?

  • Hi,

    The procedure you are following looks correct, but I wonder if the MMU is playing tricks with your offsets. Can you try to disable it (from menu Tools --> ARM Advanced Features) and see if you are able to place the breakpoint? To resume the normal operation, re-enable the MMU and put the code to run.

    I will try to think of any additional details that may be in place here and report back.

    Hope this helps,
    Rafael
  • Actually I need to use "Add Symbols..." for the module otherwise CCS says"
    "vmlinux must be loaded to resolve drivers/misc/mydriver.c, line 1015 to an address"

    When I load symbols for vmlinux and add symbols for the module I do see both in Modules view but when i want to put brakepoint CCS says:
    "No code is associated with drivers/misc/mydriver.c, line1015 in /home/user/linux_src/vmlinux"

    So the problem is with resolving an address of the brakepoint in CCS, I don't think it's related to MMU. And for some reason CCS looks for module's beakepoint address in vmlinux.
  • Hi,

    Please apologize for the delay; I will try to get my embedded Linux system up and running tomorrow to try and reproduce this issue.

    Regards,
    Rafael
  • Did you have a chance to take a look on this? I think is worth to mention that I'm using CCS in Ubuntu 16.04 which is guest OS in VMWare virtual machine running on Windows 7 but it shouldn't be a problem right?