]>
git.feebdaed.xyz Git - 0xmirror/SOEM.git/log
Hans-Erik Floryd [Thu, 26 Jun 2025 11:45:23 +0000 (13:45 +0200)]
Let coetest/redtest build on other platforms
Use the new osal functions to let tests build on all supported
platforms.
Change-Id: I6519ee55588e7bf0dff8d412679db268abbe86ce
Hans-Erik Floryd [Mon, 23 Jun 2025 12:06:36 +0000 (14:06 +0200)]
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
Hans-Erik Floryd [Thu, 26 Jun 2025 08:21:36 +0000 (10:21 +0200)]
Update win32/rtk nic driver
Incorporate changes from the Linux NIC driver.
Change-Id: Ibc273c3dec01c0b872876686c95aad064ff25f2f
Hans-Erik Floryd [Thu, 19 Jun 2025 12:49:06 +0000 (14:49 +0200)]
Delete obsolete or duplicate tests
Portable sample code is now in the sample folder.
Change-Id: I6d9315c92152ca4321bec325f78e64849e6b1e47
Hans-Erik Floryd [Thu, 19 Jun 2025 12:48:20 +0000 (14:48 +0200)]
Add contrib folder
Move unmaintained ports and samples to contrib folder.
Change-Id: Ie1b1a8290a0e2204b6e4e2e5c838585eb88d9e81
Hans-Erik Floryd [Thu, 19 Jun 2025 11:15:05 +0000 (13:15 +0200)]
Add eni_test sample
Add a simple test showing how to use the ENI parser.
Change-Id: I23755d29b10a40fc3ddb21b0780f7e000d9fbdfe
Mattias Nilsson [Fri, 18 Oct 2024 12:20:06 +0000 (14:20 +0200)]
Add basic ENI support
Change-Id: I6abcb3b4a1248acadbbe2ed93fcd901304320d02
Hans-Erik Floryd [Fri, 13 Jun 2025 12:55:14 +0000 (14:55 +0200)]
Add more samples
Change-Id: I6bf219887efd88a69a257815f1974759d56fd3c3
Hans-Erik Floryd [Mon, 2 Jun 2025 12:58:39 +0000 (14:58 +0200)]
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
Hans-Erik Floryd [Mon, 2 Jun 2025 14:12:37 +0000 (16:12 +0200)]
Add options header file
Add an options header file containing build-time configurable
settings.
Change-Id: Icfd71571ea6a3033416106cd114e6d464a47ecdc
Hans-Erik Floryd [Thu, 26 Jun 2025 14:41:02 +0000 (16:41 +0200)]
Run clang-format on sources
Change-Id: Ide59897b87104bfb71e953b7f8dace00e441e245
Hans-Erik Floryd [Mon, 2 Jun 2025 14:12:45 +0000 (16:12 +0200)]
Add .clang-format
Change-Id: I48865eab483d0ed38d268c805d0007876971b924
Hans-Erik Floryd [Fri, 16 May 2025 14:43:03 +0000 (16:43 +0200)]
Refactor repository layout (step 2 of 2)
Rename files ethercat to ec_
Change-Id: If79f133fa37147bf509a3a75b0f4e14de860fea3
Hans-Erik Floryd [Fri, 16 May 2025 15:02:21 +0000 (17:02 +0200)]
Refactor repository layout (step 1 of 2)
Create include,src and test folders and move files accordingly.
Change-Id: I3caf7a8de2ba1a9ad5a9cedbaad3942657a3753d
Hans-Erik Floryd [Wed, 2 Jul 2025 14:30:00 +0000 (16:30 +0200)]
Remove legacy API
Change-Id: I4c8bcbfc84408d26267d88117bd89dd07231e786
Hans-Erik Floryd [Fri, 4 Jul 2025 15:23:05 +0000 (17:23 +0200)]
Update jenkins build
Add more information to job display name.
Change-Id: Ica1bd80efcb0d909ef945561fdfc4baae90404a7
Hans-Erik Floryd [Wed, 30 Apr 2025 12:40:55 +0000 (14:40 +0200)]
Add jenkins build
Change-Id: Id05cfdc0ccca85f6e534f6dfab7b39479c67da16
Hans-Erik Floryd [Wed, 30 Apr 2025 12:36:36 +0000 (14:36 +0200)]
MinGW support
Support building SOEM with MinGW.
Change-Id: I7ea59e168ae382b99d7904cffc0719701d44cefc
Hans-Erik Floryd [Thu, 24 Apr 2025 08:21:45 +0000 (10:21 +0200)]
Modernize CMakeLists
Change-Id: Ie3877370918315d1452d2ea0a0013f12bffcbcc2
Hans-Erik Floryd [Thu, 24 Apr 2025 08:15:32 +0000 (10:15 +0200)]
Add win32 mutex
Change-Id: I40a29cfa3f3b669f04140b6dcf572d0e8d2f6509
Hans-Erik Floryd [Wed, 23 Apr 2025 19:51:11 +0000 (21:51 +0200)]
Update rt-kernel port
Add a method for choosing L2 driver and add support for sabresd board.
Change-Id: Ib5bbcb53990ffdbe4345cf99f69c44192250e0d8
Hans-Erik Floryd [Thu, 17 Apr 2025 13:51:21 +0000 (15:51 +0200)]
Remove unused stdio.h
Change-Id: I27f8020ec375dede88a1dc87e531dcd9d7ad6f26
Hans-Erik Floryd [Thu, 17 Apr 2025 10:55:52 +0000 (12:55 +0200)]
Workaround for -Wstringop-truncation
Replace strncpy with memcpy to eliminate warnings about potential
truncation of the NULL terminator. This warning is likely a false
positive, as the NULL terminator is explicitly appended after the copy
operation.
Change-Id: I47bf9cc312506e20dbcb5ebe1ae1ac05d3b742d5
Hans-Erik Floryd [Fri, 28 Feb 2025 09:59:42 +0000 (10:59 +0100)]
Fix build error
Make ec_mbxreceive take the same arguments as ecx_mbxreceive apart
from the context.
Change-Id: I3a0748a34792ae36b583332c3b247d9b4e9751f4
Andreas Karlsson [Mon, 9 Dec 2024 13:38:16 +0000 (14:38 +0100)]
Update EoE and config overlap to dynamic mailboxes
- Remove old mbxreceive
- Rename mbxreceive2 to mbxreceive
- Add EoE to mbxreceive
- Refactor EoE to use dynamic mailbox handling
- Add mailbox status mapping to config overlap
- correct length calculations in send_process_data
Change-Id: Ia51402a8c73e59dfb6ed23d98916156f81b17103
Hans-Erik Floryd [Thu, 26 Sep 2024 11:49:01 +0000 (13:49 +0200)]
Improved mailbox handling
This commit includes extensive changes across multiple files to
refactor the mailbox handling system and improve performance and
reliability in EtherCAT communication.
Update from Arthur Ketels
20240911 .
Change-Id: I1177aea8b71156671a465473b7393af76be19c1c
Hans-Erik Floryd [Tue, 8 Jul 2025 07:24:49 +0000 (09:24 +0200)]
Bump version
Change-Id: Id0aa1f9d3e9c9fb244087b294ed54da8c1894180
Hans-Erik Floryd [Tue, 8 Jul 2025 13:41:25 +0000 (15:41 +0200)]
Change licensing
This software is now dual-licensed, see LICENSE.md for details.
Change-Id: I646ab4a6e69f9f8c3cdfadd9ad3e4ca7007f729d
Ryan Zoeller [Thu, 27 Feb 2025 17:29:28 +0000 (11:29 -0600)]
Add AL status codes from ETG.1020
Tore Fuglestad [Mon, 1 Jul 2024 12:08:50 +0000 (14:08 +0200)]
fix windows warning
avoid : error C4703: potentially uninitialized local pointer variable 'prev_adapter' used
Fix #831
Change-Id: Iacc399b5d58fe95a55ca96a87ca6b37be306db26
ddi-kkugler [Mon, 5 May 2025 14:44:49 +0000 (07:44 -0700)]
Fix single device inputs/outputs overruning segment size (#907)
* Fix single device inputs/outputs overruning segment size
* Refactor to pack segments tightly.
* Allow segments 2-64 to be EC_MAXLRWDATA bytes.
* Move wkc calcs into relevant config map functions.
* Only split slave data between segments when it is larger than one segment
* Only update wkc when we include data for the current device
Sebastian Block [Fri, 26 Aug 2016 13:19:41 +0000 (15:19 +0200)]
FoE: resend packet on BUSY answer while writing
Change-Id: Ifbcfd90628fd92297434ecc3dba4a1299cdcd7a9
Hans-Erik Floryd [Tue, 15 Apr 2025 10:20:32 +0000 (12:20 +0200)]
Increase possible FOE data size limit to max mailbox length
Handle slaves having large mailboxes in bootstrap. Calculate data size
based on max mailbox size minus FOE overhead.
Change-Id: Ie62afcb278e6a9f84f8be004e1a2173b19673810
Iain Anderson [Fri, 16 Aug 2024 10:01:11 +0000 (11:01 +0100)]
Add serial number to ec_slave
Henrik Fransson [Wed, 17 Jul 2024 06:30:49 +0000 (08:30 +0200)]
Check that socket was successfully created
Henrik Fransson [Tue, 16 Jul 2024 16:03:35 +0000 (18:03 +0200)]
Fix return value check when setting up NIC
Johannes Kauffmann [Tue, 23 Jan 2024 08:04:54 +0000 (09:04 +0100)]
tests: fix linked list leak
Don't overwrite the original pointer returned by ec_find_adapters(),
otherwise the linked list is leaked. Instead, save original pointer to
the head of the list use and `adapters` as a temporary variable. Pass
the original pointer to ec_free_adapters().
For win32, ec_free_adapters() was missing entirely.
ArthurKetels [Wed, 12 Mar 2025 08:33:07 +0000 (09:33 +0100)]
Merge pull request #895 from OpenEtherCATsociety/fix/al_ctrl_16bit_access
Use 16bit access for AL Ctrl
Matthias Schoepfer [Wed, 31 Jul 2024 15:36:30 +0000 (17:36 +0200)]
CMakeLists.txt: Add possibility to build library as shared
This adds the option to build the soem library also as shared object.
Note that the default is untouched, so by default, it will still build
a static library.
The [BUILD_SHARED_LIBS](https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html)
is the standard way of doing it, many tools use this semantics to influence
the output to be the desired type (whichever you want).
Signed-off-by: Matthias Schoepfer <matthias.schoepfer@googlemail.com>
Andreas Karlsson [Mon, 10 Mar 2025 14:39:51 +0000 (15:39 +0100)]
Use 16bit access for AL Ctrl
By using 16bit access Wireshark will dissect the
the access accordingly.
fixes #894
ArthurKetels [Mon, 27 Jan 2025 09:52:57 +0000 (10:52 +0100)]
Merge pull request #875 from jalius/master
Update to support MSYS2/GCC
jawelch [Fri, 24 Jan 2025 20:43:37 +0000 (13:43 -0700)]
Fix MSVC build: include lean windows.h, include stdlib.h for malloc/free
Jalius Welch [Fri, 29 Nov 2024 08:39:29 +0000 (01:39 -0700)]
include minwindefs.h for missing HANDLE definition
Jalius Welch [Fri, 29 Nov 2024 08:39:25 +0000 (01:39 -0700)]
Address unused parameter and unused argument warnings.
Jalius Welch [Fri, 29 Nov 2024 08:39:22 +0000 (01:39 -0700)]
Fix build errors due to signature mismatch in osal_thread_create.
Fix missing timezone struct declaration.
Jalius Welch [Fri, 29 Nov 2024 08:38:44 +0000 (01:38 -0700)]
Update CMakeLists for non-MSVC, remove standard library files, add GCC-style struct packing
Hans-Erik Floryd [Wed, 3 Apr 2024 14:10:31 +0000 (16:10 +0200)]
Fix potential buffer overflow in exc_FOEread/write
An excessively long filename could overflow the mailbox buffer. Fix by
limiting the filename size to EC_MAXFOEDATA.
Problem found and fix proposed by m1etz.
Windsgo [Thu, 21 Mar 2024 06:51:29 +0000 (14:51 +0800)]
Fix `add_timespec` in other codes besides `red_test` (#794)
nakarlsson [Wed, 6 Dec 2023 18:54:05 +0000 (19:54 +0100)]
Allow FoE write of 0byte file (#769)
If FoE write of a file is done, no check
of incoming size is performed. If the
file is 0byte, a FoE Write Request is
sent but no ACK since dofinalzero
is initialized to FALSE.
fixes #766
Co-authored-by: Andreas Karlsson <andreas.karlsson@rt-labs.com>
rtmagj [Fri, 13 Oct 2023 13:31:27 +0000 (15:31 +0200)]
Update simple_test.c
rtmagj [Fri, 13 Oct 2023 13:31:01 +0000 (15:31 +0200)]
Update eoe_test.c
Magnus Johansson [Fri, 13 Oct 2023 09:40:42 +0000 (11:40 +0200)]
Remove variable for unused parameter.
Torsten Robitzki [Fri, 2 Dec 2022 18:03:35 +0000 (19:03 +0100)]
Local variable Size is only written and causes compiler warning (#670)
Patrick Laza [Wed, 19 Oct 2022 14:06:55 +0000 (16:06 +0200)]
Added config_map_aligned to use byte aligned outputs and inputs (#645)
lbckmnn [Mon, 19 Sep 2022 05:47:55 +0000 (07:47 +0200)]
remove boot state from ecx_readstate and add some documentation (#643)
* remove boot state from ecx_readstate and documentation
lbckmnn [Sat, 2 Jul 2022 09:32:02 +0000 (11:32 +0200)]
also configure the last SM (#622)
fixes #617
lbckmnn [Mon, 20 Jun 2022 06:29:17 +0000 (08:29 +0200)]
const correctness in coe functions (#620)
* add const in RxPDO and SDOwrite
* doc typo
* uniform indention in ethercatcoe.h
Co-authored-by: Lukas Beckmann <lukas.beckmann@yuanda-robotics.de>
nakarlsson [Thu, 16 Jun 2022 05:34:04 +0000 (07:34 +0200)]
Merge pull request #614 from notofug/avoid_warnings
avoid 'maybe used unitialized' warnings
Tore Fuglestad [Thu, 12 May 2022 06:27:07 +0000 (08:27 +0200)]
avoid 'may be used unitialized' warnings
gcc : -Wmaybe-uninitialized or -Wuninitialized
nakarlsson [Wed, 30 Mar 2022 17:42:43 +0000 (19:42 +0200)]
Merge pull request #601 from rhdlilj/master
Using context->maxslave instead EC_MAXSLAVE
lilj [Wed, 16 Mar 2022 09:25:06 +0000 (17:25 +0800)]
Update ethercatconfig.c
Using context->maxslave instead EC_MAXSLAVE
ArthurKetels [Thu, 13 Jan 2022 21:58:03 +0000 (22:58 +0100)]
Merge pull request #533 from yschmid-levi/fix-win32-timeperiod
matching call to timeEndPeriod and timeBeginPeriod
ArthurKetels [Tue, 26 Oct 2021 18:46:34 +0000 (20:46 +0200)]
Merge pull request #564 from hefloryd/master
Bump cmake version
Hans-Erik Floryd [Tue, 26 Oct 2021 07:47:36 +0000 (09:47 +0200)]
Bump cmake version
Bump CMake version to 3.9, which the oldest version supporting the
project DESCRIPTION option (see
https://cmake.org/cmake/help/latest/command/project.html#command:project),
which was introduced by commit
59821cb .
CMake policy CMP0048 is set to NEW by default since 3.0 and can be
removed.
Fixes #559, fixes #512
ArthurKetels [Tue, 26 Oct 2021 06:57:15 +0000 (08:57 +0200)]
Merge pull request #563 from hefloryd/master
Update build matrix
Hans-Erik Floryd [Mon, 25 Oct 2021 09:53:02 +0000 (11:53 +0200)]
Update build matrix
Ubuntu 16.04 is now deprecated. Remove it and add ubuntu-latest.
ArthurKetels [Tue, 28 Sep 2021 19:19:56 +0000 (21:19 +0200)]
Merge pull request #553 from OpenEtherCATsociety/mheden/slaveinfo
slaveinfo: improve SDO printout
Mikael Heden [Wed, 8 Sep 2021 13:36:33 +0000 (15:36 +0200)]
slaveinfo: improve SDO printout
nakarlsson [Fri, 10 Sep 2021 06:59:18 +0000 (08:59 +0200)]
Merge pull request #552 from OpenEtherCATsociety/show-adapters
Examples: show avaialable adapters if not specified
Mikael Heden [Wed, 8 Sep 2021 07:41:30 +0000 (09:41 +0200)]
Examples: show avaialable adapters if not specified
ArthurKetels [Tue, 31 Aug 2021 17:01:24 +0000 (19:01 +0200)]
Merge pull request #548 from eglimi/fix_546
Fix some UB cases. Closes #546
Michael Egli [Tue, 31 Aug 2021 04:47:48 +0000 (06:47 +0200)]
Fix some UB cases. Closes #546
There are two cases of UB that are fixed in this commit.
1. In ethercatmain.c, there are two left shifts of 31:
(1 << 31)
Because 1 is a signed int by default, the result cannot be represented
in an int. The fix is to explicitly make the 1 unsigned.
2. In ethercatconfig.c, for slaves that have no inputs, the code would
apply an offset to a NULL pointer. The fix is to test that the slave
has inputs available before applying the offset.
Both cases were found by clang with the help of UBSan.
nakarlsson [Tue, 10 Aug 2021 05:17:09 +0000 (07:17 +0200)]
Merge pull request #539 from Wanga/master
Add group checking for slave input offset calculation
fixes #538
Wanga [Wed, 4 Aug 2021 12:32:33 +0000 (20:32 +0800)]
Add group checking for slave input offset calculation
Some slaves can be at different group and do not use overlap PDO map,
Let ec_config_overlap_map_group only change the input offset for current group.
ArthurKetels [Mon, 2 Aug 2021 18:58:30 +0000 (20:58 +0200)]
Merge pull request #537 from ArthurKetels/master
Add missing PO2SOconfigx() hook to ecx_reconfig_slave()
ArthurKetels [Mon, 2 Aug 2021 18:52:22 +0000 (20:52 +0200)]
Add missing PO2SOconfigx() hook to ecx_reconfig_slave()
Yves Schmid [Tue, 13 Jul 2021 07:13:03 +0000 (09:13 +0200)]
matching call to timeEndPeriod and timeBeginPeriod
"You must match each call to timeBeginPeriod with a call to
timeEndPeriod, specifying the same minimum resolution in both calls."
ArthurKetels [Wed, 2 Jun 2021 19:02:23 +0000 (21:02 +0200)]
Merge pull request #521 from nakarlsson/master
Adjust size of ec_EOE_t to max mailbox size
andreas karlsson [Wed, 2 Jun 2021 18:18:25 +0000 (20:18 +0200)]
Adjust size of ec_EOE_t to max mailbox size
fix #514
nakarlsson [Mon, 12 Apr 2021 05:45:09 +0000 (07:45 +0200)]
Merge pull request #486 from ntd/simple_test-revamp
simple_test revamp
Nicola Fontana [Thu, 25 Feb 2021 09:01:21 +0000 (10:01 +0100)]
Add simple_ng test program
This is a rewrite of `simple_test` with the following major changes:
* portable codebase, so no splitting between different OS;
* no threads: they are not needed for such simple task;
* use newer APIs (i.e., ecx_... functions).
nakarlsson [Thu, 8 Apr 2021 04:54:10 +0000 (06:54 +0200)]
Merge pull request #499 from alexkalmuk/fix-osal-linux-time
Fix linux osal timers and osal_current_time
nakarlsson [Wed, 7 Apr 2021 17:42:22 +0000 (19:42 +0200)]
Merge pull request #498 from alexkalmuk/firm-update-test-check-state
Check for reaching pre_op state in firm_update
Alex Kalmuk [Tue, 6 Apr 2021 21:16:50 +0000 (00:16 +0300)]
Fix linux osal timers and osal_current_time
Alex Kalmuk [Tue, 6 Apr 2021 17:46:29 +0000 (20:46 +0300)]
Check for reaching pre_op state in firm_update
nakarlsson [Tue, 6 Apr 2021 12:49:15 +0000 (14:49 +0200)]
Merge pull request #496 from alexkalmuk/fix-red-test-timespec-overflow
Fix red test timespec overflow
Alex Kalmuk [Fri, 2 Apr 2021 20:13:28 +0000 (23:13 +0300)]
Fix timespec overflow in red_test
Alex Kalmuk [Fri, 2 Apr 2021 20:11:36 +0000 (23:11 +0300)]
Fix red_test build with gcc 9
nakarlsson [Thu, 4 Mar 2021 14:27:50 +0000 (15:27 +0100)]
Merge pull request #481 from alex-brinkman/apb-add-userdata
Proposal: Add Userdata to ecx_context
Alex Brinkman [Thu, 18 Feb 2021 17:30:33 +0000 (09:30 -0800)]
add userdata initialization to default ecx_contextt
Alex Brinkman [Thu, 18 Feb 2021 17:11:29 +0000 (09:11 -0800)]
add STATUS to CMake message statements
nakarlsson [Wed, 17 Feb 2021 14:39:27 +0000 (15:39 +0100)]
Merge pull request #480 from hefloryd/feature/gh-actions
Migrate to Github Actions
Hans-Erik Floryd [Wed, 17 Feb 2021 10:54:41 +0000 (11:54 +0100)]
Migrate to Github Actions
Alex Brinkman [Sun, 14 Feb 2021 17:22:48 +0000 (09:22 -0800)]
improved logic around BUILD_TESTS
Alex Brinkman [Sat, 13 Feb 2021 20:26:38 +0000 (12:26 -0800)]
add userdata to ec_context
Hans-Erik Floryd [Sun, 3 Jan 2021 13:34:09 +0000 (14:34 +0100)]
Merge pull request #471 from jorritolthuis/master
Change include in ethercateoe.h
Jorrit Olthuis [Sat, 2 Jan 2021 10:15:08 +0000 (11:15 +0100)]
Change include in ethercateoe.h (#470)
ArthurKetels [Mon, 9 Nov 2020 21:46:25 +0000 (22:46 +0100)]
Merge pull request #460 from OpenEtherCATsociety/ArthurKetels-add_timespec
Arthur ketels add timespec
ArthurKetels [Mon, 9 Nov 2020 21:41:50 +0000 (22:41 +0100)]
Update red_test.c
ArthurKetels [Mon, 9 Nov 2020 21:39:56 +0000 (22:39 +0100)]
Fix add_timespec