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.

RTOS/TDA2EG: ti.sysbios.family.arm.m3.Hwi: E_hardFault: FORCED

Part Number: TDA2EG

Tool/software: TI-RTOS

Hello,

I am using TDA2x based VAYU vision application board and trying to add own usecase in sample_app provided with vision sdk.

My usecase is simple: I have created simple function which returns some fixed value and generated lib using compiler and archiver from toolchain provided with sdk.

From c file which shows list of usecases I am calling own function which in turns calls function defined in library.

This lib is properly linked with final flashable program and I can see my function symbol in map file.

But when I flash and run code, I get ti.sysbios.family.arm.m3.Hwi: E_hardFault: FORCED at function call.

I am not getting what is exact cause of this exception.

Part of disassembly shows this:

Chains_link_test():
8493c878: B508 push {r3, lr}
9 int val = 0;
8493c87a: 2000 movs r0, #0
8493c87c: 9000 str r0, [sp]
10 Vps_printf("\r\nTest static lib............... 1");
8493c87e: A005 adr r0, #0x14
8493c880: F7E5FDD6 bl #0x84922430
11 val = test_static_lib();
8493c884: F00DED7A .word 0xed7af00d                   ------------------------------> Here exception comes
8493c888: 9000 str r0, [sp]
12 Vps_printf("\r\nValue from Test static lib %d",val);
8493c88a: 9900 ldr r1, [sp]
8493c88c: A00A adr r0, #0x28
8493c88e: F7E5FDCF bl #0x84922430
13 }

Below is stack trace: 

ti.sysbios.family.arm.m3.Hwi: line 1105: ti.sysbios.family.arm.m3.Hwi: line 1105: E_hardFault: FORCED
ti.sysbios.family.arm.m3.Hwi: line 1217: ti.sysbios.family.arm.m3.Hwi: line 1217: E_usageFault: UNDEFINSTR: Undefined instruction
Exception occurred in background thread at PC = 0x8493c884.
Core 0: Exception occurred in ThreadType_Task.
Task name: System main, handle: 0x86738bc0.
Task stack base: 0x869317e0.
Task stack size: 0x8000.
R0 = 0x00000000 R8 = 0xffffffff
R1 = 0x00000000 R9 = 0xffffffff
R2 = 0x00000000 R10 = 0xffffffff
R3 = 0x00001164 R11 = 0xffffffff
R4 = 0xffffffff R12 = 0x8674b897
R5 = 0xffffffff SP(R13) = 0x869397a0
R6 = 0xffffffff LR(R14) = 0x8493c885
R7 = 0xffffffff PC(R15) = 0x8493c884
PSR = 0x21000000
ICSR = 0x00437803
MMFSR = 0x00
BFSR = 0x00
UFSR = 0x0001
HFSR = 0x40000000
DFSR = 0x00000001
MMAR = 0xe000ed34
BFAR = 0xe000ed38
AFSR = 0x00000000
Unhandled Exception:
Exception occurred in ThreadType_Taskhandle: 0x86738bc0.
stack base: 0x869317e0.
R0 = 0x00000000 R8 = 0xffffffff
R1 = 0x00000000 R9 = 0xffffffff
R2 = 0x00000000 R10 = 0xffffffff
R3 = 0x00001164 R11 = 0xffffffff
R4 = 0xffffffff R12 = 0x8674b897
R5 = 0xffffffff SP(R13) = 0x869397a0
R6 = 0xffffffff LR(R14) = 0x8493c885
R7 = 0xffffffff PC(R15) = 0x8493c884
PSR = 0x21000000
ICSR = 0x00437803
MMFSR = 0x00
BFSR = 0x00
UFSR = 0x0001
HFSR = 0x40000000
DFSR = 0x00000001
MMAR = 0xe000ed34
BFAR = 0xe000ed38
AFSR = 0x00000000
Terminating Execution...Terminating execution...

Please help!