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.

C674X DSP/BIOS setting array in specific address

Other Parts Discussed in Thread: OMAPL138

Hello,

I am currently developing an DSP/BIOS application and I am trying to use a block of data as a variable. I am using an EDMA3 transfer 2048 bytes to a specific address and subsequently, I need this block of data to be used further on in my program as an array of chars: char mydata[2048]. So far I have been trying to declare a pointer whose value was equal to desired address: static char *datapointer=(char*)(0x11822000);, but this method caused my DSP/BIOS application to crash, no matter if the variable was declared in the DSP/BIOS task or in the main function. I tried to declare the array using #pragma directives, but I did not find any suitable pragma in the "TMS320C6000 Optimizing Compiler". If there is a method to set the array to be in specific range of address space, I am all ears,

Thank you in advance

Rafal Krawczyk 

.  

  • Hi Rafal,

    The way you are setting the address should be fine. Why your application is crashing is the mystery. Does it end up in the weeds?

    ki

  • Hello Ki,

    To describe the issue more precisely:

    I am using OMAPL138 processor on which I am currently writing a ARM- DSP programs. I basically run an ARM application (in a Angstrom Linux shell via ssh connection) in which I load a DSP/BIOS application to my DSP core. I am debugging my DSP/BIOS application by adding the following lines in my code in my main function (that is, before it ends execution and DSP/BIOS takes over the control over an application):

    volatile Int i=1;
    while(i);

    This allows me to connect to previously loaded application in my DSP using Code Composer Studio v5.4. I  load symbols without reloading the program in DSP core. I subsequently can change in the CCS-Debug perspective the value of "i" to zero and add breakpoints in my DSP/BIOS task (I have only one task so far). Without declaring the mentioned problematic pointers the DSP- side application works correctly- it communicates with ARM (via DSPLink) and it stops in breakpoints put in DSP/BIOS task. I can change the value of "i" to 0 to step out of loop and proceed with the application execution.  I am using  DSP/BIOS version 5.42.1.09.

    The problem begins when I am trying to use the mentioned pointers, which are of major importance in my project, because I am trying to use a EDMA-transferred portion of data in a specific address as an array for further computation.  When I initialize the pointers' values outside the  task (i.e. before the main funcion), the application executes to the while(i) loop, but for unknown reason I cannot change the value of "i" in debug perspective- it happens before in my application any of data in address pointed by the pointers is changed in my application, so it is rather not the cause of violating application's code during the execution.

    When I declare ant initialize the static pointers in my DSP/BIOS task, I can change the value of "i" in the debug perspective. However, despite having no modification of data pointed by my pointers (excluding violation of my code data by my own application),  when I put the following code in my application, just to copy the data into an auxiliary buffer:

    ///Declaration of breakpoints before looked like this:

    static float *sin21=(float*)(0x11820000);
    // //8192 bytes after s21
    static float *sin42=(float*)(0x11822000);

    ////In the code below application crashes

    float values1[2048];
    float values2[2048];
    for(int i=0;i!=2048;i++)
    {
    values1[i]=sin21[i];
    values2[i]=sin42[i];
    }

    my application ceases to respond. Not only it does not stop in selected breakpoints (where it should stop- I put breakpoints in always-executing part of code), but it also breaks my entire Linux system on ARM side so it does not respond either to my ssh commands. 

    When I declare the arrays instead of pointers (i.e static float sin21[2048] instead of static float *sin21=(float*)(0x11820000);), thereby making it unable to access data in given addresses, no such problem occurs. My DSP application stops to respond to any breakpoint after the lines of code above.

    Could it be that a DSP/BIOS application loaded to the DSP  and executing independently from the Linux on ARM so violates the address on the Linux side, that both ARM-side application and DSP application crash ? I would like to add, that I transferred data via EDMA to address 0x11824000 (so I actually changed data in the memory) and there were no problems with applications whatsoever. In my project I am using the CACHE_L2 Cache space, in  my .tcf file defined at the base address 0x11820000 and of 0x00020000 length. 

    If you have any suggestions, what is wrong, any help would be welcome.

    Best regards

    Rafal Krawczyk