OpenEtherCATsociety / SOES

Simple Open Source EtherCAT Slave
Other
578 stars 249 forks source link

generic EoE stack parts #46

Closed nakarlsson closed 5 years ago

nakarlsson commented 5 years ago

Application sample for lwIP will be added later

nakarlsson commented 5 years ago

I've tested with ping & netio via TwinCAT and lwIP on target. Tested layer 2 and getIP & setIP via SOEM hack.

Mbx size 128 to force fragmentation


D:\Project\LAM\SOES\soes_ws\rt-kernel\test\netio\windows>win32-i386.exe -b 1000 -t 192.168.9.200

NETIO - Network Throughput Benchmark, Version 1.26 (C) 1997-2005 Kai Uwe Rommel

TCP connection established. Packet size 1000 bytes: 63833 Byte/s Tx, 19308 Byte/s Rx. Done.

D:\Project\LAM\SOES\soes_ws\rt-kernel\test\netio\windows>ping -l 1024 192.168.9.200

Pinging 192.168.9.200 with 1024 bytes of data: Reply from 192.168.9.200: bytes=1024 time=64ms TTL=255 Reply from 192.168.9.200: bytes=1024 time=52ms TTL=255 Reply from 192.168.9.200: bytes=1024 time=51ms TTL=255 Reply from 192.168.9.200: bytes=1024 time=52ms TTL=255

Ping statistics for 192.168.9.200: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 51ms, Maximum = 64ms, Average = 54ms


nakarlsson commented 5 years ago

Added eoe to cmake systems, ( forgot it before ) Also aded a more consistant handling of the IP address, the eoe_ip4_addr stor the address in network order. Input/Output uint32 is in host order as one might expect

nakarlsson commented 5 years ago

ping @ArthurKetels @hefloryd

ArthurKetels commented 5 years ago

Looks OK. Test application is needed though.

nakarlsson commented 5 years ago

I've added a prototype application, so the PR no consist of two commits. Do a hard reset or re-clone my branch to get the latest.

For the application, basically it is main.c that matters, the rest is just business as usual to be able to run the application, slightly modified with EEPROM, ESI info and an alternative ISR, EVENT handler to trigger stack action on by lwIP posted frames.

ArthurKetels commented 5 years ago

Is see no need to delay this. Just merge it as well as the SOEM part.