]> git.feebdaed.xyz Git - 0xmirror/SOEM.git/log
0xmirror/SOEM.git
4 months agoFoE: Fix invalid access of MbxOut after FOE_BUSY (#929) master
MarcOhlf [Fri, 15 Aug 2025 13:58:17 +0000 (15:58 +0200)]
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.

5 months agoUpdate README.md and LICENSE.md
Hans-Erik Floryd [Fri, 11 Jul 2025 13:17:11 +0000 (15:17 +0200)]
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

5 months agoFix windows mac addresses
Hans-Erik Floryd [Fri, 11 Jul 2025 12:29:51 +0000 (14:29 +0200)]
Fix windows mac addresses

Use configured addresses.

Change-Id: I907f2f98513991b04c9a2bcb3a0b5c4501450aea

5 months agoInstall README.md and LICENSE.md
Hans-Erik Floryd [Fri, 11 Jul 2025 12:17:46 +0000 (14:17 +0200)]
Install README.md and LICENSE.md

Change-Id: Iddc28ceb35c8c935529cf8dff238f9ab27ba8fff

5 months agoUpdate headers
Hans-Erik Floryd [Fri, 11 Jul 2025 12:13:56 +0000 (14:13 +0200)]
Update headers

Fix some headers that were missed in previous commits.

Change-Id: Ifa08fedf9199ba8c8a0766293bc7933e7f7475f2

5 months agoFix rt-kernel build
Hans-Erik Floryd [Fri, 11 Jul 2025 12:08:13 +0000 (14:08 +0200)]
Fix rt-kernel build

Remove obsolete files

Change-Id: I22c7b1e15137ec227be9d4ecb06f8f8e91886639

5 months agoFix .git-blame-ignore-revs
Hans-Erik Floryd [Fri, 11 Jul 2025 11:32:45 +0000 (13:32 +0200)]
Fix .git-blame-ignore-revs

Fix SHA:s.

Change-Id: Ida98cfad37c905bf31abaff8560ba180bf6e1e96

5 months agoUpdate README/LICENSE.md
Hans-Erik Floryd [Fri, 11 Jul 2025 11:24:03 +0000 (13:24 +0200)]
Update README/LICENSE.md

Fix copyright year and formatting.

Change-Id: Ie0191796054f36bcc801c149a0bd583a86368924

5 months agoUpdate README
Hans-Erik Floryd [Fri, 11 Jul 2025 10:27:27 +0000 (12:27 +0200)]
Update README

Change-Id: Ifee42f203c4de6623c80f92ca52a3db1c14792cd

5 months agoRemove obsolete files
Hans-Erik Floryd [Fri, 11 Jul 2025 09:19:17 +0000 (11:19 +0200)]
Remove obsolete files

Change-Id: Id4ca8c905a6a4a1dc8ad6389f23ed04f028f5dd5

5 months agoUpdate sample headers
Hans-Erik Floryd [Fri, 11 Jul 2025 09:17:47 +0000 (11:17 +0200)]
Update sample headers

Use same header for all sources.

Change-Id: Ie30f55f8fe64e6815482dd2662372e54791e833e

5 months agoAdd slave argument to eoe_test
Hans-Erik Floryd [Fri, 11 Jul 2025 09:08:50 +0000 (11:08 +0200)]
Add slave argument to eoe_test

Let the user specify the EoE slave to use.

Change-Id: I835110cedd7de30419d947073a04370e1e121972

5 months agoMerge samples
Hans-Erik Floryd [Fri, 11 Jul 2025 09:08:46 +0000 (11:08 +0200)]
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

5 months agoFix ecx_mbxreceive for non-cyclic mailbox handler
Hans-Erik Floryd [Thu, 10 Jul 2025 14:20:10 +0000 (16:20 +0200)]
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

5 months agoCleanup doxygen comments
Hans-Erik Floryd [Thu, 10 Jul 2025 11:18:41 +0000 (13:18 +0200)]
Cleanup doxygen comments

Change-Id: I111fe88e4ea8141b5eecb28defd5173471181da1

5 months agoRemove obsolete docs
Hans-Erik Floryd [Fri, 11 Jul 2025 09:14:05 +0000 (11:14 +0200)]
Remove obsolete docs

Change-Id: I148b56491969707a169c906f2509c400afcdd68a

5 months agoSet output directory for default preset
Hans-Erik Floryd [Thu, 10 Jul 2025 09:51:09 +0000 (11:51 +0200)]
Set output directory for default preset

Set default preset to place sample binaries in the build bin folder.

Change-Id: I3c5d07d8ff5062b39d567269a3e86d03a6441fa1

5 months agoFix -Wstringop-truncation error
Hans-Erik Floryd [Thu, 10 Jul 2025 09:23:56 +0000 (11:23 +0200)]
Fix -Wstringop-truncation error

Fix compiler error for length of name equal to EC_MAXLEN_ADAPTERNAME.

Change-Id: Ibfc475fc83d9f11a1080fe130a86b7dd8616e4fc

5 months agoCleanup eoe_test
Hans-Erik Floryd [Thu, 10 Jul 2025 08:31:31 +0000 (10:31 +0200)]
Cleanup eoe_test

Change-Id: Ie65ab4b17e51e749dc0c3e1a2ce84f2707478f13

5 months agoAdd sanity check for mailbox size in ecx_EOEsend
Hans-Erik Floryd [Thu, 10 Jul 2025 07:48:21 +0000 (09:48 +0200)]
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

5 months agoFix spelling
Hans-Erik Floryd [Thu, 10 Jul 2025 09:59:03 +0000 (11:59 +0200)]
Fix spelling

Change-Id: I1dc05f26dfb32ca1584aeb3a31fbd525cafb55cb

5 months agoIncrease timeout for eeprom write
Hans-Erik Floryd [Wed, 9 Jul 2025 18:25:45 +0000 (20:25 +0200)]
Increase timeout for eeprom write

Increase timeout to 5ms with default EC_LOCALDELAY of 200us.

See issue #832.

Change-Id: I8c28c927cb0425ac36255e86707e3b89426b283d

5 months agoFix mscv warnings
Hans-Erik Floryd [Tue, 8 Jul 2025 15:58:24 +0000 (17:58 +0200)]
Fix mscv warnings

Change-Id: Icb8d8bd0a756acda12b7fb392f199f9216aebd7a

5 months agoInline ecx_contextt
Hans-Erik Floryd [Thu, 10 Jul 2025 08:22:28 +0000 (10:22 +0200)]
Inline ecx_contextt

Simplify user applications by allocating space for exc_contextt
members in the struct directly.

Change-Id: If53062539e265326c420020188621887435681f3

5 months agoFix buffer overflow in slaveinfo
Hans-Erik Floryd [Tue, 8 Jul 2025 09:37:40 +0000 (11:37 +0200)]
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

5 months agoRename PACKED to OSAL_PACKED
Hans-Erik Floryd [Mon, 7 Jul 2025 12:04:25 +0000 (14:04 +0200)]
Rename PACKED to OSAL_PACKED

Use a less generic name to avoid namespace conflicts.

Fixes #835.

Change-Id: I222878742ed7d02d19ad50ff732adabfe4f0729a

5 months agoRemove ecx_config_init usetable argument
Hans-Erik Floryd [Thu, 3 Jul 2025 20:02:11 +0000 (22:02 +0200)]
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

5 months agoAdd overlap and align modes to context
Hans-Erik Floryd [Thu, 3 Jul 2025 19:27:25 +0000 (21:27 +0200)]
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

5 months agoUse ec_group for input/output size in samples
Hans-Erik Floryd [Thu, 3 Jul 2025 11:05:04 +0000 (13:05 +0200)]
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

5 months agoRename SOEM_BUILD_UTILS to SOEM_BUILD_SAMPLES
Hans-Erik Floryd [Mon, 30 Jun 2025 09:35:23 +0000 (11:35 +0200)]
Rename SOEM_BUILD_UTILS to SOEM_BUILD_SAMPLES

Rename option to correspond with folder containing sources.

Change-Id: I7c722d5fff8da28d39cde718962a626123ed0cd7

5 months agoFix group type in mailbox handling api
Hans-Erik Floryd [Thu, 26 Jun 2025 20:22:37 +0000 (22:22 +0200)]
Fix group type in mailbox handling api

Use uint8 consistently.

Change-Id: I18c98a461e620235a9208545a3cfa5da317ec919

5 months agoDocument mailbox handling api
Hans-Erik Floryd [Thu, 26 Jun 2025 20:09:29 +0000 (22:09 +0200)]
Document mailbox handling api

Change-Id: I2225b19eaf66ac2075d7e10ac2cbefb671a3954b

5 months agoFix mailbox handling debug prints
Hans-Erik Floryd [Thu, 26 Jun 2025 20:07:48 +0000 (22:07 +0200)]
Fix mailbox handling debug prints

Change-Id: I9c09c439254b117bc748e04ed428dceaab98fcaf

5 months agoAdd .git-blame-ignore-revs
Hans-Erik Floryd [Thu, 26 Jun 2025 18:39:11 +0000 (20:39 +0200)]
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

5 months agoRemove rt-kernel toolchain
Hans-Erik Floryd [Thu, 26 Jun 2025 18:30:15 +0000 (20:30 +0200)]
Remove rt-kernel toolchain

Remove local toolchain in favour of version from installed rt-kernel
tree.

Change-Id: I4d27254c5884f45b7d055d441c4528ee85a4b526

5 months agoDocument osal.h
Hans-Erik Floryd [Thu, 26 Jun 2025 15:13:48 +0000 (17:13 +0200)]
Document osal.h

Change-Id: I1ff4bfb2b872e1b4af8ca8c2778815adb3aec070

5 months agoFix msvc warning
Hans-Erik Floryd [Thu, 26 Jun 2025 12:24:41 +0000 (14:24 +0200)]
Fix msvc warning

segmentdata may be used uninitialized if slave returns EC_FOE_BUSY
before segmentdata is set.

Change-Id: I4fdc4460e76af03d4de0839cd3b163117621ce40

5 months agoLet coetest/redtest build on other platforms
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

5 months agoAdd OSAL functions for monotonic time
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

5 months agoUpdate win32/rtk nic driver
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

5 months agoDelete obsolete or duplicate tests
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

5 months agoAdd contrib folder
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

5 months agoAdd eni_test sample
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

5 months agoAdd basic ENI support
Mattias Nilsson [Fri, 18 Oct 2024 12:20:06 +0000 (14:20 +0200)]
Add basic ENI support

Change-Id: I6abcb3b4a1248acadbbe2ed93fcd901304320d02

5 months agoAdd more samples
Hans-Erik Floryd [Fri, 13 Jun 2025 12:55:14 +0000 (14:55 +0200)]
Add more samples

Change-Id: I6bf219887efd88a69a257815f1974759d56fd3c3

5 months agoRestore linux nicdrv recv non-blocking behaviour
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

5 months agoAdd options header file
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

5 months agoRun clang-format on sources
Hans-Erik Floryd [Thu, 26 Jun 2025 14:41:02 +0000 (16:41 +0200)]
Run clang-format on sources

Change-Id: Ide59897b87104bfb71e953b7f8dace00e441e245

5 months agoAdd .clang-format
Hans-Erik Floryd [Mon, 2 Jun 2025 14:12:45 +0000 (16:12 +0200)]
Add .clang-format

Change-Id: I48865eab483d0ed38d268c805d0007876971b924

5 months agoRefactor repository layout (step 2 of 2)
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

5 months agoRefactor repository layout (step 1 of 2)
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

5 months agoRemove legacy API
Hans-Erik Floryd [Wed, 2 Jul 2025 14:30:00 +0000 (16:30 +0200)]
Remove legacy API

Change-Id: I4c8bcbfc84408d26267d88117bd89dd07231e786

5 months agoUpdate jenkins build
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

5 months agoAdd jenkins build
Hans-Erik Floryd [Wed, 30 Apr 2025 12:40:55 +0000 (14:40 +0200)]
Add jenkins build

Change-Id: Id05cfdc0ccca85f6e534f6dfab7b39479c67da16

5 months agoMinGW support
Hans-Erik Floryd [Wed, 30 Apr 2025 12:36:36 +0000 (14:36 +0200)]
MinGW support

Support building SOEM with MinGW.

Change-Id: I7ea59e168ae382b99d7904cffc0719701d44cefc

5 months agoModernize CMakeLists
Hans-Erik Floryd [Thu, 24 Apr 2025 08:21:45 +0000 (10:21 +0200)]
Modernize CMakeLists

Change-Id: Ie3877370918315d1452d2ea0a0013f12bffcbcc2

5 months agoAdd win32 mutex
Hans-Erik Floryd [Thu, 24 Apr 2025 08:15:32 +0000 (10:15 +0200)]
Add win32 mutex

Change-Id: I40a29cfa3f3b669f04140b6dcf572d0e8d2f6509

5 months agoUpdate rt-kernel port
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

5 months agoRemove unused stdio.h
Hans-Erik Floryd [Thu, 17 Apr 2025 13:51:21 +0000 (15:51 +0200)]
Remove unused stdio.h

Change-Id: I27f8020ec375dede88a1dc87e531dcd9d7ad6f26

5 months agoWorkaround for -Wstringop-truncation
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

5 months agoFix build error
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

5 months agoUpdate EoE and config overlap to dynamic mailboxes
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

5 months agoImproved mailbox handling
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

5 months agoBump version
Hans-Erik Floryd [Tue, 8 Jul 2025 07:24:49 +0000 (09:24 +0200)]
Bump version

Change-Id: Id0aa1f9d3e9c9fb244087b294ed54da8c1894180

5 months agoChange licensing
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

5 months agoAdd AL status codes from ETG.1020
Ryan Zoeller [Thu, 27 Feb 2025 17:29:28 +0000 (11:29 -0600)]
Add AL status codes from ETG.1020

5 months agofix windows warning
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

7 months agoFix single device inputs/outputs overruning segment size (#907)
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

8 months agoFoE: resend packet on BUSY answer while writing
Sebastian Block [Fri, 26 Aug 2016 13:19:41 +0000 (15:19 +0200)]
FoE: resend packet on BUSY answer while writing

Change-Id: Ifbcfd90628fd92297434ecc3dba4a1299cdcd7a9

8 months agoIncrease possible FOE data size limit to max mailbox length
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

8 months agoAdd serial number to ec_slave
Iain Anderson [Fri, 16 Aug 2024 10:01:11 +0000 (11:01 +0100)]
Add serial number to ec_slave

8 months agoCheck that socket was successfully created
Henrik Fransson [Wed, 17 Jul 2024 06:30:49 +0000 (08:30 +0200)]
Check that socket was successfully created

8 months agoFix return value check when setting up NIC
Henrik Fransson [Tue, 16 Jul 2024 16:03:35 +0000 (18:03 +0200)]
Fix return value check when setting up NIC

8 months agotests: fix linked list leak
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.

9 months agoMerge pull request #895 from OpenEtherCATsociety/fix/al_ctrl_16bit_access
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

9 months agoCMakeLists.txt: Add possibility to build library as shared
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>
9 months agoUse 16bit access for AL Ctrl
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

10 months agoMerge pull request #875 from jalius/master
ArthurKetels [Mon, 27 Jan 2025 09:52:57 +0000 (10:52 +0100)]
Merge pull request #875 from jalius/master

Update to support MSYS2/GCC

11 months agoFix MSVC build: include lean windows.h, include stdlib.h for malloc/free
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

12 months agoinclude minwindefs.h for missing HANDLE definition
Jalius Welch [Fri, 29 Nov 2024 08:39:29 +0000 (01:39 -0700)]
include minwindefs.h for missing HANDLE definition

12 months agoAddress unused parameter and unused argument warnings.
Jalius Welch [Fri, 29 Nov 2024 08:39:25 +0000 (01:39 -0700)]
Address unused parameter and unused argument warnings.

12 months agoFix build errors due to signature mismatch in osal_thread_create.
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.

12 months agoUpdate CMakeLists for non-MSVC, remove standard library files, add GCC-style struct...
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

20 months agoFix potential buffer overflow in exc_FOEread/write
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.

21 months agoFix `add_timespec` in other codes besides `red_test` (#794)
Windsgo [Thu, 21 Mar 2024 06:51:29 +0000 (14:51 +0800)]
Fix `add_timespec` in other codes besides `red_test` (#794)

2 years agoAllow FoE write of 0byte file (#769)
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>
2 years agoUpdate simple_test.c
rtmagj [Fri, 13 Oct 2023 13:31:27 +0000 (15:31 +0200)]
Update simple_test.c

2 years agoUpdate eoe_test.c
rtmagj [Fri, 13 Oct 2023 13:31:01 +0000 (15:31 +0200)]
Update eoe_test.c

2 years agoRemove variable for unused parameter.
Magnus Johansson [Fri, 13 Oct 2023 09:40:42 +0000 (11:40 +0200)]
Remove variable for unused parameter.

3 years agoLocal variable Size is only written and causes compiler warning (#670)
Torsten Robitzki [Fri, 2 Dec 2022 18:03:35 +0000 (19:03 +0100)]
Local variable Size is only written and causes compiler warning (#670)

3 years agoAdded config_map_aligned to use byte aligned outputs and inputs (#645)
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)

3 years agoremove boot state from ecx_readstate and add some documentation (#643)
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

3 years agoalso configure the last SM (#622)
lbckmnn [Sat, 2 Jul 2022 09:32:02 +0000 (11:32 +0200)]
also configure the last SM (#622)

fixes #617

3 years agoconst correctness in coe functions (#620)
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>
3 years agoMerge pull request #614 from notofug/avoid_warnings
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

3 years agoavoid 'may be 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

3 years agoMerge pull request #601 from rhdlilj/master
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

3 years agoUpdate ethercatconfig.c
lilj [Wed, 16 Mar 2022 09:25:06 +0000 (17:25 +0800)]
Update ethercatconfig.c

Using context->maxslave instead EC_MAXSLAVE

3 years agoMerge pull request #533 from yschmid-levi/fix-win32-timeperiod
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

4 years agoMerge pull request #564 from hefloryd/master
ArthurKetels [Tue, 26 Oct 2021 18:46:34 +0000 (20:46 +0200)]
Merge pull request #564 from hefloryd/master

Bump cmake version