When using 6.45.1.29 SYS/BIOS programs for a Cortex-A15 compiled using the GNU v4.9.3 ARM compiler and CCS 6.2.0.00050 terminate either due to an error or calling BIOS_exit that the stack backtrace in the CCS debugger is incomplete, and doesn't show where in the application the error / exit occurred.
As an example after a test program causes an assertion failure the stack backtrace only contains the do_AngelSWI and _kill functions which are part of the GNU Newlib:
And after a call to BIOS_exit the backtrace ends at the xdc_runtime_System_processAtExit__E function, and doesn't show where in the application BIOS_exit was called from:
Not sure if the incomplete stack backtrace is a bug in CCS, or a limitation of the debug information in the SYS/BIOS and/or GCC Newlib libraries.
As a work-around found that setting a breakpoint on the following functions in a simple test program allowed the stack backtrace to report the function in the application which caused the error / exit:
- xdc_runtime_Error_raiseX__E is the case of a SYS/BIOS program being aborted due to an error
- xdc_runtime_System_exitStd__E in the case of BIOS_exit() being called
Attached is the test project used, which in the bad_func() function causes a SYS/BIOS error (but passing an invalid argument to the Pmu_getCount function) task_GPEVM_AM572X_SiRevA_CortexA.zip