BL4S210 Run Time Error

When using Dynamic C 10.72C to compile a program, I’ll get the following message at the end of the process:

Run Time Error: Invalid Argument
Address fe:eb1d

After dismissing it, another message will pop up after a second or two:

While debugging:
Timeout while waiting for response from target

Any pointers in where the issue would lie? Would it be something in my code?

If this is something you recently ported. Take a look at Technical Note TN203, Porting a Program to Dynamic C. Take a look under the Declaration of Variables and Size of.

This is likely caused by a bug in your program. Can you break your program down into smaller pieces, or disable portions of its functionality to see if the error goes away? Are you overflowing your stack (e.g., large arrays as auto variables in functions, or using lots of recursive function calls)? Maybe you’re overflowing an array and overwriting some global variables?

If you use the debugger to single-step over lines of code in your main loop, you’ll find out which function call causes the crash. Then you can single step over lines in that code.

You’re getting the run-time error as part of the crash, and the result is that the debugger (hosted on the Rabbit) stops working so you can’t debug your program.

The program was originally written for a Rabbit PK2230 controller. I could be wrong, but I would have imagined size wouldn’t be an issue going from an older controller to a newer one.

I haven’t had a chance to single-step it. I’ll check that and see where exactly I can find the fault.

As for the program itself, it was actually originally written for a Rabbit PK2230 controller. I had to change some of the I/O calls that were specific to that controller, but otherwise I left it as is. I guess there must be more differences between the two than I initially thought.