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.

Loop in c_int00 if use array of my class objects

My controller get infinity loop on last line of TI lib routine c_int00 and cant't reach main() when I declare array of my class object and array size more 256 objects.

 

class myClass {

public:

    myClass(float v1=0,float v2=0) {var1=v1; var2=v2;}

private:

   float var1;

   float var2;

};

myClass myArray[1024];

int main(){}

 

There no problem if my array is any size array of int or float. If I remove default constructor problem is disappear. But what wrong in my constructor? Why problem depends of array size?

  • It's possible the watchdog is resetting the device before you can get through the c init once it gets large enough.  To test this theory  you can monitor the reset pin and see if the device is resetting - or place a breakpoint in the boot code.  TIf it is the watchdog, one option is to modify the rts library to service the watchdog during the boot.  The other option is to disable the watchdog before going to the C init routine.  The header file examples do the latter and can be used as an example.

    -Lori