CPU: AM3359
CCS v6
Compiler TI v5.2.5
TIRTOS 2.0.1.23
XDC: 3.31.2.38
NDK: 2.23.01.01
CPU responds to ping requests, and http server is working. As soon as I try to connect with a telnet client (putty), execution aborts with "data abort error"
This is CCS console output during the debug session:
[CortxA8] 00000.000 Using MAC Address: 1c-ba-8c-f3-91-21 00000.000 SetPhyMode: X Auto:8673, FD10:1, HD10:64, FD100:32, HD100:256, FD1000:128 LPBK:8192 00000.000 EMAC has been started successfully 00000.000 Registeration of the EMAC Successful Network Added: If-1:10.11.18.35 Service Status: Telnet : Enabled : : 000 Service Status: HTTP : Enabled : : 000
--> Telnet connection request
00000.300 cpsw_MDIO_FindingState: PhyNum: 30 00000.400 Enable Phy to negotiate external connection 00000.400 NWAY Advertising: 00000.400 FullDuplex-1000 00000.400 FullDuplex-100 00000.400 HalfDuplex-100 00000.400 FullDuplex-10 00000.400 HalfDuplex-10 00000.400 00002.100 Phy: 30, 00002.100 NegMode X, NWAYadvertise X, NWAYREadvertise X 00002.100 Negotiated connection: 00002.100 FullDuplex 100 Mbs Exception occurred in ThreadType_Task. Task handle: 0x8ef88fe0. Task stack base: 0x8ef909c8. Task stack size: 0x1000. R0 = 0x8ef91878 R8 = 0x00000000 R1 = 0xffffffff R9 = 0x8ef9185c R2 = 0x5043540a R10 = 0xffffffff R3 = 0x8ef9185c R11 = 0xffffffff R4 = 0x8007ce5c R12 = 0x5043540a R5 = 0x8007cbb0 SP(R13) = 0x8ef917f8 R6 = 0x00000000 LR(R14) = 0x8004f984 R7 = 0x5043540b PC(R15) = 0x80024564 PSR = 0x2000019f DFSR = 0x00000005 IFSR = 0x00000000 DFAR = 0x5043540a IFAR = 0x00000000 ti.sysbios.family.arm.exc.Exception: line 180: E_dataAbort: pc = 0x80024564, lr = 0x8004f984. xdc.runtime.Error.raise: terminating execution
Looking at the call stack catched by ROV during the exception, it seems to me that the problem occurs inside xdc_runtime_System_doPrint__I function:
0 xdc_runtime_System_doPrint__I(unsigned char *, unsigned int, unsigned char *, struct __va_list *, unsigned short) at System.c:275,PC = 0x80024564 FP = 0x8EF917F8 1 xdc_runtime_System_vsprintf__E(unsigned char *, unsigned char *, struct __va_list) at System.c:225,PC = 0x8004F984 FP = 0x8EF91858 2 NDK_vsprintf(unsigned char *, unsigned char *, struct __va_list) at ossys.c:95,PC = 0x8003B194 FP = 0x8EF91868 3 ConPrintf(unsigned char *) at console.c:90,PC = 0x8004C388 FP = 0x8EF91878 4 console(void *, struct sockaddr *) at console.c:348,PC = 0x8001AE68 FP = 0x8EF91918 5 ti_sysbios_knl_Task_exit__E() at Task.c:415,PC = 0x80037974 FP = 0x8EF919B0
So I've tried to place a breakpoint at line 90 of file console.c (located inside \ti\tirtos_sitara_2_00_01_23\products\ndk_2_23_01_01\packages\ti\ndk\tools\console path), but CCS says software breakpoints are disabled (?):
Following the call stack during the exception, it sends me to line 90 of console.c:
Unfortunately, that line does not contains the call to NDK_vsprintf I'd expect: somewhere something got misaligned during crash report generation.
The problem should be sligthly above, at line 87, but still I can't place any breakpoint, and I don't know where and how NDK_vsprintf is implemented.
I've also tried to comment out all the ConPrintf() calls in console.c but, despice a clean/rebuild of the project, no change occurs at binary.
Hints?