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.

Debugging the GPP side of a DSPLink application

Normal 0 false false false EN-GB X-NONE X-NONE

Hello all,

In short i am currently working on adding DSP link code into an application and i have managed to get everything built and it runs ok, however if the application crashes or is terminated in debugging then i have to reset my board before the DSP link part of my application will work again.

The long version, I am using a beagleboard Xm as my platform and running Angstrom Linux (2.6.32) on it. I am using GDB server and Eclipse IDE on my Ubuntu (10.04 LTS) host machine. What i am doing right now is trying to integrate the message application from the example into my own application.

What i will get is that the first time i run my application everything boots up fine the initialisation calls run ok and DSP link is ready to go. If the code runs through and calls my clean up routine which in turn calls the sample programs clean up routine then everything shuts down just fine and i can run it again. If the application crashes or debugging is terminated then DSP link kicks back at init saying it cannot create a new message queue. The only way i have found to make it work again is to reset the board.

I suspect that the DSP is holding onto handles and thus refusing a new handle with the same name, so i tried that after attaching to PROC that i would call the clean-up routine from the sample code, and then re-open PROC to clean things up but that does not work. If anyone can point me towards an explanation of how to get the DSP to reset to default without powering down the board or offer me some way i can work around this i would greatly appreciate it.

I attach here the output of my program to illustrate the issue

When it works:

Entered MESSAGE_Create ()
Entered MESSAGE_Delete ()
Leaving MESSAGE_Delete ()
Leaving MESSAGE_Create ()

When it does not:

Entered MESSAGE_Create ()
Entered MESSAGE_Delete ()
Assertion failed (IS_VALID_MSGQ (msgqQueue)). File : msgq.c Line : 478
MSGQ_release () failed. Status = [0x8000800b]
Assertion failed (IS_VALID_MSGQ (msgqQueue)). File : msgq.c Line : 329
Leaving MESSAGE_Delete ()
MSGQ_open () failed. Status = [0x80008050]
Leaving MESSAGE_Create ()

Again if anyone can provide any help to me i would really appreciate it.

Many thanks

Robert

 

  • My aplogies, i miss posted the output above for the first time it runs and is successful,  the correct output is :

    Entered MESSAGE_Create ()
    Entered MESSAGE_Delete ()
    Assertion failed (IS_VALID_MSGQ (msgqQueue)). File : msgq.c Line : 478
    MSGQ_release () failed. Status = [0x8000800b]
    Assertion failed (IS_VALID_MSGQ (msgqQueue)). File : msgq.c Line : 329
    Leaving MESSAGE_Delete ()
    Leaving MESSAGE_Create ()

    Thanks again

    Robert

  • Robert

    Which version of DSPLink are you on?

    DSPLink supports clean up of the DSPLink driver when process termination signals are sent to any process/thread which is using the driver on the Linux operating system. By cleanup, the expectation is that the next run of the application without rebooting the EVM is possible. Signal handling in the DSPLink driver is enabled by default. The signals handled by
    DSPLink are:
    •  SIGHUP
    •  SIGINT
    •  SIGILL
    •  SIGABRT
    •  SIGFPE
    •  SIGSEGV
    •  SIGALRM
    •  SIGTERM
    The number of signals handled by DSPLink as well as whether the driver should  handle signals or not can be set in the configuration OS specific file $DSPLINK/config/all/CFG_Linux.c

    The recommendation from DSPLink is that application writers should write their own application specific cleanup functions for process termination signals. This is because
    DSPLink driver can clean up only its own resources whereas the application signal handler will clean up other application resources including those of the DSPLink
    driver.

    See below link on how to disable DSPLink default signal handler.
    http://processors.wiki.ti.com/index.php/DSPLink_FAQs#Why_does_signal_handler_registered_in_my_application_stop_working_when_I_integrate_DSPLink_.3F

    The application specific signal handler can add DSPLink finalization calls along with application specific teardown.

    Deepali

  • Hi Deepali,

     

    Thanks for getting back to me, I am using the following versions of DSPLink and build tools, and building using open embedded.

    DSPLink - 1.65.00.03 r1

    GCT6x - 1.6.1.17 r4

    DSPBios - 5.41.07.24 r1

    edma3lld - 1.11.00.03 r1

    LPM - 1.1.24.02.09

    Im not currently using codec engine but for completeness its version is  - 2.26.02.09 r100a

    I will look into the signal handlers, I am quite new to linux so i was not aware i could write code to handle them, and get back to you on if i successfully solve the problem.

    Thanks again for the reply i dont think i would have figured that out without your helps

     

    Robert

     

  • Hello,

    Please comment on my issue as well. I am tryingto deug since many days. Here is the link

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/99/t/177322.aspx#638351

    Thanks

    Regards,

    Monish