r brooks

Adapt9s12XD512 non-functioning caused by function call

Discussion created by r brooks on Mar 26, 2008
Latest reply on Apr 2, 2008 by CompilerGuru
I wrote a function for use in my program that does nothing more than loop through an int array[683] a few times making comparisons in order to analyze sensor data. It does nothing more than test for different cases and save some integers in a global array.  It runs fine on the computer using a C compiler. It is, however, perhaps a little lengthy to post here(but i will do so in the following post).  It compiles fine in code warrior with no errors, but I get a warning: L1912: Object _vectab overlaps with another (last addr: 0xEB5F, object addr: 0xCF00)
Anyway, here is the problem:
When I load the function but don't call it, everything works fine, but when I call the function, the microcontroller does NOTHINGIt doesn't run any of the code before the function call, or after it, or at least not correctly, as the code does several things that can be observed (like flash an onboard LED).  I can't find any indication that the program is too big, or does anything that the microcontroller can't handle. 
I will try to clean up the code (lots of things commented out left in it) for the following post.
Why does the following function cause the microcontroller not to function at all?

Message Edited by ODU IEEE Car Team on 2008-03-26 12:46 PM