Other Parts Discussed in Thread: SYSBIOS
Hello,
When using the TI 19.3 compiler, BIOS 6.73.01.01, XDC 3.50.08.24 this works.
BUT it crashes using:
- GNUC 7.3.1
- processor_sdk_rtos_am335x_6_03_00_106
- SYSBIOS 6.76.03.01
- XDC 3.55.02.22
When exiting SYSBIOS, a function is registered. But as it's being called, I get an ASSERT (again, ONLY with the GNUC compiler and the packages specified)
void callme_when_sysbios_exits(int status) {
UARTprintf("Entering the SYSBIOS exit hook\n");
flag_program_share *shareflag = (flag_program_share *) PROGRAM_SHARE_FLAG_ADDR;
void (*Target)();
// tell target that it is being invoked by the runtime code
shareflag->calling_program = 0x03;
// go to the bootloader
Target = (void (*)(void)) 0x83F00000;
Target();
}
void goto_nextapp() {
UARTprintf("Setting the SYSBIOS exit hook\n");
/* Register a handler function that will be called after SYS/BIOS shuts down and exits */
if (System_atexit(callme_when_sysbios_exits) == FALSE) {
UARTprintf("PANIC!!!!!! Unable to add system exit handler. Will attempt to shutdown directly to the bootloader...");
callme_when_sysbios_exits(-1);
}
UARTprintf("... now terminating SYSBIOS\n");
BIOS_exit(0);
// Should never get here...
UARTprintf("Exited SYS/BIOS...\n");
}
It gets partway through the print statement that is inside the hook, "Entering the SYSBIOS exit hook\n" and then give as assert.
Setting the SYSBIOS exit hook
... now terminating SYSBIOS
Enteri
ASSERT failure: Module: 32800, File: <unknown>, line: 214
assertion failure: A_badContext: bad calling context. Must be called from a Task
The module name is useless, and the file isn't listed.
How do I figure out where this is coming from? The assert message isn't in this project, it's in SYSBIOS or XDC or something...
By the way... when will E2E fix this issue, when I try to add code? All I get are people telling me there is nothing wrong.

