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.

DSS SEGV during program load with C6670 cycle approximate model (linux platform)



Hi all,

   I'm getting a SEGV from the DebugServer when loading a program into the C6670 cycle approximate model (1 core only). Here are the particulars:

CCSv5.1.0 M7 - linux

Model: C6670 Device Cycle Approximate Simulator,  Big Endian_0/TMS320C66x_0

Script log excerpt:

Stack trace excerpt:

All works OK on the Windows platform.

Thanks,

Mark Brown

 

  • Hi Mark,

    Any chance you could provide the *.out file causing the crash?

    Thanks

    ki

  • Ki,

       Unfortunately I cannot download files from the system I'm on. So let's try this. The code I'm trying to run is a very small simple testcase. The problem seems to be more general with the loading process on linux. Here is the code I'm trying to run:

    #include <stdint.h>
    #include <stdio.h>
    
    #define SAMPLES 0x400
    int16_t input1[SAMPLES];
    int32_t output;
    
    void real_sum_ptr(int16_t *input1, int32_t *output, int length)
    {
        int n;
        *output=0;
        for (n = 0; n < length; n++) {
            *output += *(input1++);
        }
    }
    
    int main(void)
    {
        int size;
        FILE *output_file;
    
        if ((output_file = fopen("output.list", "w")) == 0) {
            perror("fopen");
        }
    
        for (size = 0; size < SAMPLES; size++) {
            input1[size] = (size & 0xf);
        }
        output = -1;
    
        real_sum_ptr(input1, &output, SAMPLES);
        fprintf(output_file, "real_sum_ptr %d %d\n", size, output);
    
        return 0;
    }
    
    // End of file
    

    Please build this testcase on your linux system for the C6600 platform (-mv6600) and run it on the C6670 cycle approximate model. If it woks for you, send me the .out file you created and I will try to run it on my installation. I can upload files but not download them. Let me know if this is possible.

    Thanks,

    Mark

  • Hi Mark,

    I build the example you provided and was able to load and run via both CCS and DSS without issue. I have attached the entire project

    ki

    hello.tar.gz
  • Ki,

       I tried out your executable code and it works just fine! OK so what gives??? Based on the function names within the stack trace it is failing in C function strlen. This usually happens with a bad or null pointer (been there done that... :) ). The calling function name seems to indicate it is working with the "coff name" or I surmise the name of the program file. So I compared the program names that I use with the one in your "hello" project. Yours has the suffix .out on it, mine does not. So I added a .out suffix on the end of the program name that I generate and sure enough it works!!! To complete the test I removed the .out suffix from your program (hello.out -> hello) and it fails with the segv in strlen. I can add a suffix for the time being but this should be fixed.

    Thanks, a mostly happy camper!!!

    Mark

  • Hi Mark,

    fyi - I have filed a bug for this: SDSCM00042162

    thanks

    ki