Raspberry Pi 4 & MESA 7i92
You can set the SPI clock frequencies in the driver command line
(man hm2_rpspi)
"Note: Using POSIX non-realtime"
This means you are not running a real time kernel so you need to install a real time kernel on your RPI before LinuxCNC will run reliably
Please Log in or Create an account to join the conversation.
- ajsinfotech
- Offline
- Senior Member
- Posts: 76
- Thank you received: 1
Ok. Now I try to lower the spi clock. But then I'll do what you suggestThe SPI errors are expected with a long cable.
You can set the SPI clock frequencies in the driver command line
(man hm2_rpspi)
I have already installed the rt-kernel."Note: Using POSIX non-realtime"
I think this note was referred to a non-realtime module running (may be display/keyboard devices, I don't know).
I didn't realize that linuxcnc was not using real-time by issuing this message.
How could I check if the linuxcnc is using all the real-time capabilities?
Thanks!
Please Log in or Create an account to join the conversation.
uname -a
Please Log in or Create an account to join the conversation.
- ajsinfotech
- Offline
- Senior Member
- Posts: 76
- Thank you received: 1
Ok, I know about this command, and I check it several times as I build the rt.uname -a
I'm not with my toy right now. I'll send you my kernel version later, just in case.
So, I don't know why linuxcnc send this message. That's why I ask you for another kind of check, maybe some linuxcnc tool to dig internals.Note: Using POSIX non-realtime
Another hint: I built linuxcnc from source (2.9 master)
Thanks a lot!
Please Log in or Create an account to join the conversation.
The only time I have seen the "Note: Using POSIX non-realtime"
message is when I have run LinuxCNC on a non-RT kernel.
Here is what I normally get (LinuxCNC 2.9 uspace with different hardware):
peter@pcw-HP-EliteDesk-800-G1-USDT:~/linuxcnc-dev/scripts$ linuxcnc
LINUXCNC - 2.9.0~pre0
Machine configuration directory is '/home/peter/linuxcnc/configs'
Machine configuration file is '7i96masterpe.ini'
Starting LinuxCNC...
Found file(REL): ./hm2-pidstepper-master-pe.hal
Note: Using POSIX realtime
hm2: loading Mesa HostMot2 driver version 0.15
hm2_eth: loading Mesa AnyIO HostMot2 ethernet driver version 0.2
hm2_eth: 10.10.10.10: Hardware address: 00:60:1b:16:00:02
hm2_eth: discovered 7I96
hm2/hm2_7i96.0: Low Level init 0.15
hm2/hm2_7i96.0: 51 I/O Pins used:
hm2/hm2_7i96.0: IO Pin 000 (TB3-01): IOPort
hm2/hm2_7i96.0: IO Pin 001 (TB3-02): IOPort
...............
Please Log in or Create an account to join the conversation.
- ajsinfotech
- Offline
- Senior Member
- Posts: 76
- Thank you received: 1
The only time I have seen the "Note: Using POSIX non-realtime"
message is when I have run LinuxCNC on a non-RT kernel.
I had an issue with the RT, now solved
Now on the road again, I have this error:
LINUXCNC - 2.9.0~pre0
Machine configuration directory is '/home/pi/linuxcnc/configs/gmoccapy-rpi3-mesa-mill-v1.0.1'
Machine configuration file is 'gmoccapy-rpi3-mesa-mill-v1.0.1.ini'
Starting LinuxCNC...
Found file(REL): ./gmoccapy-rpi3-mesa-mill-v1.0.1.hal
Note: Using POSIX realtime
hm2: loading Mesa HostMot2 driver version 0.15
hm2_rpspi: Unknown board at SPI0/CE0: MESA7C81
hm2_rpspi: rtapi_app_main: Operation not permitted (-1)
./gmoccapy-rpi3-mesa-mill-v1.0.1.hal:30: waitpid failed /home/pi/linuxcnc/bin/rtapi_app hm2_rpspi
./gmoccapy-rpi3-mesa-mill-v1.0.1.hal:30: /home/pi/linuxcnc/bin/rtapi_app exited without becoming ready
./gmoccapy-rpi3-mesa-mill-v1.0.1.hal:30: insmod for hm2_rpspi failed, returned -1
Shutting down and cleaning up LinuxCNC...
hm2_rpspi: not loaded
<commandline>:0: exit value: 255
<commandline>:0: rmmod failed, returned -1
hm2: unloading
<commandline>:0: unloadrt failed
Note: Using POSIX realtime
I test the connectivity with the 7c81 and it is ok.
I also see this link:
forum.linuxcnc.org/18-computer/36879-raspberry-pi-4?start=170
But it seems not to be the same case, I think.
Thanks!
Please Log in or Create an account to join the conversation.
Here's what I get with recent 2.9 and a 7C81 on a RPI4:
LINUXCNC - 2.9.0~pre0
Machine configuration directory is '/home/pi'
Machine configuration file is '7c81-1k.ini'
Starting LinuxCNC...
emc/iotask/ioControl.cc 701: can't load tool table.
Found file(REL): ./hm2-pidstepper.hal
Note: Using POSIX realtime
hm2: loading Mesa HostMot2 driver version 0.15
hm2/hm2_7c81.0: Low Level init 0.15
hm2/hm2_7c81.0: Smart Serial Firmware Version 43
hm2/hm2_7c81.0: 57 I/O Pins used:
hm2/hm2_7c81.0: IO Pin 000 (P1-01): IOPort
hm2/hm2_7c81.0: IO Pin 001 (P1-02): PWMGen #0, pin Out0 (PWM or Up) (Output)
hm2/hm2_7c81.0: IO Pin 002 (P1-03): StepGen #0, pin Step (Output)
hm2/hm2_7c81.0: IO Pin 003 (P1-04): IOPort
hm2/hm2_7c81.0: IO Pin 004 (P1-05): StepGen #0, pin Direction (Output)
hm2/hm2_7c81.0: IO Pin 005 (P1-06): IOPort
hm2/hm2_7c81.0: IO Pin 006 (P1-07): StepGen #1, pin Step (Output)
hm2/hm2_7c81.0: IO Pin 007 (P1-08): IOPort
hm2/hm2_7c81.0: IO Pin 008 (P1-09): StepGen #1, pin Direction (Output)
hm2/hm2_7c81.0: IO Pin 009 (P1-11): StepGen #2, pin Step (Output)
hm2/hm2_7c81.0: IO Pin 010 (P1-13): StepGen #2, pin Direction (Output)
hm2/hm2_7c81.0: IO Pin 011 (P1-15): IOPort
hm2/hm2_7c81.0: IO Pin 012 (P1-17): IOPort
hm2/hm2_7c81.0: IO Pin 013 (P1-19): Encoder #0, pin A (Input)
hm2/hm2_7c81.0: IO Pin 014 (P1-21): Encoder #0, pin B (Input)
hm2/hm2_7c81.0: IO Pin 015 (P1-23): Encoder #0, pin Index (Input)
hm2/hm2_7c81.0: IO Pin 016 (P1-25): IOPort
hm2/hm2_7c81.0: IO Pin 017 (J5-TX0): IOPort
hm2/hm2_7c81.0: IO Pin 018 (J6-TX1): IOPort
hm2/hm2_7c81.0: IO Pin 019 (P2-01): IOPort
hm2/hm2_7c81.0: IO Pin 020 (P2-02): PWMGen #1, pin Out0 (PWM or Up) (Output)
hm2/hm2_7c81.0: IO Pin 021 (P2-03): IOPort
hm2/hm2_7c81.0: IO Pin 022 (P2-04): IOPort
hm2/hm2_7c81.0: IO Pin 023 (P2-05): IOPort
hm2/hm2_7c81.0: IO Pin 024 (P2-06): IOPort
hm2/hm2_7c81.0: IO Pin 025 (P2-07): IOPort
hm2/hm2_7c81.0: IO Pin 026 (P2-08): IOPort
hm2/hm2_7c81.0: IO Pin 027 (P2-09): IOPort
hm2/hm2_7c81.0: IO Pin 028 (P2-11): IOPort
hm2/hm2_7c81.0: IO Pin 029 (P2-13): IOPort
hm2/hm2_7c81.0: IO Pin 030 (P2-15): IOPort
hm2/hm2_7c81.0: IO Pin 031 (P2-17): IOPort
hm2/hm2_7c81.0: IO Pin 032 (P2-19): IOPort
hm2/hm2_7c81.0: IO Pin 033 (P2-21): IOPort
hm2/hm2_7c81.0: IO Pin 034 (P2-23): IOPort
hm2/hm2_7c81.0: IO Pin 035 (P2-25): IOPort
hm2/hm2_7c81.0: IO Pin 036 (J5-TXEN0): IOPort
hm2/hm2_7c81.0: IO Pin 037 (J6-TXEN1): IOPort
hm2/hm2_7c81.0: IO Pin 038 (P7-01): IOPort
hm2/hm2_7c81.0: IO Pin 039 (P7-02): IOPort
hm2/hm2_7c81.0: IO Pin 040 (P7-03): IOPort
hm2/hm2_7c81.0: IO Pin 041 (P7-04): IOPort
hm2/hm2_7c81.0: IO Pin 042 (P7-05): IOPort
hm2/hm2_7c81.0: IO Pin 043 (P7-06): IOPort
hm2/hm2_7c81.0: IO Pin 044 (P7-07): IOPort
hm2/hm2_7c81.0: IO Pin 045 (P7-08): IOPort
hm2/hm2_7c81.0: IO Pin 046 (P7-09): IOPort
hm2/hm2_7c81.0: IO Pin 047 (P7-11): IOPort
hm2/hm2_7c81.0: IO Pin 048 (P7-13): IOPort
hm2/hm2_7c81.0: IO Pin 049 (P7-15): IOPort
hm2/hm2_7c81.0: IO Pin 050 (P7-17): IOPort
hm2/hm2_7c81.0: IO Pin 051 (P7-19): IOPort
hm2/hm2_7c81.0: IO Pin 052 (P7-21): IOPort
hm2/hm2_7c81.0: IO Pin 053 (P7-23): IOPort
hm2/hm2_7c81.0: IO Pin 054 (P7-25): IOPort
hm2/hm2_7c81.0: IO Pin 055 (P5-RX0): IOPort
hm2/hm2_7c81.0: IO Pin 056 (P6-RX1): IOPort
hm2/hm2_7c81.0: registered
note: MAXV max: 30.000 units/sec 1800.000 units/min
note: LJOG max: 30.000 units/sec 1800.000 units/min
note: LJOG default: 30.000 units/sec 1800.000 units/min
note: jog_order='XYZ'
note: jog_invert=set([])
Please Log in or Create an account to join the conversation.
- ajsinfotech
- Offline
- Senior Member
- Posts: 76
- Thank you received: 1
I have installed the 2.9 release, but the 7c81 card maybe need the latest update.
I'll update LinuxCNC to the last revision as you recommend.
Thanks!
Please Log in or Create an account to join the conversation.
- ajsinfotech
- Offline
- Senior Member
- Posts: 76
- Thank you received: 1
I try to install LinuxCNC from source on my RPi3 from this guide with just a minor changes:
gnipsel.com/linuxcnc/uspace/rpi4-emc.html
But when I run:
debuild -uc -us
I get the following error:
virtual memory exhausted: Cannot allocate memory
Makefile:227: recipe for target 'objects/emc/rs274ngc/interp_python.o' failed
make[1]: *** [objects/emc/rs274ngc/interp_python.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/pi/emc/src'
debian/rules:31: recipe for target 'build-stamp' failed
make: *** [build-stamp] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
debuild: fatal error at line 1116:
dpkg-buildpackage -rfakeroot -us -uc failed
My changes:
1 - I checkout this:
git checkout master
instead of:
git checkout 2.8
2 - I did not need to modify debian/configure, it was ok:
Debian-10|Debian-10.*|Raspbian-10|Raspbian-10.*)
Or maybe do I have to change this to:
Debian-10|Debian-10.*|Raspbian-9|Raspbian-9.*)
3 - I did not remove the following lines from debian/control.bottom.in. I chose to keep it original just in case:
python-gtksourceview2,
python-vte,
Maybe do I have to remove this lines to my RPi3?
4 - When I run:
debian/configure uspace
It reports this:
successfully configured for 'uspace-Raspbian-9.11'-'uspace'...
instead of:
successfully configured for 'uspace-Raspbian-10'-'uspace'...
Could the Raspbian-9.11 be the problem?
Or maybe is the RPi3 virtual memory not enough?
I try all this exactly on my RPi4 and everything runs fine!
Thanks!
Please Log in or Create an account to join the conversation.
I am not sure if the pi swaps to SD card, I can imagine that not being a great idea.
Please Log in or Create an account to join the conversation.