Hi, I’m the Toradex AI Assistant.
I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.
Did you like my answer?

Hello! Thank you for your detailed question.
The issue you’re facing in debug mode is commonly related to how the EtherCAT link layer library (libemllFslFec.so) is found and loaded in the container environment. In debug mode, path or permission mismatches can prevent the library from being accessible.
Steps to Troubleshoot and Fix the Problem
1. Ensure Correct Library Location
You are already copying libemllFslFec.so to /usr/local/lib/, which is correct. Make sure the permissions are suitable, but it’s safer to use chmod 755 instead of granting read-write to all users:
COPY libemllFslFec.so /usr/local/lib/
RUN chmod 755 /usr/local/lib/libemllFslFec.so
2. Update the Loader Configuration
After copying the library, you need to make sure the dynamic linker is aware of this library path:
RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/local.conf && ldconfig
Ensure that the above command runs after the COPY and chmod steps.
3. Container Privileges and Capabilities
Your YAML setup looks mostly correct, but ensure you have the necessary capabilities for EtherCAT/Ethernet access, and the privileged: true flag is set. For debugging, it’s also helpful to add SYS_PTRACE if not already present.
Example:
privileged: true
cap_add:
- NET_ADMIN
- NET_RAW
- SYS_PTRACE
4. Not Needed: Broad Permissions
Avoid running chmod -R a+rw /usr/local/lib/libemllFslFec.so or similar broad permission changes—these are not required and may introduce security risks.
5. Debug Command and Entry Point
Ensure your actual debug entry point starts the Acontis master with a command similar to this (tailored for your target):
./EcMasterDemo -fslfec 1 1 custom imx8m rgmii 7 nopinmuxing nomacaddr -t 0 -sp
Replace this with the appropriate command for your board.
6. Device/Interface Access
Make sure your debug container can access the correct network PHY. Also, verify the interface is available inside the container.
7. Kernel Module/Overlay
From BSP 6.6 onwards, you need to use device tree overlays to bind the Ethernet interface to the atemsys kernel module (the old BindFecToAtemsys.sh script is deprecated). Ensure the overlay is applied if you’re on a recent Toradex BSP.
Reference:
How to get started with Acontis EC-Master EtherCAT Stack
If you apply these points—especially ensuring permissions and library path are correct, and re-running ldconfig—your debug build should be able to find and load the link layer. If issues persist, double-check the container’s access to the network device (sometimes the debug container may see different interfaces than in release mode).
Let me know if this resolves your problem, or if you need more troubleshooting help!
Best regards,
Toradex AI Assistant.