I'm still on a bit of a learning curve with TI-RTOS, so it's entirely possible I'm missing something simple here. For the life of me, I can't seem to get the tcpEcho example to work at all well with the http server capability enabled.
Here are the steps I went through...
- I imported the existing example for tcpEcho and go it working as-is. The only change I made was to change the port to 1999. Communication with the supplied tcpSendReceive program worked fine. Trying to connect via a web browser failed (as it should) with message saying there was no server at that address. No surprises; life is good.
- I added support for HTTP via XGCONF on tcpEcho.cfg. I did this by navigating the GUIs to get to TI-RTOS -> Products -> NDK -> Application Layer -> HTTP Module Settings. From there, I checked the box to "add the HTTP server module" and then added an instance of an HTTP Server, accepting all the normal defaults. Dandy. If I test them separately, I can get the web server to respond (with 404 - File not found errors, of course), and I can also get the above tcpSendReceive to work.
BUT... if I have tcpSendReceive running, and then try to have a web browser connect, the system crashes hard. (see below)
I'm trying this all on the following...
- DK-LM3S9D96 eval kit
- Code Composer 5.3
- tirtos_1_01_00_25
- bios_6_34_02_18
Starting the TCP Echo example
System provider is set to SysMin. Halt the target and use ROV to view output.
Service Status: DHCPC : Enabled : : 000
Service Status: HTTP : Enabled : : 000
Service Status: DHCPC : Enabled : Running : 000
Network Added: If-1:192.168.0.22
Service Status: DHCPC : Enabled : Running : 017
tcpHandler: Creating thread clientfd = 536907652
tcpWorker: start clientfd = 0x20008f84
tcpWorker stop clientfd = 0x20008f84
tcpHandler: Creating thread clientfd = 536906116
tcpWorker: start clientfd = 0x20008984
ti.sysbios.heaps.HeapMem: line 307: out of memory: handle=0x2001562c, size=2056  <<===
00049.512 mmBulkAlloc(): could not allocate memory.
00049.512 out of memory: handle=0x20011ad4, size=536943368  <<=== 0x20011B08 !?!?
00049.512 SBNew: Buffer OOM
Network Removed: If-1:192.168.0.22
Service Status: DHCPC : Disabled : : 000
ti.sysbios.family.arm.m3.Hwi: line 942: E_hardFault: FORCED
ti.sysbios.family.arm.m3.Hwi: line 1019: E_busFault: PRECISERR: Immediate Bus Fault, exact addr known, address: 776fd939
Exception occurred in background thread at PC = 0x00000db0.
Core 0: Exception occurred in ThreadType_Task.
Task name: daemon, handle: 0x2000e398.
Task stack base: 0x2000e3e8.
Task stack size: 0x800.
R0 = 0x776fd931 R8 = 0x00000001
R1 = 0x00009c35 R9 = 0x0000000c
R2 = 0x00000044 R10 = 0x00000000
R3 = 0x07468b46 R11 = 0x2001425c
R4 = 0x09f3efbf R12 = 0x00000000
R5 = 0x00009c35 SP(R13) = 0x2000ea88
R6 = 0x00000000 LR(R14) = 0x00011c75
R7 = 0x0000000c PC(R15) = 0x00000db0
PSR = 0x01000000
ICSR = 0x00423803
MMFSR = 0x00
BFSR = 0x82
UFSR = 0x0000
HFSR = 0x40000000
DFSR = 0x0000000b
MMAR = 0x776fd939
BFAR = 0x776fd939
AFSR = 0x00000000
Terminating execution...
Any help here would be appreciated. Source code attached 1212.tcpEcho_with_HTTP_server.zip
Thanks.
 
				 
		 
					 
                           
				