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/AM5728: Debugging IPC Example

Part Number: AM5728

Tool/software: Code Composer Studio

Hello,

Using the projects in the linked thread, I am trying to step through and understand better how the IPC operations work. However, I cannot seem to get the projects to run properly. I was having issues with the system_printf command, so I revised all of those calls to log_print 0 or 1, or log_error, based on the original example project. I can get the project to build, but when running the binaries one core or the other becomes stuck.

I am using

  1. SDK: 5.02.00.10
  2. PDK: 1.0.13
  3. IPC: 3.50.03.04
  4. CCS: 8.3.0

Please help me to debug/step through this program in CCS. 

Thank you,

Alec

  • Hello Alec,

    You can place log_prints throughout your code and check the LoggerBuf module in ROV to see where it's hanging. You should be able to step through/over as well.

    You can refer to this presentation for more information on using ROV:

    http://processors.wiki.ti.com/images/a/a4/IPC_Lab_1_Hello.pdf

    You can also find an overview of each example in the readme to get a better understanding of the examples. The overview of messageQ is as follows:


    This is a MessageQ example using the client/server pattern. It is a two processor example. It only builds for the HOST and DSP processors. You can build for either DSP1 or DSP2.

    The DSP processor is the server. It will create a named message queue. The server does not open any queues because it will extract the return address from the message header. The server returns all messages to the sender. It does not access the message pool.

    The HOST processor is the client application. The client creates an anonymous message queue. The client also creates and manages the message pool. The client's return address is set in the message header for each message before sending it to the server.

    More details on IPC and MessageQ can be found in the IPC User's Guide as well.

    Regards,
    Sahin

  • Hi Sahin,

    The problem is I'm not able to step through. The projects build, I load the .out to the correct cores, and run the example. I let it sit for awhile and nothing happens.

    I've tried setting breakpoints in both the MainHost and MainDsp1 source files. First one is in main() and second one is in App_taskFxn(). The first one gets hit for both cores.

    1. For MainHost.c, I am able to continue to step through until I reach the [do -> while] loop (~Line 117). Because the RemoteProcID never gets set, it gets stuck in an infinite loop.
    2. For MainDsp1, I hit the first breakpoint in main() at Task_Params_Init(&taskParams) (~Line 70). If I step through, resume, or do anything to try to pass this breakpoint, the core gets held up. 

    The memory location that the DSP gets stuck is around 0x8000_0000 every time.  

    I will attempt to use some of the debugging techniques you've shared, but if you could address my issue more specifically, it'd be a lot more helpful for me. 

    Thank you,

    Alec

  • Hi Alec,

    I see. It looks like the cores aren't able to attach and it's hanging there. Have you made any modifications to the examples? Specifically in the .cfg files or memory map?

    Regards,
    Sahin
  • Hi Sahin,

    No, I have not altered the .cfg or memory maps at all.

    Thank you for looking into this.

    Alec
  • Hi Sahin,

    The cores are still hanging for me. Both cores will hang, depending on which one I execute first (I believe). 

    Arm runs, DSP Fails:

    DSP Runs, ARM fails:

    I'm using a fresh workspace, I checked the pathing for both projects; everything seems fine. 

    Hard to debug this one, can't make it out of main(). Have you tried running the project recently? Could a newer version of IPC be a possible issue?

    Thank you,

    Alec

  • Hello Alec,

    The projects run successfully on my board using the latest SDK (v5.2). Have you verified the makefile based examples can run on your board?

    Instructions to build the makefile based examples:
    software-dl.ti.com/.../index_Foundational_Components.html

    Instructions to run the examples on AM572x:
    software-dl.ti.com/.../index_how_to_guides.html

    Regards,
    Sahin
  • Hi Sahin,

    Sorry for the delayed response, I was not working the IPC recently, but am now back working on this.

    I am able to run the makefile MessageQ example. (e2e.ti.com/.../2839504)

    If I want to build a custom application using the MessageQ, with IPC between the Linux ARM core and the RTOS DSP core, can I build it on Linux for this use-case? Therefore, I would be unable to use the BIOS only configuration methods, correct?

    Any advice you can give to aid me in developing a small custom test application would be really helpful. My current goal is to communicate/pass data from a Linux PC Redis server to the Sitara Client, and then pass that data from the Linux core to the DSP core. I am not very familiar with building custom makefile applications.

    Thank you in advance.

    Regards,
    Alec

  • Hi Sahin,

    Can you tell me if you are working on this, or if I should open a new thread regarding this question?

    Thank you,
    Alec
  • Hi Alec,

    Yes, please create a new thread so that it can be correctly routed to the Linux IPC expert. I will close this one.

    Regards,
    Sahin