Sebastian Block
83d2f22758
FoE: resend packet on BUSY answer while writing
...
Change-Id: Ifbcfd90628fd92297434ecc3dba4a1299cdcd7a9
2025-04-15 15:59:10 +02:00
Hans-Erik Floryd
fed0fd538a
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
2025-04-15 15:59:10 +02:00
Iain Anderson
76863fe873
Add serial number to ec_slave
2025-04-15 11:59:42 +02:00
Henrik Fransson
3011f0a46b
Check that socket was successfully created
2025-04-15 11:36:51 +02:00
Henrik Fransson
298744937e
Fix return value check when setting up NIC
2025-04-15 11:36:51 +02:00
Johannes Kauffmann
2f08b49aac
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.
2025-04-08 14:33:08 +02:00
ArthurKetels
7271d3663e
Merge pull request #895 from OpenEtherCATsociety/fix/al_ctrl_16bit_access
...
Use 16bit access for AL Ctrl
2025-03-12 09:33:07 +01:00
Matthias Schoepfer
5c35c34a91
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 >
2025-03-11 19:44:21 +01:00
Andreas Karlsson
61840d4cbb
Use 16bit access for AL Ctrl
...
By using 16bit access Wireshark will dissect the
the access accordingly.
fixes #894
2025-03-10 15:39:51 +01:00
ArthurKetels
2752dc2588
Merge pull request #875 from jalius/master
...
Update to support MSYS2/GCC
2025-01-27 10:52:57 +01:00
jawelch
49f2d8af36
Fix MSVC build: include lean windows.h, include stdlib.h for malloc/free
2025-01-24 13:43:37 -07:00
Jalius Welch
cc7caf4751
include minwindefs.h for missing HANDLE definition
2024-11-29 01:39:29 -07:00
Jalius Welch
1ae89e23cb
Address unused parameter and unused argument warnings.
2024-11-29 01:39:25 -07:00
Jalius Welch
30c5768485
Fix build errors due to signature mismatch in osal_thread_create.
...
Fix missing timezone struct declaration.
2024-11-29 01:39:22 -07:00
Jalius Welch
7189adba3c
Update CMakeLists for non-MSVC, remove standard library files, add GCC-style struct packing
2024-11-29 01:38:44 -07:00
Hans-Erik Floryd
83c6264f99
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.
2024-04-04 09:55:57 +02:00
Windsgo
d478bce787
Fix add_timespec in other codes besides red_test ( #794 )
2024-03-21 07:51:29 +01:00
nakarlsson and Andreas Karlsson
1817b8b4fe
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 >
2023-12-06 19:54:05 +01:00
rtmagj
c5db2741ee
Update simple_test.c
2023-10-30 10:53:28 +01:00
rtmagj
42aadc190b
Update eoe_test.c
2023-10-30 10:53:28 +01:00
Magnus Johansson
f5a32959b2
Remove variable for unused parameter.
2023-10-30 10:53:28 +01:00
Torsten Robitzki
a901500618
Local variable Size is only written and causes compiler warning ( #670 )
2022-12-02 19:03:35 +01:00
Patrick Laza
6a5babfec9
Added config_map_aligned to use byte aligned outputs and inputs ( #645 )
2022-10-19 16:06:55 +02:00
lbckmnn
26fc5dd8e3
remove boot state from ecx_readstate and add some documentation ( #643 )
...
* remove boot state from ecx_readstate and documentation
2022-09-19 07:47:55 +02:00
lbckmnn
42ec9bf238
also configure the last SM ( #622 )
...
fixes #617
2022-07-02 11:32:02 +02:00
lbckmnn and Lukas Beckmann
9183e3068a
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 >
2022-06-20 08:29:17 +02:00
nakarlsson
0b8f888f2c
Merge pull request #614 from notofug/avoid_warnings
...
avoid 'maybe used unitialized' warnings
2022-06-16 07:34:04 +02:00
Tore Fuglestad
e604e98446
avoid 'may be used unitialized' warnings
...
gcc : -Wmaybe-uninitialized or -Wuninitialized
2022-06-16 07:04:30 +02:00
nakarlsson
703a6e08d6
Merge pull request #601 from rhdlilj/master
...
Using context->maxslave instead EC_MAXSLAVE
2022-03-30 19:42:43 +02:00
lilj
c879aabd02
Update ethercatconfig.c
...
Using context->maxslave instead EC_MAXSLAVE
2022-03-16 17:25:06 +08:00
ArthurKetels
9b6ebd6e43
Merge pull request #533 from yschmid-levi/fix-win32-timeperiod
...
matching call to timeEndPeriod and timeBeginPeriod
2022-01-13 22:58:03 +01:00
ArthurKetels
def119bbd0
Merge pull request #564 from hefloryd/master
...
Bump cmake version
2021-10-26 20:46:34 +02:00
Hans-Erik Floryd
ceab31ceda
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
2021-10-26 09:59:20 +02:00
ArthurKetels
5fa8824d33
Merge pull request #563 from hefloryd/master
...
Update build matrix
2021-10-26 08:57:15 +02:00
Hans-Erik Floryd
e6f04db1b4
Update build matrix
...
Ubuntu 16.04 is now deprecated. Remove it and add ubuntu-latest.
2021-10-25 11:53:51 +02:00
ArthurKetels
6f04be13c9
Merge pull request #553 from OpenEtherCATsociety/mheden/slaveinfo
...
slaveinfo: improve SDO printout
2021-09-28 21:19:56 +02:00
Mikael Heden
447fd0ae2a
slaveinfo: improve SDO printout
2021-09-13 09:06:51 +02:00
nakarlsson
354466a534
Merge pull request #552 from OpenEtherCATsociety/show-adapters
...
Examples: show avaialable adapters if not specified
2021-09-10 08:59:18 +02:00
Mikael Heden
38f61fdad0
Examples: show avaialable adapters if not specified
2021-09-08 09:41:30 +02:00
ArthurKetels
4b81d4099d
Merge pull request #548 from eglimi/fix_546
...
Fix some UB cases. Closes #546
2021-08-31 19:01:24 +02:00
Michael Egli
ff448e3485
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.
2021-08-31 13:02:10 +02:00
nakarlsson
be1a2df6b2
Merge pull request #539 from Wanga/master
...
Add group checking for slave input offset calculation
fixes #538
2021-08-10 07:17:09 +02:00
Wanga
9fef1fc23c
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.
2021-08-04 20:43:50 +08:00
ArthurKetels
04f7baec68
Merge pull request #537 from ArthurKetels/master
...
Add missing PO2SOconfigx() hook to ecx_reconfig_slave()
2021-08-02 20:58:30 +02:00
ArthurKetels
6982a7648f
Add missing PO2SOconfigx() hook to ecx_reconfig_slave()
2021-08-02 20:52:22 +02:00
Yves Schmid
c90c1abd1f
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."
2021-07-13 09:13:03 +02:00
ArthurKetels
219670218b
Merge pull request #521 from nakarlsson/master
...
Adjust size of ec_EOE_t to max mailbox size
2021-06-02 21:02:23 +02:00
andreas karlsson
9de0889802
Adjust size of ec_EOE_t to max mailbox size
...
fix #514
2021-06-02 20:18:25 +02:00
nakarlsson
f9db4f2b23
Merge pull request #486 from ntd/simple_test-revamp
...
simple_test revamp
2021-04-12 07:45:09 +02:00
Nicola Fontana
a50ed4bf4c
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).
2021-04-10 16:49:17 +02:00