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.

Placement of a header/implementation within project, without inclusion by other code causes FaultISR

By simply including the header and implementation file of an abstraction to an Attitude, the software that is built within the project results in a FaultISR() immediately upon download.  The compilation succeeds without any warnings or errors and the software never reaches the main() breakpoint. 

I have cleaned the project and even visited the Debug subdirectories and removed all references to the files in question.  After rebuilding the project the problem still occurs.

However, as soon as I remove the *.h and *.cpp file from the project, the download and executions occurs as expected, the software first hits the main() breakpoint.

As a test, I copied the files to an earlier evolution of the project, which had run fine, and I had the same issue.  I do not reference the class defined by these files anywhere in the project. 

Are there any known issue that might explain or fix this issue?  What can I provide that will help you explore this issue?

Thanks

  • I'm not sure what is going on, but this is my best guess.

    Tim Coddington said:
    By simply including the header and implementation file of an abstraction to an Attitude

    I'm not certain what you mean by that.  I presume you mean a collection of C++ source code which implements a few classes.  Most importantly, this code defines a few global objects of those classes.  The main part of your project does not refer to any of these global objects.

    Are any of these global objects initialized?  If so, the constructor for each object so initialized is called at system start, before main runs.  There might be some problem in such a constructor which prevents execution from reaching main.

    Which target CPU are you using?  Which ABI are you compiling for?  These details may matter.

    Thanks and regards,

    -George