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.

C6runlib: Problem while allocating doublepointers

Hi,

I hope anyone can help me fixing my strange problem:

When I'm trying to allocate a doublepointer of float I got a strange error regarding "c6runlib-rpcgen.pl" from the "c6runlib-cc" compiler.

The full error is:

Can't call method "name" on an undefined value at /usr/local/ezsdk/component-sources/c6run_0_98_00_00/bin/../lib/perl/c6runlib-rpcgen.pl line 143.


And the codepiece which causes this error is this below:

float **new_dd(int16_t x, int16_t y) {
    int i;
    float* *pnt = (float**) malloc(sizeof(float*) * (x));

    for (i = 0; i < x; i++) {
        pnt[i] = new_d(y);
    }

    return pnt;
}

new_d() is just a method which covers a malloc of a float-pointer.

This code is supposed to run on the C674x DSP part of my EVM816x and I'm using C6EZRun 0_98_00_00

Can anyone tell me, how to fix this problem or can advise me a workaround?

BR,

Kristian