Replies: 10 comments 31 replies
-
At this moment I'm on holiday, so have this answer is from my mobile phone and from my head. My apologies, more detailed answer I can send on Sunday. I see that the documentation / error message is maybe outdated. The command Will change the error message. |
Beta Was this translation helpful? Give feedback.
-
So, next problem, firmware build... build error, Traceback (most recent call last): What am I not setting correctly in the pwm section? |
Beta Was this translation helpful? Give feedback.
-
Good morning, nc@cnc:~$ halrun What could be the problem? |
Beta Was this translation helpful? Give feedback.
-
I see this as a bug. Break down of what happens:
- the error only happens when memory cannot be allocated for a module, i.e.
`pwm` in this case;
- I don't think this is hardware related, so most-likely the byte with the
number of instances received from the FPGA is zero (which prevents
allocation of memory);
- either in the firmware there is an error or in the driver.
Going to check which part has been changed with the latest modification, as
this behavior I didn't experience before.
Op za 17 aug 2024 om 08:57 schreef Csaba Horvath ***@***.***>:
… Good morning,
***@***.***:~$ halrun
halcmd: loadrt litexcnc connections="eth:192.168.12.20"
Note: Using POSIX realtime
litexcnc: Loading Litex CNC driver version 1.2.4
litexcnc: Loading and registering default modules:
litexcnc: Registered module gpio
litexcnc: Registered module pwm
litexcnc: Registered module encoder
litexcnc: Registered module step
litexcnc: Setting up board drivers:
litexcnc: Registered driver eth
LitexCNC-eth: connected to board on '192.168.12.20:1234'
litexcnc: INFO: Version of firmware (1.3.0) is different with the version
of the driver (1.2.4). Communication is still possible, although the
firmware could use an update for the best experience.
litexcnc: Setting up modules...
litexcnc: Reading 28 bytes
litexcnc: - Watchdog
litexcnc: - Wallclock
litexcnc: - gpio ... done!
litexcnc: Out of memory!
litexcnc: Failed to instantiate module: 'pwm'
litexcnc: - pwm ...board fails LitexCNC registration
litexcnc: Failed to initialize the driver.
litexcnc: rtapi_app_main: Invalid argument (-22)
:1: waitpid failed /usr/bin/rtapi_app litexcnc
:1: /usr/bin/rtapi_app exited without becoming ready
:1: insmod for litexcnc failed, returned -1
halcmd:
What could be the problem?
Flash, ping, ok.
—
Reply to this email directly, view it on GitHub
<#107 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACUVAUEOUW4664CJP4H74L3ZR3X55AVCNFSM6AAAAABMSPBQ2SVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMZWGQ3TKMI>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Quick check: after installing the development version of the firmware, did
you also re-install the driver? There has been a change in the driver which
could explain the behavior you are experiencing.
Op za 17 aug 2024 om 15:58 schreef Peter Van Tol ***@***.***>:
… I see this as a bug. Break down of what happens:
- the error only happens when memory cannot be allocated for a module,
i.e. `pwm` in this case;
- I don't think this is hardware related, so most-likely the byte with the
number of instances received from the FPGA is zero (which prevents
allocation of memory);
- either in the firmware there is an error or in the driver.
Going to check which part has been changed with the latest modification,
as this behavior I didn't experience before.
Op za 17 aug 2024 om 08:57 schreef Csaba Horvath ***@***.***
>:
> Good morning,
>
> ***@***.***:~$ halrun
> halcmd: loadrt litexcnc connections="eth:192.168.12.20"
> Note: Using POSIX realtime
> litexcnc: Loading Litex CNC driver version 1.2.4
> litexcnc: Loading and registering default modules:
> litexcnc: Registered module gpio
> litexcnc: Registered module pwm
> litexcnc: Registered module encoder
> litexcnc: Registered module step
> litexcnc: Setting up board drivers:
> litexcnc: Registered driver eth
> LitexCNC-eth: connected to board on '192.168.12.20:1234'
> litexcnc: INFO: Version of firmware (1.3.0) is different with the version
> of the driver (1.2.4). Communication is still possible, although the
> firmware could use an update for the best experience.
> litexcnc: Setting up modules...
> litexcnc: Reading 28 bytes
> litexcnc: - Watchdog
> litexcnc: - Wallclock
> litexcnc: - gpio ... done!
> litexcnc: Out of memory!
> litexcnc: Failed to instantiate module: 'pwm'
> litexcnc: - pwm ...board fails LitexCNC registration
> litexcnc: Failed to initialize the driver.
> litexcnc: rtapi_app_main: Invalid argument (-22)
> :1: waitpid failed /usr/bin/rtapi_app litexcnc
> :1: /usr/bin/rtapi_app exited without becoming ready
> :1: insmod for litexcnc failed, returned -1
> halcmd:
>
> What could be the problem?
> Flash, ping, ok.
>
> —
> Reply to this email directly, view it on GitHub
> <#107 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACUVAUEOUW4664CJP4H74L3ZR3X55AVCNFSM6AAAAABMSPBQ2SVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMZWGQ3TKMI>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***
> com>
>
|
Beta Was this translation helpful? Give feedback.
-
I tried a previous firmware setting on the card and it works. And new json, is not ok. If you have some time, could you check what the error could be? I can't find it. |
Beta Was this translation helpful? Give feedback.
-
hello
But I get this error when building the firmware
Can someone tell me how to fix this error? |
Beta Was this translation helpful? Give feedback.
-
I would like to recommend to install a newer version of LitexCNC, by using the following command: pip install git+https://github.com/Peter-van-Tol/LiteX-CNC@119-feature-request-revamp-watchdog In this version, a few bugs have been resolved and new features have been implemented:
To use these version, it is required to re-install both the driver and toolchain:
See attached file with the required changes. If you want, I can also share the build firmware. |
Beta Was this translation helpful? Give feedback.
-
Well, I had the same issue. Litexcnc, been installed from pip repository,
creates script named litexcnc in virtualenv/bin directory. Litexcnc, been
installed from git repository, doesn't create the script but is callable in
virtualenv via call: python -m litexcnc
вс, 5 янв. 2025 г. в 00:27, Peter-van-Tol ***@***.***>:
… For the error: I think your internet connection was intermittent or
something on your PC is not correctly configured. When trying the command,
it installs just fine:
pip install ***@***.***
OUTPUT:
Cloning https://github.com/Peter-van-Tol/LiteX-CNC (to revision 119-feature-request-revamp-watchdog) to c:\users\tolp2\appdata\local\temp\pip-req-build-ipf2_o95
Running command git clone --filter=blob:none --quiet https://github.com/Peter-van-Tol/LiteX-CNC 'C:\Users\tolp2\AppData\Local\Temp\pip-req-build-ipf2_o95'
Running command git checkout -b 119-feature-request-revamp-watchdog --track origin/119-feature-request-revamp-watchdog
branch '119-feature-request-revamp-watchdog' set up to track 'origin/119-feature-request-revamp-watchdog'.
Switched to a new branch '119-feature-request-revamp-watchdog'
Resolved https://github.com/Peter-van-Tol/LiteX-CNC to commit 9e73867
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting chardet<6.0.0,>=5.0.0 (from litexcnc==1.3.0.dev2)
Using cached chardet-5.2.0-py3-none-any.whl.metadata (3.4 kB)
Collecting click<9.0.0,>=8.1.3 (from litexcnc==1.3.0.dev2)
Downloading click-8.1.8-py3-none-any.whl.metadata (2.3 kB)
Collecting meson<0.65.0,>=0.64.1 (from litexcnc==1.3.0.dev2)
Using cached meson-0.64.1-py3-none-any.whl.metadata (1.6 kB)
Collecting ninja<2.0.0,>=1.11.1 (from litexcnc==1.3.0.dev2)
Downloading ninja-1.11.1.3-py3-none-win_amd64.whl.metadata (5.3 kB)
Collecting packaging<22.0,>=21.3 (from litexcnc==1.3.0.dev2)
Using cached packaging-21.3-py3-none-any.whl.metadata (15 kB)
Collecting pydantic<2.0.0,>=1.10.2 (from litexcnc==1.3.0.dev2)
Downloading pydantic-1.10.19-py3-none-any.whl.metadata (152 kB)
Collecting requests<3.0.0,>=2.28.1 (from litexcnc==1.3.0.dev2)
Using cached requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)
Collecting yapps<3.0.0,>=2.2.0 (from litexcnc==1.3.0.dev2)
Using cached Yapps-2.2.0.tar.gz (13 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting colorama (from click<9.0.0,>=8.1.3->litexcnc==1.3.0.dev2)
Using cached colorama-0.4.6-py2.py3-none-any.whl.metadata (17 kB)
Collecting pyparsing!=3.0.5,>=2.0.2 (from packaging<22.0,>=21.3->litexcnc==1.3.0.dev2)
Downloading pyparsing-3.2.1-py3-none-any.whl.metadata (5.0 kB)
Collecting typing-extensions>=4.2.0 (from pydantic<2.0.0,>=1.10.2->litexcnc==1.3.0.dev2)
Using cached typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB)
Collecting charset-normalizer<4,>=2 (from requests<3.0.0,>=2.28.1->litexcnc==1.3.0.dev2)
Downloading charset_normalizer-3.4.1-cp313-cp313-win_amd64.whl.metadata (36 kB)
Collecting idna<4,>=2.5 (from requests<3.0.0,>=2.28.1->litexcnc==1.3.0.dev2)
Using cached idna-3.10-py3-none-any.whl.metadata (10 kB)
Collecting urllib3<3,>=1.21.1 (from requests<3.0.0,>=2.28.1->litexcnc==1.3.0.dev2)
Downloading urllib3-2.3.0-py3-none-any.whl.metadata (6.5 kB)
Collecting certifi>=2017.4.17 (from requests<3.0.0,>=2.28.1->litexcnc==1.3.0.dev2)
Downloading certifi-2024.12.14-py3-none-any.whl.metadata (2.3 kB)
Using cached chardet-5.2.0-py3-none-any.whl (199 kB)
Downloading click-8.1.8-py3-none-any.whl (98 kB)
Using cached meson-0.64.1-py3-none-any.whl (895 kB)
Downloading ninja-1.11.1.3-py3-none-win_amd64.whl (296 kB)
Using cached packaging-21.3-py3-none-any.whl (40 kB)
Downloading pydantic-1.10.19-py3-none-any.whl (165 kB)
Using cached requests-2.32.3-py3-none-any.whl (64 kB)
Downloading certifi-2024.12.14-py3-none-any.whl (164 kB)
Downloading charset_normalizer-3.4.1-cp313-cp313-win_amd64.whl (102 kB)
Using cached idna-3.10-py3-none-any.whl (70 kB)
Downloading pyparsing-3.2.1-py3-none-any.whl (107 kB)
Using cached typing_extensions-4.12.2-py3-none-any.whl (37 kB)
Downloading urllib3-2.3.0-py3-none-any.whl (128 kB)
Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Building wheels for collected packages: litexcnc, yapps
Building wheel for litexcnc (pyproject.toml) ... done
Created wheel for litexcnc: filename=litexcnc-1.3.0.dev2-py3-none-any.whl size=153429 sha256=2dc08dcbb3b3ade68f1f6d56d892fa37629a2b7b9aef588e72ffdf859d499513
Stored in directory: C:\Users\tolp2\AppData\Local\Temp\pip-ephem-wheel-cache-0xpa9y3b\wheels\f8\89\cc\a34ac3a444618023cda0e659bd0af3492bb6e473a47376ff92
Building wheel for yapps (pyproject.toml) ... done
Created wheel for yapps: filename=Yapps-2.2.0-py3-none-any.whl size=15824 sha256=a311aa713a6ebefa1638f80da3ef06a4693f859fccbc93636f2d836dd3059099
Stored in directory: c:\users\tolp2\appdata\local\pip\cache\wheels\62\35\b8\d8dacd0f138f0cf12633eeb3708fd026427c0b2eaab8338538
Successfully built litexcnc yapps
Installing collected packages: yapps, urllib3, typing-extensions, pyparsing, ninja, meson, idna, colorama, charset-normalizer, chardet, certifi, requests, pydantic, packaging, click, litexcnc
Successfully installed certifi-2024.12.14 chardet-5.2.0 charset-normalizer-3.4.1 click-8.1.8 colorama-0.4.6 idna-3.10 litexcnc-1.3.0.dev2 meson-0.64.1 ninja-1.11.1.3 packaging-21.3 pydantic-1.10.19 pyparsing-3.2.1 requests-2.32.3 typing-extensions-4.12.2 urllib3-2.3.0 yapps-2.2.0
Could you try again. And if it does not work, try to get some more
information on the error with git status as suggested in the error.
—
Reply to this email directly, view it on GitHub
<#107 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABP7HCFVMZO2XMGBRUJ4T2T2JAYZNAVCNFSM6AAAAABMSPBQ2SVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCNZTGUYTGMQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
-
Just change permissions of the destination folder, make it writable to
regular user: sudo chmod 777 /usr/lib/linuxcnc/modules Also, of course, a
recompilation and reflashing of the board is needed.
вс, 5 янв. 2025 г., 14:05 EhsanRasouli1371 ***@***.***>:
… How do I fix this error?
:~$ python -m litexcnc install_driver
INFO: Looking for halcompile...
INFO: Locating Makefile.modinc...
INFO: Run In Place (RIP) Installation not detected
INFO: Detected EMC2_RTLIB_DIR location '/usr/lib/linuxcnc/modules'
INFO: Retrieving default driver files to compile...
Copying file 'litexcnc.c'
Copying file 'watchdog.c'
Copying file 'wallclock.c'
Copying file 'litexcnc_pwm.c'
Copying file 'litexcnc_gpio.c'
Copying file 'litexcnc_stepgen.c'
Copying file 'litexcnc_encoder.c'
Copying file 'litexcnc_pigpio_speed_test.c'
Copying file 'etherbone.c'
Copying file 'litexcnc_eth.c'
Copying file 'litexcnc_spidev.c'
Copying file 'litexcnc_pigpio.c'
Copying file 'litexcnc.h'
Copying file 'wallclock.h'
Copying file 'watchdog.h'
Copying file 'litexcnc_gpio.h'
Copying file 'litexcnc_stepgen.h'
Copying file 'litexcnc_encoder.h'
Copying file 'litexcnc_pwm.h'
Copying file 'litexcnc_spidev.h'
Copying file 'litexcnc_pigpio.h'
Copying file 'etherbone.h'
Copying file 'litexcnc_eth.h'
INFO: Compiling LitexCNC driver...
Compiling realtime litexcnc.c
Linking litexcnc.so
cp litexcnc.so /usr/lib/linuxcnc/modules/
cp: cannot create regular file '/usr/lib/linuxcnc/modules/litexcnc.so': Permission denied
make: *** [/usr/share/linuxcnc/Makefile.modinc:107: install] Error 1
Error: Compilation of the driver failed.
—
Reply to this email directly, view it on GitHub
<#107 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABP7HCEIH3H7VV4ORN3TVGD2JDYWRAVCNFSM6AAAAABMSPBQ2SVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCNZTHAYTOMI>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Dear Peter,
I replaced the PC with a new one and I am experiencing the following installation problem.
Linuxcnc Debian 12 Bookworm PREEMPT-RT ISO freshly installed.
Python3, pip3 installed and Litexcnc installed.
Oss-cad-suite is also installed.
When compiling firmware (litexcnc build_firmware *.json --build) I always get the error "Litex is not installed. Please run 'litexcnc install_litex' first."
If I issue the litexcnc command, it shows the litex commands (build_firmware, convert, flash,...).
What can I do wrong, what might not be set correctly?
Beta Was this translation helpful? Give feedback.
All reactions