MarcOhlf
a7c74cea13
FoE: Fix invalid access of MbxOut after FOE_BUSY ( #929 )
...
Mailbox (via FOEp) was written to after dropped back to pool and
MbxOut was NULL when calling ecx_mbxsend.
* obtain a new mailbox from the pool before filling it again.
* fix invalid pointer cast in ecx_mbxsend.
2025-08-15 15:58:17 +02:00
Hans-Erik Floryd
304d1c05ea
Update README.md and LICENSE.md
...
Remove TU/e as copyright holder. There is no longer any code
associated with that copyright holder remaining in the repository. All
contributions now reflect the current state of ownership and
development.
Change-Id: I00515c0d240cb7c17cc1919f9f9d618a902271e4
v2.0.0
2025-07-11 15:20:03 +02:00
Hans-Erik Floryd
e4e50d36ca
Fix windows mac addresses
...
Use configured addresses.
Change-Id: I907f2f98513991b04c9a2bcb3a0b5c4501450aea
2025-07-11 14:29:51 +02:00
Hans-Erik Floryd
a6b2ac05c7
Install README.md and LICENSE.md
...
Change-Id: Iddc28ceb35c8c935529cf8dff238f9ab27ba8fff
2025-07-11 14:19:24 +02:00
Hans-Erik Floryd
bd9f7b86c4
Update headers
...
Fix some headers that were missed in previous commits.
Change-Id: Ifa08fedf9199ba8c8a0766293bc7933e7f7475f2
2025-07-11 14:13:56 +02:00
Hans-Erik Floryd
5596efe291
Fix rt-kernel build
...
Remove obsolete files
Change-Id: I22c7b1e15137ec227be9d4ecb06f8f8e91886639
2025-07-11 14:08:13 +02:00
Hans-Erik Floryd
2cb532fb6c
Fix .git-blame-ignore-revs
...
Fix SHA:s.
Change-Id: Ida98cfad37c905bf31abaff8560ba180bf6e1e96
2025-07-11 13:32:45 +02:00
Hans-Erik Floryd
a51dcbfb81
Update README/LICENSE.md
...
Fix copyright year and formatting.
Change-Id: Ie0191796054f36bcc801c149a0bd583a86368924
2025-07-11 13:25:08 +02:00
Hans-Erik Floryd
61ce29e101
Update README
...
Change-Id: Ifee42f203c4de6623c80f92ca52a3db1c14792cd
2025-07-11 12:30:04 +02:00
Hans-Erik Floryd
f403a3ad60
Remove obsolete files
...
Change-Id: Id4ca8c905a6a4a1dc8ad6389f23ed04f028f5dd5
2025-07-11 11:28:30 +02:00
Hans-Erik Floryd
0093291cfa
Update sample headers
...
Use same header for all sources.
Change-Id: Ie30f55f8fe64e6815482dd2662372e54791e833e
2025-07-11 11:28:30 +02:00
Hans-Erik Floryd
fdb246c8b2
Add slave argument to eoe_test
...
Let the user specify the EoE slave to use.
Change-Id: I835110cedd7de30419d947073a04370e1e121972
2025-07-11 11:28:30 +02:00
Hans-Erik Floryd
f93f66f822
Merge samples
...
Merge simple_test, red_test and coetest samples into ec_sample for
easier maintenance. The ec_sample program demonstrates distributed
clock synchronization and slave mailbox cyclic handling in addition to
running a simple process data loop.
Change-Id: If0e9cd484e701902fddffc7165e0c83b70a06979
2025-07-11 11:28:30 +02:00
Hans-Erik Floryd
f3c4d11754
Fix ecx_mbxreceive for non-cyclic mailbox handler
...
mbx was not assigned when mailbox was successfully read in non-cyclic
mailbox handler mode.
Change-Id: I282eaf373b63e4f2ad22d5fa74c9e6f8731ed47d
2025-07-11 11:28:30 +02:00
Hans-Erik Floryd
9be3f850ce
Cleanup doxygen comments
...
Change-Id: I111fe88e4ea8141b5eecb28defd5173471181da1
2025-07-11 11:26:19 +02:00
Hans-Erik Floryd
238bf9cec2
Remove obsolete docs
...
Change-Id: I148b56491969707a169c906f2509c400afcdd68a
2025-07-11 11:14:05 +02:00
Hans-Erik Floryd
30b21f92ad
Set output directory for default preset
...
Set default preset to place sample binaries in the build bin folder.
Change-Id: I3c5d07d8ff5062b39d567269a3e86d03a6441fa1
2025-07-10 12:00:34 +02:00
Hans-Erik Floryd
eb79de569a
Fix -Wstringop-truncation error
...
Fix compiler error for length of name equal to EC_MAXLEN_ADAPTERNAME.
Change-Id: Ibfc475fc83d9f11a1080fe130a86b7dd8616e4fc
2025-07-10 11:59:46 +02:00
Hans-Erik Floryd
a943a5706a
Cleanup eoe_test
...
Change-Id: Ie65ab4b17e51e749dc0c3e1a2ce84f2707478f13
2025-07-10 11:59:45 +02:00
Hans-Erik Floryd
1786bb62ac
Add sanity check for mailbox size in ecx_EOEsend
...
Ensure that ecx_EOEsend is called with a valid slave to prevent memory
corruption. This check addresses potential issues when mistakenly
invoked on devices like the EK1100 EtherCAT coupler.
Change-Id: I82ceff6c3f22c69a1531e27a30586bd6f20afe44
2025-07-10 11:59:09 +02:00
Hans-Erik Floryd
573cf4aadf
Fix spelling
...
Change-Id: I1dc05f26dfb32ca1584aeb3a31fbd525cafb55cb
2025-07-10 11:59:03 +02:00
Hans-Erik Floryd
c8636c40d6
Increase timeout for eeprom write
...
Increase timeout to 5ms with default EC_LOCALDELAY of 200us.
See issue #832 .
Change-Id: I8c28c927cb0425ac36255e86707e3b89426b283d
2025-07-10 11:38:59 +02:00
Hans-Erik Floryd
c40fd2c98c
Fix mscv warnings
...
Change-Id: Icb8d8bd0a756acda12b7fb392f199f9216aebd7a
2025-07-10 11:38:59 +02:00
Hans-Erik Floryd
5827f10baa
Inline ecx_contextt
...
Simplify user applications by allocating space for exc_contextt
members in the struct directly.
Change-Id: If53062539e265326c420020188621887435681f3
2025-07-10 11:38:59 +02:00
Hans-Erik Floryd
0c291d4f92
Fix buffer overflow in slaveinfo
...
The string buffer in SDO2string could overflow for large octet
strings. Fix by limiting output to the size of the output string.
Change-Id: Ic45056918570d8320a02f70a8795b6b863a590ff
2025-07-10 11:38:59 +02:00
Hans-Erik Floryd
ed3ce755f2
Rename PACKED to OSAL_PACKED
...
Use a less generic name to avoid namespace conflicts.
Fixes #835 .
Change-Id: I222878742ed7d02d19ad50ff732adabfe4f0729a
2025-07-10 11:38:57 +02:00
Hans-Erik Floryd
3377d1d8ae
Remove ecx_config_init usetable argument
...
The usetable argument was a leftover from the legacy API which was
removed in a previous commit.
Change-Id: I2fe5fdf9ed2e2c0b118dff43bf5d50b5809adbd7
2025-07-10 11:38:42 +02:00
Hans-Erik Floryd
3188367ef6
Add overlap and align modes to context
...
Simplify the API by adding overlap and byte alignment modes to the
context. SOEM can then call the correct functions internally. As a
consequence the following functions are removed from the public API:
ecx_config_overlap_map_group
ecx_config_map_group_aligned
ecx_send_overlap_processdata_group
ecx_send_overlap_processdata
Change-Id: I0404c4fbaa6be68be4c584af0cc9d62e780c7aaa
2025-07-10 11:38:42 +02:00
Hans-Erik Floryd
3ecdba7618
Use ec_group for input/output size in samples
...
The ec_slave Ibyte count now includes one byte mailbox state per
slave. Use ec_group Ibytes instead. ec_group does not have Ibits
however.
Change-Id: Ic25563fda1d6ba2753ebf47fc45b70cc336c8671
2025-07-10 10:23:07 +02:00
Hans-Erik Floryd
114bdfe176
Rename SOEM_BUILD_UTILS to SOEM_BUILD_SAMPLES
...
Rename option to correspond with folder containing sources.
Change-Id: I7c722d5fff8da28d39cde718962a626123ed0cd7
2025-07-10 10:23:07 +02:00
Hans-Erik Floryd
b0a1d6e56f
Fix group type in mailbox handling api
...
Use uint8 consistently.
Change-Id: I18c98a461e620235a9208545a3cfa5da317ec919
2025-07-10 10:23:07 +02:00
Hans-Erik Floryd
3075ce1252
Document mailbox handling api
...
Change-Id: I2225b19eaf66ac2075d7e10ac2cbefb671a3954b
2025-07-10 10:23:07 +02:00
Hans-Erik Floryd
f607afe810
Fix mailbox handling debug prints
...
Change-Id: I9c09c439254b117bc748e04ed428dceaab98fcaf
2025-07-10 10:23:07 +02:00
Hans-Erik Floryd
a8f871ea1e
Add .git-blame-ignore-revs
...
Add blame ignore file. This file contains a list of commits to be
ignored for blaming purposes. Set this file as the default ignore file
by running:
$ git config blame.ignoreRevsFile .git-blame-ignore-revs
Change-Id: I30fe644875069b3dbf04da603d110c9873a572d4
2025-07-10 10:23:07 +02:00
Hans-Erik Floryd
b75690bc69
Remove rt-kernel toolchain
...
Remove local toolchain in favour of version from installed rt-kernel
tree.
Change-Id: I4d27254c5884f45b7d055d441c4528ee85a4b526
2025-07-10 10:23:07 +02:00
Hans-Erik Floryd
f9d1101907
Document osal.h
...
Change-Id: I1ff4bfb2b872e1b4af8ca8c2778815adb3aec070
2025-07-10 10:23:07 +02:00
Hans-Erik Floryd
676ebb4cb5
Fix msvc warning
...
segmentdata may be used uninitialized if slave returns EC_FOE_BUSY
before segmentdata is set.
Change-Id: I4fdc4460e76af03d4de0839cd3b163117621ce40
2025-07-10 10:23:07 +02:00
Hans-Erik Floryd
d5124435f0
Let coetest/redtest build on other platforms
...
Use the new osal functions to let tests build on all supported
platforms.
Change-Id: I6519ee55588e7bf0dff8d412679db268abbe86ce
2025-07-10 10:23:07 +02:00
Hans-Erik Floryd
7c2da72988
Add OSAL functions for monotonic time
...
This commit adds osal_get_monotonic_time() and
osal_monotonic_sleep(). These functions are designed to facilitate
synchronization with DC time, which can achieve nanosecond precision.
To support this functionality, the ec_timet structure has been
refactored to hold time values in nanoseconds, eliminating the need to
maintain separate time representations.
Change-Id: I039a006ccdb21ba35c437ab76e44e5153c711998
2025-07-10 10:23:07 +02:00
Hans-Erik Floryd
a2af88bc79
Update win32/rtk nic driver
...
Incorporate changes from the Linux NIC driver.
Change-Id: Ibc273c3dec01c0b872876686c95aad064ff25f2f
2025-07-10 10:23:07 +02:00
Hans-Erik Floryd
dc11bdd460
Delete obsolete or duplicate tests
...
Portable sample code is now in the sample folder.
Change-Id: I6d9315c92152ca4321bec325f78e64849e6b1e47
2025-07-10 10:23:07 +02:00
Hans-Erik Floryd
5d87e8d9a2
Add contrib folder
...
Move unmaintained ports and samples to contrib folder.
Change-Id: Ie1b1a8290a0e2204b6e4e2e5c838585eb88d9e81
2025-07-10 10:23:07 +02:00
Hans-Erik Floryd
d1c95dfb7d
Add eni_test sample
...
Add a simple test showing how to use the ENI parser.
Change-Id: I23755d29b10a40fc3ddb21b0780f7e000d9fbdfe
2025-07-10 10:23:07 +02:00
Mattias Nilsson
2eec21727e
Add basic ENI support
...
Change-Id: I6abcb3b4a1248acadbbe2ed93fcd901304320d02
2025-07-09 17:21:28 +02:00
Hans-Erik Floryd
08064ae3fa
Add more samples
...
Change-Id: I6bf219887efd88a69a257815f1974759d56fd3c3
2025-07-09 17:21:26 +02:00
Hans-Erik Floryd
51efd156cc
Restore linux nicdrv recv non-blocking behaviour
...
In commit [091a465], socket send/recv timeouts were temporarily
disabled. Restore non-blocking behaviour on recv by calling recv with
MSG_DONTWAIT.
Closes #451 .
Change-Id: Ia5966ad55deec4d9364838f4ea4880fce37273fa
2025-07-09 17:20:48 +02:00
Hans-Erik Floryd
7b71cf8aa4
Add options header file
...
Add an options header file containing build-time configurable
settings.
Change-Id: Icfd71571ea6a3033416106cd114e6d464a47ecdc
2025-07-09 17:20:48 +02:00
Hans-Erik Floryd
0ae3d2f056
Run clang-format on sources
...
Change-Id: Ide59897b87104bfb71e953b7f8dace00e441e245
2025-07-09 17:20:48 +02:00
Hans-Erik Floryd
c5987aead6
Add .clang-format
...
Change-Id: I48865eab483d0ed38d268c805d0007876971b924
2025-07-09 17:20:48 +02:00
Hans-Erik Floryd
9582886c2c
Refactor repository layout (step 2 of 2)
...
Rename files ethercat to ec_
Change-Id: If79f133fa37147bf509a3a75b0f4e14de860fea3
2025-07-09 17:20:48 +02:00