My notes on compiling LiteX-CNC on linuxCNC

More
4 years 1 month ago #252354 by DePrutser
It does a little more this time:

root@mill:/# halrun
halcmd: loadrt litexcnc
Refusing to run as root without fallback UID specified
To run under a debugger with I/O, use e.g.,
    sudo env RTAPI_UID=`id -u` RTAPI_FIFO_PATH=$HOME/.rtapi_fifo gdb /usr/bin/rtapi_app
<stdin>:1: waitpid failed /usr/bin/rtapi_app litexcnc
<stdin>:1: /usr/bin/rtapi_app exited without becoming ready
<stdin>:1: insmod for litexcnc failed, returned -1
halcmd: quit
Refusing to run as root without fallback UID specified
To run under a debugger with I/O, use e.g.,
    sudo env RTAPI_UID=`id -u` RTAPI_FIFO_PATH=$HOME/.rtapi_fifo gdb /usr/bin/rtapi_app
root@mill:/#

I guess I have a manual to read before proceeding further.

Please Log in or Create an account to join the conversation.

More
4 years 1 month ago #252355 by TOLP2
Problem is, your logged in as root. Create a user and login to that user and try again.

Please Log in or Create an account to join the conversation.

More
4 years 1 month ago #252375 by DePrutser
Thanks, that worked:

cedric@mill:~$ halrun
halcmd: loadrt litexcnc
Note: Using POSIX realtime
litexcnc: Loading Litex CNC driver version 1.0.0
halcmd: exit
litexcnc: LitexCNC driver unloaded
Note: Using POSIX realtime
cedric@mill:~$

Please Log in or Create an account to join the conversation.

More
4 years 1 month ago - 4 years 1 month ago #252455 by DePrutser
I tried to compile the gateware for the FPGA, but I got this error:

sudo apt-get install wget
sudo apt-get install python3-pip

wget raw.githubusercontent.com/enjoy-digital/...aster/litex_setup.py
pip3 install --user meson ninja

python3 litex_setup.py --init --install --config=standard --gcc=riscv

wget github.com/YosysHQ/oss-cad-suite-build/r...nux-x64-20220920.tgz
tar -xvf oss-cad-suite-linux-x64-20220920.tgz

mkdir -p ~/bin
ln -s ~/LiteX/oss-cad-suite/bin/* ~/bin/

#start a new bash, so ~/bin is added to the PATH
bash --login
echo $PATH
/home/cedric/.local/bin:/home/cedric/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

#return to the LiteX-CNC repository
cd ~/LiteX-CNC/
python -m firmware examples/5a-75e.json
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 163, in _run_module_as_main
mod_name, _Error)
File "/usr/lib/python2.7/runpy.py", line 111, in _get_module_details
__import__(mod_name) # Do not catch exceptions initializing package
File "firmware/__init__.py", line 20, in <module>
from .soc import LitexCNC_Firmware
File "firmware/soc.py", line 32
baseclass: Type = Field(
^
SyntaxError: invalid syntax
Last edit: 4 years 1 month ago by DePrutser. Reason: for got output of a command

Please Log in or Create an account to join the conversation.

More
4 years 1 month ago #252457 by DePrutser
I've restored my virtual machine, so it's a fresh install of linuxcnc again. I get the same error:

$ sudo apt-get install wget
$ sudo apt-get install python3-pip
$ sudo apt-get install git
$ pip3 install --user meson ninja


$ wget raw.githubusercontent.com/enjoy-digital/...aster/litex_setup.py

$ python3 litex_setup.py --init --install --config=standard --gcc=riscv

$ wget github.com/YosysHQ/oss-cad-suite-build/r...nux-x64-20220920.tgz
$ tar -xvf oss-cad-suite-linux-x64-20220920.tgz
$ mkdir -p ~/bin
$ ln -s ~/oss-cad-suite/bin/* ~/bin/
#start a new bash, so ~/bin is added to the PATH
$ bash --login

$ git clone github.com/Peter-van-Tol/LiteX-CNC.git
$ cd LiteX-CNC/
$ python -m firmware examples/5a-75e.json
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 163, in _run_module_as_main
mod_name, _Error)
File "/usr/lib/python2.7/runpy.py", line 111, in _get_module_details
__import__(mod_name) # Do not catch exceptions initializing package
File "firmware/__init__.py", line 20, in <module>
from .soc import LitexCNC_Firmware
File "firmware/soc.py", line 32
baseclass: Type = Field(
^
SyntaxError: invalid syntax

Please Log in or Create an account to join the conversation.

More
4 years 1 month ago #252488 by TOLP2
Can you verify:
- that pydantic is in requirements.txt
- that 'pip install -r requirements.txt' has been run
- you're in the correct branch (stepgen_improvement)

I've got the feeling that Pydantic is missing somehow.

Please Log in or Create an account to join the conversation.

Moderators: PCW, jmelson
Time to create page: 0.368 seconds
Powered by Kunena Forum