- Hardware & Machines
- Computers and Hardware
- LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
you can use this file as template:configs/TangNano9K/config.json
strip it down like this:
{
"name": "TangNano9K",
"description": "TangNano9K over serial",
"board": "TangNano9K",
"type": "GW1NR-LV9QN88PC6/I5",
"family": "GW1N-9C",
"toolchain": "icestorm",
"package": "",
"clock": {
"speed": "27000000",
"pin": "52"
},
"transport": "SERIAL",
"axis": 2,
"interface": [
{
"type": "uart",
"pins": {
"RX": "48",
"TX": "49"
}
}
],
"blink": {
"pin": "10"
},
"error": {
"invert": true,
"pin": "11"
},
"enable": {
"pin": "69"
},
"plugins": [
{
"pullup": true,
"pin": "33",
"name": "DIN0",
"type": "din_bit"
},
{
"pullup": true,
"pin": "30",
"name": "DIN1",
"type": "din_bit"
},
{
"invert": true,
"pin": "13",
"name": "DOUT0",
"type": "dout_bit"
},
{
"invert": true,
"pin": "14",
"name": "DOUT1",
"type": "dout_bit"
},
{
"invert": true,
"pin": "15",
"name": "DOUT2",
"type": "dout_bit"
},
{
"type": "vin_counter",
"pullup": true,
"pins": {
"up": "3",
"down": "4"
},
"name": "VIN0"
},
{
"type": "vout_pwm",
"pins": {
"pwm": "55"
},
"name": "VOUT0"
},
{
"type": "joint_stepper",
"cl": false,
"scale": 800,
"pins": {
"step": "54",
"dir": "53"
},
"name": "JOINT0"
},
{
"type": "joint_stepper",
"cl": false,
"scale": 800,
"pins": {
"step": "51",
"dir": "42"
},
"name": "JOINT1"
}
]
}
and run:
python3 buildtool.py configs/TangNano9K/config.json
BUT: the interface_uart plugin is not usable with linuxcnc at the moment,
only with the python test-tools:
python3 Output/TangNano9K/Firmware/qt_spitest.py /dev/ttyUSB1
AND the onboard USB-Chip of the TangNano9K is totally bad,
on linux the serial communication is really buggy,
it's better to use a real FTDI-Adapter and normal pins for the communication.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
thanks for advice and instruction. I'm running my board with qt_spitest. I'm too into it now to give up.
What I need to do with rio.c and rio.h files in output folder.
I copy ConfigSamples to LinuxCNC configs folder and when i start linuxcnc i get configuration selector with possibility to chose rio but error appears: Plese brief instruction how to proceed in to LinuxCNC! Thank you.
Error report created by /usr/lib/tcltk/linuxcnc/show_errors.tcl:
Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc/modules
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.8.4-1-gb7824717b
Machine configuration directory is '/home/userxxx/linuxcnc/configs/rio'
Machine configuration file is 'rio.ini'
INIFILE=/home/userxxx/linuxcnc/configs/rio/rio.ini
VERSION=1.1
PARAMETER_FILE=linuxcnc.var
TASK=milltask
HALUI=halui
DISPLAY=axis
COORDINATES=X Y
KINEMATICS=trivkins coordinates=XY
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
Found file(REL): ./rio.hal
Shutting down and cleaning up LinuxCNC...
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Debug file information:
Note: Using POSIX realtime
rio: dlopen: /usr/lib/linuxcnc/modules/rio.so: cannot open shared object file: No such file or directory
./rio.hal:7: waitpid failed /usr/bin/rtapi_app rio
./rio.hal:7: /usr/bin/rtapi_app exited without becoming ready
./rio.hal:7: insmod for rio failed, returned -1
5942
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime
Info report created by linuxcnc_info:
The file: /tmp/linuxcnc_info.txt
can be posted to a forum or a web site like:
pastebin.com
in order to provide information about the linuxcnc
system and configuration.
Date: Mon 4 Dec 22:49:33 CET 2023
UTC Date: Mon 4 Dec 21:49:33 UTC 2023
this program: /usr/bin/linuxcnc_info
uptime: 22:49:33 up 11:07, 1 user, load average: 0.02, 0.09, 0.15
lsb_release -sa: Debian Debian GNU/Linux 10 (buster) 10 buster
which linuxcnc: /usr/bin/linuxcnc
pwd: /home/userxxx/linuxcnc/configs/rio
USER: userxxx
LOGNAME: userxxx
HOME: /home/userxxx
EDITOR:
VISUAL:
LANGUAGE: en_GB:en
TERM: dumb
COLORTERM:
DISPLAY: :0.0
DESKTOP: lightdm-xsession
display size: 1280x1024 pixels (339x271 millimeters)
PATH: /usr/bin:/home/userxxx/linuxcnc/configs/rio/bin:/usr/bin:/home/userxxx/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
uname items:
nodename -n: linuxcnc
kernel-name -s: Linux
kernel-vers -v: #1 SMP PREEMPT RT Debian 4.19.249-2 (2022-06-30)
machine -m: x86_64
processor -p: unknown
platform -i: unknown
oper system -o: GNU/Linux
/proc items:
cmdline: BOOT_IMAGE=/boot/vmlinuz-4.19.0-21-rt-amd64 root=UUID=371818aa-d1a4-445f-b321-44fe69ec2ea0 ro initrd=/install/gtk/initrd.gz quiet
model name: AMD A8-9600 RADEON R7, 10 COMPUTE CORES 4C+6G
cores: 1
cpu MHz: 3094.198
parport:
serial:
Versions:
gcc: gcc (Debian 8.3.0-6) 8.3.0
python: Python 2.7.16
git: git version 2.20.1
git commit: NA
tcl: 8.6
tk: 8.6
glade: not_in_PATH
glade-gtk2: not_in_PATH
linuxcnc_var all:
LINUXCNCVERSION: 2.8.4-1-gb7824717b
LINUXCNC_AUX_GLADEVCP: /usr/share/linuxcnc/aux_gladevcp
LINUXCNC_AUX_EXAMPLES: /usr/share/linuxcnc/aux_examples
REALTIME: /etc/init.d/realtime
RTS: uspace
HALLIB_DIR: /usr/share/linuxcnc/hallib
dpkg -l '*linuxcnc*':
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===================-====================-============-=====================================================================
un linuxcnc <none> <none> (no description available)
un linuxcnc-dev <none> <none> (no description available)
un linuxcnc-doc <none> <none> (no description available)
ii linuxcnc-doc-en 1:2.8.4.1.gb7824717b all motion controller for CNC machines and robots (English documentation)
ii linuxcnc-doc-es 1:2.8.4.1.gb7824717b all controlador de movimiento para máquinas CNC y robots (Español).
ii linuxcnc-doc-fr 1:2.8.4.1.gb7824717b all motion controller for CNC machines and robots (French documentation)
un linuxcnc-sim <none> <none> (no description available)
un linuxcnc-sim-dev <none> <none> (no description available)
ii linuxcnc-uspace 1:2.8.4.1.gb7824717b amd64 motion controller for CNC machines and robots
ii linuxcnc-uspace-dev 1:2.8.4.1.gb7824717b amd64 PC based motion controller for real-time Linux
Please Log in or Create an account to join the conversation.
You've missed a step:
sudo halcompile --install Output/TangNano9K/LinuxCNC/Components/rio.c
github.com/multigcs/LinuxCNC-RIO/blob/ma...angNano9K/INSTALL.md
Please Log in or Create an account to join the conversation.
Currently my setup work on bench with serial communication of the box, just small adjustment of baud rate in rio.v and adjusting port in rio.h!
Still lot to do.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Hi Zayoo,Thank you for help.
Currently my setup work on bench with serial communication of the box, just small adjustment of baud rate in rio.v and adjusting port in rio.h!
Still lot to do.
nice !
Are you using a Raspberry with Serial on GPIO or an USB-Serial-Adapter ?
Please Log in or Create an account to join the conversation.
Wiznet W5500 without softcore, direct on the FPGA:
youtube.com/shorts/xcC7Dun8vxE
testet on IceBreaker and MAX10, but i think it should run on all FPGA's,
nothing special.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
- Posts: 18757
- Thank you received: 6306
RGB CNC Machines !ws2812 driver update:
www.youtube.com/shorts/wu29vGSSK_0
Sehr schon, danke.
Please Log in or Create an account to join the conversation.
- Hardware & Machines
- Computers and Hardware
- LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)