Re-implementation of rustbootd's ecat_el6695_* examples as a single binary with fixes found in review and on hardware: - DC-follow PLL hardened against period-2 hunting: slew-limited anchor (+/-50us/cycle), bistable-trap snap re-anchor, re-prime on stale deadline - drift-free absolute-grid ticker mode; probe mode for timestamp forensics - bounded-memory online stats (histograms), graceful SIGINT/SIGTERM shutdown with full report, error-streak abort - timestamp plausibility filter comparing against the previous raw sample (avoids the deadlock after a startup outlier) - XFC scope waveform options: --el2202 (with --el2202-dual), --el2262, --el1252 latch timestamp readback with per-channel edge statistics - register access unified in regs.rs: named bit constants everywhere, read-modify-write for enable/activation bytes - vendored patched ethercrab 0.7.1 (sdo_write_complete, send_raw_coe) Verified on J1900 (PREEMPT_RT 6.6.135): 600k cycles/600s exact 1 kHz, tx/rx zero errors, phase_err p50=164us std=5us; EL2202<->EL1252 loopback edge interval mean 2000.24us std=24.65us.
158 lines
3.9 KiB
TOML
158 lines
3.9 KiB
TOML
[package]
|
|
name = "ethercrab"
|
|
categories = ["science::robotics", "no-std", "network-programming"]
|
|
version = "0.7.1"
|
|
edition = "2024"
|
|
license = "MIT OR Apache-2.0"
|
|
readme = "README.md"
|
|
repository = "https://github.com/ethercrab-rs/ethercrab"
|
|
documentation = "https://docs.rs/ethercrab"
|
|
description = "A pure Rust EtherCAT MainDevice supporting std and no_std environments"
|
|
keywords = ["ethercat", "beckhoff", "automation", "fieldbus", "robotics"]
|
|
exclude = ["dumps", "doc", "NOTES.md", "SPECNOTES.md"]
|
|
resolver = "2"
|
|
rust-version = "1.85"
|
|
|
|
[workspace]
|
|
members = ["ethercrab-wire", "ethercrab-wire-derive"]
|
|
|
|
[package.metadata.docs.rs]
|
|
default-target = "x86_64-unknown-linux-gnu"
|
|
targets = ["x86_64-unknown-linux-gnu", "x86_64-pc-windows-gnu"]
|
|
|
|
[dependencies]
|
|
async-io = { version = "2.0.0", optional = true }
|
|
atomic-waker = "1.1.2"
|
|
atomic_enum = "0.3.0"
|
|
bitflags = "2.9.0"
|
|
defmt = { version = "0.3.5", optional = true }
|
|
embassy-time = "0.4.0"
|
|
embedded-io-async = { version = "0.6.0", default-features = false }
|
|
futures-lite = { version = "2.0.0", default-features = false }
|
|
heapless = "0.8.0"
|
|
log = { version = "0.4.27", optional = true, default-features = false }
|
|
sealed = "0.6.0"
|
|
serde = { version = "1.0.190", features = ["derive"], optional = true }
|
|
smlang = "0.8.0"
|
|
ethercrab-wire = { version = "0.3.0", path = "./ethercrab-wire" }
|
|
spin = { version = "0.10.0", default-features = false, features = [
|
|
"lock_api",
|
|
"rwlock",
|
|
] }
|
|
crc = { version = "3.2.1", default-features = false }
|
|
lock_api = "0.4.13"
|
|
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
pnet_datalink = { version = "0.35.0", features = ["std"], optional = true }
|
|
pcap = "2.2.0"
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
libc = "0.2.180"
|
|
nix = { version = "0.31.1", features = ["net"] }
|
|
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
|
io-uring = { version = "0.7.4", optional = true }
|
|
smallvec = { version = "1.13.1", features = ["const_generics"] }
|
|
slab = "0.4.12"
|
|
timerfd = "1.5.0"
|
|
xsk-rs = { version = "0.8.0", optional = true }
|
|
|
|
[dev-dependencies]
|
|
arbitrary = { version = "1.3.1", features = ["derive"] }
|
|
criterion = { version = "0.5.1", default-features = false, features = [
|
|
"cargo_bench_support",
|
|
] }
|
|
env_logger = "0.11.6"
|
|
heckcheck = "2.0.1"
|
|
pcap-file = "2.0.0"
|
|
pretty_assertions = "1.4.0"
|
|
smol = "2.0.0"
|
|
tokio = { version = "1.33.0", features = [
|
|
"rt-multi-thread",
|
|
"macros",
|
|
"sync",
|
|
"time",
|
|
] }
|
|
thread-priority = "1.2.0"
|
|
ta = "0.5.0"
|
|
cassette = "0.3.0"
|
|
csv = "1.3.0"
|
|
serde = { version = "1.0.190", default-features = false, features = ["derive"] }
|
|
signal-hook = "0.3.17"
|
|
core_affinity = "0.8.1"
|
|
spin_sleep = "1.2.1"
|
|
quanta = "0.12.3"
|
|
savefile = { version = "0.18.5", default-features = false }
|
|
savefile-derive = { version = "0.18.5", default-features = false }
|
|
simple_logger = { version = "5.0.0", default-features = false }
|
|
smoltcp = { version = "0.12.0", default-features = false, features = [
|
|
"medium-ethernet",
|
|
"proto-ipv4",
|
|
"socket-raw",
|
|
] }
|
|
|
|
[features]
|
|
default = ["std", "io-uring"]
|
|
defmt = [
|
|
"dep:defmt",
|
|
"embedded-io-async/defmt-03",
|
|
"heapless/defmt-03",
|
|
"ethercrab-wire/defmt-03",
|
|
]
|
|
log = ["dep:log"]
|
|
std = [
|
|
"dep:pnet_datalink",
|
|
"dep:async-io",
|
|
"log",
|
|
"futures-lite/std",
|
|
"embedded-io-async/std",
|
|
"ethercrab-wire/std",
|
|
"spin/std",
|
|
]
|
|
xdp = ["dep:xsk-rs"]
|
|
serde = ["dep:serde", "bitflags/serde"]
|
|
io-uring = ["dep:io-uring"]
|
|
# [[example]]
|
|
# name = "akd"
|
|
# required-features = ["std"]
|
|
|
|
[[example]]
|
|
name = "xdp"
|
|
required-features = ["std", "xdp"]
|
|
|
|
[[example]]
|
|
name = "dc"
|
|
required-features = ["std"]
|
|
|
|
# [[example]]
|
|
# name = "ec400"
|
|
# required-features = ["std"]
|
|
|
|
[[example]]
|
|
name = "ek1100"
|
|
required-features = ["std"]
|
|
|
|
[[example]]
|
|
name = "multiple-groups"
|
|
required-features = ["std"]
|
|
|
|
[[example]]
|
|
name = "io-uring"
|
|
required-features = ["std", "io-uring"]
|
|
|
|
[[example]]
|
|
name = "smol-io-uring"
|
|
required-features = ["std", "io-uring"]
|
|
|
|
[[bench]]
|
|
name = "pdu_loop"
|
|
harness = false
|
|
|
|
[[bench]]
|
|
name = "frame"
|
|
harness = false
|
|
|
|
[profile.profiling]
|
|
inherits = "release"
|
|
debug = true
|