Part Number: AM6421
Tool/software:
Hi there,
when i was tested main function exiting, all destructor-related were not running.
the GCC attribute is __attribute__((destructor(x))), where x means API priority number.
my local development environment is as follows,
CCS version: 12.7.1.00001
SDK version: 10.0.0.20
and sample code like this,
#include "ti_drivers_open_close.h"
#include "ti_board_open_close.h"
static __attribute__((constructor(101))) void system_entry(void)
{
System_init();
Drivers_open();
}
static __attribute__((constructor(102))) void system_entry_2(void)
{
Debug_LogP("Enter AM64 system.\n");
}
static __attribute__((destructor(101))) void system_exit(void)
{
Drivers_close();
System_deinit();
}
static __attribute__((destructor(102))) void system_exit_2(void)
{
Debug_LogP("Exit AM64 system.\n");
}
when main function was exited, system was gone to exit function and abort function.

please check this attribution.
B.R.
Jaxon