Hi, I'm looking for project about TCP/IP on 1294x but no found.
Anyone have this? Thanks
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.
Hi, I'm looking for project about TCP/IP on 1294x but no found.
Anyone have this? Thanks
Hi, Markel Robregado,
I need a example project Tcp/IP server listen client and tranferdata.
Hi,
Do you see these below at your Tivaware example program for Tiva Connected Launchpad? See, the readme file for each example program. See, if any of these example programs meets your requirements.
enet_io, enet_lwip, enet_uip, enet_weather
-kel
Compile (enet_lwip) project and flash the EK-TM4C1294xl with the (*.out) file in a debug secession. Ping the network DHCP assigned IP address to verify LWIP IP stack is intact and an ICMP reply should be received.
Open a web bowser, type ( http://x.x.x.x ) address you ping above and a TI web page should pops up.
Thanks for that green flag :).
Might a green flag salute Markel for stepping up to the plate early on?
TI teachers try to get us to do some home work before the dog makes a meal of it but now your mind is open to other possible project areas.
BTW: Heads up on GPIO port addresses, check the data sheet is in line with the code. I keep getting build warning (tcphdr) was set & never used but not able to find where in LWIP. TCP/IP stack still works ok even though this yellow warning message.
BP101 said:I keep getting build warning (tcphdr) was set & never used but not able to find where in LWIP. TCP/IP stack still works ok even though this yellow warning message.
BP101,
In file lwiplib.c are many #includes of other lwip source files. One of these is TivaWare\third_party\lwip-1.4.1\src\core\tcp_out.c which generates two warning instances (depending on how some #defines have been previously set) that generate the warning you indicated. Since these are only warnings about variables that are not being used, the code should work correctly.
However, if you want to get rid of these warnings, I made the following changes to tcp_out.c:
Lines 1382 to 1384:
tcphdr = (struct tcp_hdr *)p->payload;
#if CHECKSUM_GEN_TCP
Replace with:
#if CHECKSUM_GEN_TCP
tcphdr = (struct tcp_hdr *)p->payload;
Line 1367:
struct tcp_hdr *tcphdr;
Replace with:
#if CHECKSUM_GEN_TCP
struct tcp_hdr *tcphdr;
#endif
Line 859:
tcphdr = (struct tcp_hdr *)p->payload;
Replace with:
#if LWIP_TCP_TIMESTAMPS || CHECKSUM_GEN_TCP
tcphdr = (struct tcp_hdr *)p->payload;
#endif
Line 845:
struct tcp_hdr *tcphdr;
Replace with:
#if LWIP_TCP_TIMESTAMPS || CHECKSUM_GEN_TCP
struct tcp_hdr *tcphdr;
#endif
Note that this is not in T.I. written code, but in third-party LWIP supplied code.
Hello,
I get the same warning with tcphdr set but not used.
Before implementing the FIX done by Dan K, I tried only to comment the declaration of tcphdr in file tcp_out.c
For example in function "tcp_send_empty_ack"
Line 845:
struct tcp_hdr *tcphdr;
Replace with:
//struct tcp_hdr *tcphdr;
Something wreid appear because in the local function "tcp_send_empty_ack" the local variable tcphdr is set for example at line 859.
So the compilation should fail since it is no more declared but it doesn't!!! All went good with no more warning
It seem to use another variable maybe the one used in tcp_in.c at line 63:
static struct tcp_hdr *tcphdr;
It's a static but since C files are included with file "lwiplib.c" then maybe this one is used for compile time?
Then my question is which variable is really used ???
For example if we define the macro CHECKSUM_GEN_TCP then which tcphdr is used? The local one or an external one?
Maybe a bad design here...
Regards,
Max.
Hi,
After clean project compiler still finds one more warning (struct tcp_hdr *tcphdr;).
I did the same patch for the reminding warning too (at the begining there are two warning, then after comment out the two local declaration of struct tcp_hdr *tcphdr; make a clean and compile then there are no more warning).
Something is dangerous here I think since it makes me think that a global variable is used but cannot figure out where...
If someone can help me to understand.
Regards.