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.

TMS320F28388D: Queries about using Ethernet in SYS/BIOS

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

Hello community!

I'm using F28388D control card for my product development.I have ported sys/bios and successfully.

My Requirement is to have Ethernet and USB working with SYS/BIOS on CPU1 and on CPU2 we need to use different FW Application with RTOS.

I see that there are no SYS/BIOS examples for Ethernet.

How do I get started with Ethernet functionality implementation & validation on CPU1 ?

is my requirements possible ?

Any Inputs on Ethernet will be helpful.

Thanks and regards,

Pranay.

  • Hi Pranay,

    Just to clarify--CPU1 and CPU2 cannot access Ethernet. You can only use the CM for interacting with Ethernet. There are some examples in C2000Ware for Ethernet on the CM although as you've pointed out, they do not have SYS/BIOS integrated already. I would recommend, getting familiar with the example as is and then trying to integrate its functionality into a SYS/BIOS project.

    USB can be accessed by both CPU1 and CM, so you have a choice as to what core interacts with the USB hardware. Again, we don't have any SYS/BIOS examples for it in C2000Ware, but it should be possible to integrate USB code into a SYS/BIOS-based project.

    Whitney

  • Hi Whitney,

    Thanks for the response.

    I've been following below links for using LwIP on CM and GPIOs configurations on CLA1.

    - " e2e.ti.com/.../ccs-tms320f28388d-ccs-project-example-for-f28388d "

    - " ">e2e.ti.com/.../tms320f28388d-cannot-get-enet_lwip-example-to-run"

    I'm using latest c2000ware - C2000Ware_3_04_00_00

    Do I need to follow the suggested changes in threads above ?

    However, in cm_common_config_c28x example, I added _FLASH in predefined symbols and selected respective flash linker file and also added while(1); in the end of main() and then debug the application.

    Next I stopped debugging and in enet_lwip project selected CM Core in debug configurations and tried debugging but I see that control is not coming out from function Ethernet_init(const unsigned char *mac);

    Instruction --> pInitCfg = Ethernet_initInterface(initInterfaceConfig);

    So far I have not made any changes in enet_lwip source code as suggested in above thread.

    Do I need to make respective changes if needed to make lwip run in Standalone and debug mode?

    Update 1:

    So I added LED Blinking in while(1) loop of cm_common_config_c28x example and flashed that to CLA1/CPU1 and then I tried flashing enet_lwip example to CM core I observed that CPU1 flash is also getting erased when I tried flashing Cm.

    Is this expected ? Any HW changes required for flashing CPU1 or CM ?

    Update 2:

    I'm able to bring up LwIP on CM successfully, The mistake I as doing is loading both Flash separately, Instead of that need to flash to CM from CPU1 debug configurations window, i.e., First running cm_common_config_c28x  on CPU1 in debug mode and then select CM Core from below window and Load program of enet_lwip on CM and then right click on CM Core and connect to target.

    In this way I'm able to ping successfully.

    Queries:

    1. Can we enable RTOS on CM Core for running lwip ? I see that there is a enum NO_SYS, If we disable this RTOS functionality with lwip on CM core will work ?

    2. If I ping using "ping -l 30 -n 100 192.168.0.4" I'm getting request timed out error ie., If no. of bytes data is more than 20, I'm unable to ping. Is this expected ? How do i fix this ?

    3. I need to send some data in the form of API (For Ex: 11 22 33 44 55) -  a series of continuous Bytes How do  achieve this ? (Need to explicitly use Socket programming ? )

    4. Further Received API shall be pushed to CPU1 for processing. I can achieve it via IPC right ? Any Documents ?

    5. Lastly, I need to perform field Firmware updates for all 3 cores - CPU1, CPU2 and CM.  I believe it can be done. Any documents would be helpful.

    Thanks and regards,1

    Pranay.

  • I've copied our Ethernet expert on this thread. He should be able to help with the questions about the example and lwip.

    As for #5, field updates are definitely possible. I'd advise you to study the boot ROM chapter of the technical reference manual. We also have a serial flash programming app note that describes how to do a firmware update using SCI--even if you don't want to use SCI, the same principle can be used for other peripherals.

    Whitney

  • Hello whitney,

    Any updates ? I have not received any inputs from ethernet expert yet, can you please check.

    --Pranay.

  • Pranay,

    Sorry for the late response. Here are the answers to your queries.

    1. Are you running any OS on the CM side now? This enum is NO_SYS =1 indicates that lwIP stack is used without any OS-awareness (no thread, semaphores, mutexes)

    2. Can you check the lwip_stats  variable to see where the packets are getting lost? Also , you can check Ethernet_rxInterruptCount to see if the number of packets received.

    3. Which version of C2000Ware are you referring? There is a UDP based example added in ver 4.00.00.00 of C2000Ware which transmits data stored in a buffer. You can refer this example to send the series of bytes.

    4. For IPC, you can refer the examples provided in C2000Ware in folder C:\ti\c2000\C2000Ware_4_00_00_00\driverlib\f2838x\examples\c28x_cm\ipc. Also, you can refer the following thread 

    https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/943195/ccs-tms320f28388d-ipc-communication-from-cm-to-cpu1

    Best Regards

    Siddharth

  • Hi Siddharth,

    Thanks for your response.

    1. Yes, I'm not using any OS as of now NO_SYS is define as 1, But I want to use RTOS for my development, So what and all I need to perform to achieve that. I tried editing NO_SYS = 0 but I see there are a bunch of errors, not tried debugging further tho.

    2. I'm unable to find Ethernet_rxInterruptCount and lwip_stats variable in enet_lwip_udip project that I found in c2000 v 4.00.00...

    3. I'm able to import UDP example found in "C:\ti\c2000\C2000Ware_4_00_00_00\libraries\communications\Ethernet\third_party\lwip\examples\enet_lwip_udp" folder. But I'm unable to receive data being sent from my application but I see breakpoint hitting lwIPEthernetIntHandler() when i send data using same application, Not sure where is the issue.

    4. Thanks for the link I will try to implement that and keep you posted incase of queries.

    let me know if I'm missing anything and what needs to be done to achieve data transfer between Ethernet server and client.

    --Pranay

  • Pranay,

    1. We haven't tested the lwip example with any OS running so not sure what changes could be required.

    2. Ethernet_rxInterruptCount  is a variable in the CM driverlib (ethernet.c) whereas the lwip_stats is a global variable available in the LWIP stack (stats.c)

    3.  How are you testing this example?  This example uses port 28000 and use a rx callback to read the received data. There are keywords 'START' and 'STOP' used to initiate and stop the data transmission.

    Please refer the following thread on the details.

    https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1055954/tms320f28386s-ping/3907471#3907471

    Best Regards

    Siddharth

  • Hi Siddharth,

    1. Any other I can get help I'm facing a bunch of errors and seems like library dependencies if I enable respective macro?

    2. I haven't made any changes regarding ping issue, only change is project, Now I'm able to ping properly. No Issues so far. Tried with lengths upto 300 Bytes.

    3. I'm able to do this, established a connection between client and server using UDP with single socket #28000.

    -i. Now My requirement needs communication between 2 sockets, How do I achieve creating multiple sockets ?

    -ii. I want to use TCP/IP for communication not UDP. Can you point me out to respective links.

    -iii. I tried calling udp_bind(g_upcb, IP_ADDR_ANY, 29000); in  my_udp_init() function but this is breaking working communication with socket 28000 aswell.

    4. What is the expected speed/throughput if we use lwip ?

    --Pranay.

  • Hi,

    1. Are the errors related to lwip stack or the interface file? Can you share the compilation log?

    2. What was the issue earlier w.r.t the ping issue? Did you do any code changes or setup changes?

    3. For TCP, you can refer the file tcp.c located at <C2000WareInstallDir>\libraries\communications\Ethernet\third_party\lwip\lwip-2.1.2\src\core\tcp.c . The file header of this file provides instructions for TCP implementation. 

    4. You can refer the following thread

    https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/895034/tms320f28388d-f2838x-ethernet

    The throughput is ~33mbps with the LWIP stack. 

    Best Regards

    Siddharth

  • Siddharth,

    1. Please find the attached console.txt file. Let me know If anything I can do to achieve this requirement of porting RTOS on to CM. 

    **** Build of configuration Flash for project enet_lwip_udp ****
    
    "C:\\ti\\ccs1040\\ccs\\utils\\bin\\gmake" -k all 
     
    Building file: "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/examples/enet_lwip_udp/cm/enet_lwip_udp.c"
    Invoking: ARM Compiler
    "C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=none -me -O0 --opt_for_speed=0 --include_path="C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/apps/http" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip" --include_path="D:/V-TE-PWR/EthBased/TI_Workspace/enet_lwip_udp" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f2838x" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f2838x/driverlib_cm" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/examples/enet_lwip_udp/cm" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f2838x" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/apps" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/include" --define=_FLASH --define=ccs -g --diag_warning=225 --gen_func_subsections=on --abi=eabi --ual --preproc_with_compile --preproc_dependency="enet_lwip_udp.d_raw"  "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/examples/enet_lwip_udp/cm/enet_lwip_udp.c"
     
    >> Compilation failure
    subdir_rules.mk:9: recipe for target 'enet_lwip_udp.obj' failed
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/include/arch/sys_arch.h", line 56: error: identifier "xQueueHandle" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/include/arch/sys_arch.h", line 57: error: identifier "portQUEUE_OVERHEAD_BYTES" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/include/arch/sys_arch.h", line 63: error: identifier "xQueueHandle" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/include/arch/sys_arch.h", line 70: error: identifier "xTaskHandle" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include/lwip/sys.h", line 137: error: identifier "sys_mutex_t" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include/lwip/sys.h", line 143: error: identifier "sys_mutex_t" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include/lwip/sys.h", line 149: error: identifier "sys_mutex_t" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include/lwip/sys.h", line 155: error: identifier "sys_mutex_t" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include/lwip/sys.h", line 164: error: identifier "sys_mutex_t" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include/lwip/sys.h", line 174: error: identifier "sys_mutex_t" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include/lwip/tcpip.h", line 54: error: identifier "sys_mutex_t" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/examples/enet_lwip_udp/cm/enet_lwip_udp.c", line 409: warning: variable "txChan" was set but never used
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/examples/enet_lwip_udp/cm/enet_lwip_udp.c", line 410: warning: variable "descPtr" was declared but never referenced
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/examples/enet_lwip_udp/cm/enet_lwip_udp.c", line 411: warning: variable "tailPtr" was declared but never referenced
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/examples/enet_lwip_udp/cm/enet_lwip_udp.c", line 748: warning: declaration is not visible outside of function
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/examples/enet_lwip_udp/cm/enet_lwip_udp.c", line 822: warning: argument of type "struct ip_addr *" is incompatible with parameter of type "const ip_addr_t *"
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/examples/enet_lwip_udp/cm/enet_lwip_udp.c", line 843: warning: argument of type "void (*)(void *, struct udp_pcb *, struct pbuf *, struct ip_addr *, u16_t)" is incompatible with parameter of type "udp_recv_fn"
    11 errors detected in the compilation of "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/examples/enet_lwip_udp/cm/enet_lwip_udp.c".
    gmake: *** [enet_lwip_udp.obj] Error 1
    Building file: "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/examples/enet_lwip_udp/cm/f2838xif.c"
    Invoking: ARM Compiler
    "C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=none -me -O0 --opt_for_speed=0 --include_path="C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/apps/http" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip" --include_path="D:/V-TE-PWR/EthBased/TI_Workspace/enet_lwip_udp" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f2838x" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f2838x/driverlib_cm" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/examples/enet_lwip_udp/cm" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f2838x" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/apps" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/include" --define=_FLASH --define=ccs -g --diag_warning=225 --gen_func_subsections=on --abi=eabi --ual --preproc_with_compile --preproc_dependency="f2838xif.d_raw"  "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/examples/enet_lwip_udp/cm/f2838xif.c"
     
    >> Compilation failure
    subdir_rules.mk:16: recipe for target 'f2838xif.obj' failed
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/include/arch/sys_arch.h", line 56: error: identifier "xQueueHandle" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/include/arch/sys_arch.h", line 57: error: identifier "portQUEUE_OVERHEAD_BYTES" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/include/arch/sys_arch.h", line 63: error: identifier "xQueueHandle" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/include/arch/sys_arch.h", line 70: error: identifier "xTaskHandle" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include/lwip/sys.h", line 137: error: identifier "sys_mutex_t" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include/lwip/sys.h", line 143: error: identifier "sys_mutex_t" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include/lwip/sys.h", line 149: error: identifier "sys_mutex_t" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include/lwip/sys.h", line 155: error: identifier "sys_mutex_t" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include/lwip/sys.h", line 164: error: identifier "sys_mutex_t" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include/lwip/sys.h", line 174: error: identifier "sys_mutex_t" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include/lwip/tcpip.h", line 54: error: identifier "sys_mutex_t" is undefined
    11 errors detected in the compilation of "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/examples/enet_lwip_udp/cm/f2838xif.c".
    gmake: *** [f2838xif.obj] Error 1
    Building file: "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/apps/http/fs.c"
    Invoking: ARM Compiler
    "C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=none -me -O0 --opt_for_speed=0 --include_path="C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/apps/http" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip" --include_path="D:/V-TE-PWR/EthBased/TI_Workspace/enet_lwip_udp" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f2838x" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f2838x/driverlib_cm" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/examples/enet_lwip_udp/cm" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f2838x" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/apps" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/include" --define=_FLASH --define=ccs -g --diag_warning=225 --gen_func_subsections=on --abi=eabi --ual --preproc_with_compile --preproc_dependency="fs.d_raw"  "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/apps/http/fs.c"
    Finished building: "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/apps/http/fs.c"
     
    Building file: "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/apps/http/httpd.c"
    Invoking: ARM Compiler
    "C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=none -me -O0 --opt_for_speed=0 --include_path="C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/apps/http" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip" --include_path="D:/V-TE-PWR/EthBased/TI_Workspace/enet_lwip_udp" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f2838x" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f2838x/driverlib_cm" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/examples/enet_lwip_udp/cm" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f2838x" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/apps" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/include" --define=_FLASH --define=ccs -g --diag_warning=225 --gen_func_subsections=on --abi=eabi --ual --preproc_with_compile --preproc_dependency="httpd.d_raw"  "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/apps/http/httpd.c"
    Finished building: "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/apps/http/httpd.c"
     
    Building file: "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/utils/lwiplib.c"
    Invoking: ARM Compiler
    "C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=none -me -O0 --opt_for_speed=0 --include_path="C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/apps/http" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip" --include_path="D:/V-TE-PWR/EthBased/TI_Workspace/enet_lwip_udp" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f2838x" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f2838x/driverlib_cm" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/examples/enet_lwip_udp/cm" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/driverlib/f2838x" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/apps" --include_path="C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/include" --define=_FLASH --define=ccs -g --diag_warning=225 --gen_func_subsections=on --abi=eabi --ual --preproc_with_compile --preproc_dependency="lwiplib.d_raw"  "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/utils/lwiplib.c"
     
    >> Compilation failure
    subdir_rules.mk:37: recipe for target 'lwiplib.obj' failed
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/include/arch/sys_arch.h", line 56: error: identifier "xQueueHandle" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/include/arch/sys_arch.h", line 57: error: identifier "portQUEUE_OVERHEAD_BYTES" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/include/arch/sys_arch.h", line 63: error: identifier "xQueueHandle" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/include/arch/sys_arch.h", line 70: error: identifier "xTaskHandle" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include/lwip/sys.h", line 137: error: identifier "sys_mutex_t" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include/lwip/sys.h", line 143: error: identifier "sys_mutex_t" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include/lwip/sys.h", line 149: error: identifier "sys_mutex_t" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include/lwip/sys.h", line 155: error: identifier "sys_mutex_t" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include/lwip/sys.h", line 164: error: identifier "sys_mutex_t" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include/lwip/sys.h", line 174: error: identifier "sys_mutex_t" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/include/lwip/tcpip.h", line 54: error: identifier "sys_mutex_t" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/api/err.c", line 50: error: identifier "ENOMEM" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/api/err.c", line 51: error: identifier "ENOBUFS" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/api/err.c", line 52: error: identifier "EWOULDBLOCK" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/api/err.c", line 53: error: identifier "EHOSTUNREACH" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/api/err.c", line 54: error: identifier "EINPROGRESS" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/api/err.c", line 55: error: identifier "EINVAL" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/api/err.c", line 57: error: identifier "EADDRINUSE" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/api/err.c", line 58: error: identifier "EALREADY" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/api/err.c", line 59: error: identifier "EISCONN" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/api/err.c", line 60: error: identifier "ENOTCONN" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/api/err.c", line 62: error: identifier "ECONNABORTED" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/api/err.c", line 63: error: identifier "ECONNRESET" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/api/err.c", line 65: error: identifier "EIO" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/api/tcpip.c", line 65: error: identifier "sys_mutex_t" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/src/core/mem.c", line 390: error: identifier "sys_mutex_t" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 148: warning: missing return statement at end of non-void function "sys_now"
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 195: error: struct "<unnamed>" has no field "timeouts"
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 212: warning: variable "temp" was declared but never referenced
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 241: error: expected a declaration
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 248: warning: parsing restarts here after previous syntax error
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 250: error: expected a declaration
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 257: warning: parsing restarts here after previous syntax error
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 260: error: expected a declaration
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 261: error: expected a declaration
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 311: warning: parsing restarts here after previous syntax error
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 312: error: expected a declaration
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 361: warning: parsing restarts here after previous syntax error
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 362: error: expected a declaration
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 371: warning: parsing restarts here after previous syntax error
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 373: error: expected a declaration
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 374: error: expected a declaration
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 378: warning: parsing restarts here after previous syntax error
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 380: error: expected a declaration
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 387: warning: parsing restarts here after previous syntax error
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 390: error: expected a declaration
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 391: error: expected a declaration
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 463: warning: parsing restarts here after previous syntax error
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 464: error: expected a declaration
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 465: error: expected a declaration
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 525: warning: parsing restarts here after previous syntax error
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 529: error: expected a declaration
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 531: error: expected a declaration
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 614: warning: parsing restarts here after previous syntax error
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 615: error: identifier "i" is undefined
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 615: warning: external/internal linkage conflict with previous declaration
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 615: error: expected a ";"
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 616: error: expected a ";"
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 617: error: expected a ";"
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 632: error: expected a declaration
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/lwip-2.1.2/ports/C2000/sys_arch.c", line 633: error: expected a declaration
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/utils/lwiplib.c", line 170: warning: parsing restarts here after previous syntax error
    "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/utils/lwiplib.c", line 240: fatal error: #error directive: No RTOS is defined.  Please define an RTOS.
    48 errors and 1 catastrophic error detected in the compilation of "C:/ti/c2000/C2000Ware_4_00_00_00/libraries/communications/Ethernet/third_party/lwip/utils/lwiplib.c".
    Compilation terminated.
    gmake: *** [lwiplib.obj] Error 1
    gmake: Target 'all' not remade because of errors.
    
    **** Build Finished ****
    

    2. I used to earlier test with "enet_lwip" imported from c2000 v 3.04.00.00 but Now I'm testing with UDP example imported from "enet_lwip_udp" from c2000 v 4.00. No changes apart from that.

    3. I'll refer this and get back to you if face any issues or have any doubts.

     - Can you also let me know - How Do I Create multiple sockets an communicate with them?

    --Pranay

  • Pranay,

    I will take a look at the log and get back to you. 

    Best Regards

    Siddharth

  • Siddharth,

     - Also, Can you let me know How Do I Create multiple sockets an communicate with them?

    --Pranay

  • Hi Siddharth,

    Any updates?

    Also I have an update here:

    I'm able to send data using from Host PC over TCP to Server(F28388).

    But I'm stuck with sending back data to the Client (Host PC) which is received over IPC from CPU1 over TCP.


    I think I have to create a TCP PCB and implement the callback functions to send the data using the tcp_write and tcp_send functions. Correct ? Can you help me with that.

    Update 1:

    I have gone through "">e2e.ti.com/.../tmdscncd28388d-ethernet-trasmit---receive-issue" this link and used respective code as suggested from
    " https://github.com/MCUapps/lwip-gnu/blob/master/STM32F4DIS-BB/tcp_echo_server/src/tcp_echoserver.c".
    Using this code I'm able to receive data from client but unable to send custom data back (able to echo back received data).

    For sending data to client I'm using below snippet in IPC_ISR0 (that will be called when received any data from CPU1) :

    Try 1:

     {

      struct tcp_echoserver_struct *es = NULL;
        struct pbuf *pbuf1_tx;
        pbuf1_tx = pbuf_alloc(PBUF_TRANSPORT, PAYLOAD, PBUF_RAM);

        if (pbuf1_tx != NULL)
        {
            pbuf1_tx->payload = (void*) aTxBuf;
            pbuf1_tx->tot_len = aDataLength;  //17  
            pbuf1_tx->len = aDataLength;   //17      
            es->p = pbuf1_tx;
            tcp_echoserver_send(tcp_echoserver_pcb, es);

        }
        if (pbuf1_tx!= NULL)
            pbuf_free(pbuf1_tx);

    }

    Try2:

     {

      struct tcp_echoserver_struct *es = NULL;
        struct pbuf *pbuf1_tx;
        pbuf1_tx = pbuf_alloc(PBUF_TRANSPORT, PAYLOAD, PBUF_RAM);

        if (pbuf1_tx != NULL)
        {
            pbuf1_tx->payload = (void*) aTxBuf;
            pbuf1_tx->tot_len = aDataLength;  //17  
            pbuf1_tx->len = aDataLength;   //17      
             
            err = tcp_write(tcp_echoserver_pcb, pbuf1_tx->payload, pbuf1_tx->len, 1);

        }
        if (pbuf1_tx!= NULL)
            pbuf_free(pbuf1_tx);

    }

    In Try2 and Try1:
    pbuf1_tx->payload = (void*) aTxBuf; -- is giving me Error: cannot load from Non-primitive location. As shown in pic

    and
    In Try2 : "err" is returning me "-11" Error code that says ERR_CONN - Not connected.

    In Try1: Once I try to execute tcp_echoserver_send() Function it is redirecting to FaultISR();

    Thanks and regards,

    Pranay.

  • siddharth,

    And I'm able to communicate back and forth from a client to server now using TCP and UDP both using the stm32's github echo server example.

     - Can you let me know How Do I Create multiple sockets an communicate with them?

    Pranay.