Core2Mini fast blinking green led or device not functioning

Hi Husarion-Team,
My robot program consists of 3 cpp-files and 1 h-file.
I have added some routine on the main.cpp file, then I am often suffering from the ‘fast blinking green led’ (program error).
I can not pinpoint what exact the problem is, because it is kind of random.

Is there a limit of the size of the main.cpp file?
The reason I am asking is, when moving the routine I have just added on the main.cpp to the other cpp, the problem disappears.

Recent problem I have is that my I2C-devices are not functioning until I did the above action.
All other actions are still working and no ‘blinking green led’
Any idea why?
If you like I will share the program with you.
Regards,
Fred

Hi Fred,

There is no limit for the .cpp files size.
There is size limit for produced .hex file. It is limited by CORE2 flash memory size, which is 1MB. The file size is not your case for sure, you would get en error during flashing.

During runtime, there is also a RAM limit, this one is 192KB - if you are dynamically allocating too many objects, you will get an error.
Most common reason of such an unspecified behavior is accessing the uninitialized variable or pointer.

You could try to trace down where your errors occurs by connecting serial monitor to USB hSerial port and printing debug data to it.

Regards,
Łukasz

Hi Lukasz,
Thanks for swift response and for the useful answer.
Regards,
Fred