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.

How to compile and debug kernel code using ccs v5

Other Parts Discussed in Thread: 4460

Hi,

       I am a new bee to CCS. I am using ccs v5 (my target board is panda omap 4460 evalboard) for compiling and debugging my Linux kernel code. I had followed the below steps for creating the CCS project and compiling the project

(Referred  to the link : http://processors.wiki.ti.com/index.php/Linux_Debug_in_CCSv5 -> Stop mode Debug)

[1] Created a new C/C++ project by selecting File --> New --> Project and select Makefile Project with Existing Code.

[2] In the section Existing Code Location, clicked on Browse... and point to the root directory of the Linux kernel source tree. Left the toolchain as <none> and clicked Finish.

[3] Project Explorer view, right clicked and selected Build Options..., then selected C/C++ Build in the left tree and the tab Behaviour. Unchecked all the build rules boxes and clicked OK.

[4]  Created a new target configuration  file with below options:

          (i)  Under Basic Section

                Connection = Blackhawk USB560 BP Emulator , 20 pin JTAG Cable

                 Board or Device = OMAP4460

 [5] Run -> Debug configuration

The debug configuration failed with below error message

Error Message:

IcePick_D: Error initializing emulator: (Error -2083 @ 0x0) Unable to communicate with the emulator. Confirm emulator configuration and connections, reset the emulator, and retry the operation. (Emulation package 5.0.520.0)
IcePick_D: Error: (Error -2172 @ 0x0) Unable to communicate with the emulator. Confirm emulator configuration and connections, reset the emulator, and retry the operation. (Emulation package 5.0.520.0)
C646X_0: Failed to retrieve the Wait in Reset Mode: Failed to get PRSC status
ARM9_ICONT1: Failed to retrieve the Wait in Reset Mode: Failed to get PRSC status
ARM9_ICONT2: Failed to retrieve the Wait in Reset Mode: Failed to get PRSC status

I had checked the connections, all are fine.

Can any one guide me

[1] How to compile and debug  the kernel code in simulator mode (with out any connecting to target)

[2] How to connect to target board & debug the loaded kernel code.

Thanks in advance

Kiran.

     

          

  • Kiran,

    kiran babu said:

    [1] How to compile and debug  the kernel code in simulator mode (with out any connecting to target)

    [2] How to connect to target board & debug the loaded kernel code.

    [1] The kernel is not supposed to be compiled from within CCS. One of the reasons is that it requires specific parameters to be passed during build (CROSS_COMPILE, ARCH, etc) and also because it needs to be configured via its specific command (make menuconfig, make config, etc.). Therefore I suggest following the instructions shown in your linux distribution documentation on how to rebuild the linux kernel.

    [2] Although I don't have an OMAP4460 board with me, your configuration description seems to be fine. The error messages you sent show several issues when trying to connect to cores other than the A9s - something it is only possible either using a GEL file or if an application releases them from reset. However, the first message indicates the emulator is not properly initialized in your system. Before any further attempts to debug your system, can you follow the details to debug the JTAG connection shown in the page below?

    http://processors.wiki.ti.com/index.php/Debugging_JTAG_Connectivity_Problems

    Hope this helps,

    Rafael

  • Hi Rafael,

    Thank you for your reply. I understood that kernel can not be compiled but can be debugged using  CCS .

    Coming to emulator connection, i had run the Test connection button in Target configuration pane under Basic tab and got the following messages as output

    Test Connection Log Messages:

    ---------------------------------------------

    [Start]

    Execute the command:

    %ccs_base%/common/uscif/dbgjtag.exe -f %boarddatafile% -rv -F inform,logfile=yes -S pathlength -S integrity

    [Result]


    -----[Print the reset-command software log-file]-----------------------------

    This utility has selected a 560-class product.
    This utility will load the program 'bh560ubp.out'.
    Failed to open i/o connection (\\.\bh560ubp0)

    An error occurred while soft opening the controller.

    -----[An error has occurred and this utility has aborted]--------------------

    This error is generated by TI's USCIF driver or utilities.

    The value is '-250' (0xffffff06).
    The title is 'SC_ERR_ECOM_EMUNAME'.

    The explanation is:
    An attempt to access the named emulator via USCIF ECOM has failed.

    [End]

    From the log it appears that emulator is not able to connect to the target because USCIF ECOM failed.

    Can any one tell me what USCIF ECOM is and how can this be fixed so that i can debug my board using Black Hawk Jtag.

    Thanks in advance,

    Kiran

  • Kiran,

    Although I don't have a BH560bp, I simply created one configuration here and get the exact same error message as you. That tells me that either the emulator or its drivers are not functioning. Can you check the Windows Device Manager and see if the emulator's device driver is installed? The Blackhawk's topics shown in the page I sent before will help you troubleshoot this. They will help you troubleshoot any issues with the device drivers.

    Apart from the possibilities above, there is not much more to suggest at this time. The device drivers must be working before CCS can connect to the emulator itself. 

    Regards,

    Rafael