Advanced Search

Search Results (Searched for: raspberry)

  • nanowhat
  • nanowhat
Yesterday 02:27

Loading 32 bit shared library with GladeVCP/python on a Raspberry Pi

Category: General LinuxCNC Questions

I need to load a 32 bit shared library from GladeVCP/python to communicate with an existing machine. This shared library is only available as a 32 bit library for ARM systems, and I want to see if this will run on a Raspberry Pi. I don't have access to the source, so I can't recompile arm64.

Is there any way to do this, or do I have to run on a x86_64 machine?
  • Chad
  • Chad
26 Oct 2025 10:12

Remora SPI: Bad SPI payload, estop won’t reset, SKR 1.4 + RPi4 – config below

Category: Computers and Hardware

Hi,
I’m trying to get Remora to work with a Raspberry Pi 4 Compute Module (on the official IO board) and a BTT SKR 1.4 (LPC1768) board via SPI (using EXP2 directly).No matter what I do, I keep getting “bad spi payload” errors and I can’t reset estop in LinuxCNC. The estop status toggles randomly, sometimes reporting errors like “fffff”, “3a”, “71”, then “0”, but it never clears or lets me enable the machine.Here’s what I’ve already tried:
  • Double/triple-checked config files (.hal/.ini/config.txt) for base/servo thread values and SPI freq
  • Tried SPI_FREQ values from 40000 down to 2500
  • Used multiple different SD cards, freshly copied firmware/config.txt every time
  • Swapped and powered from two different power supplies, always with common ground
  • Used short (10–20 cm) jumper wires and a dedicated IDC ribbon cable between RPi CM4 IO board and SKR (connected to SPI0 CS0)
  • Confirmed CS line matches config and wiring
  • Tried wiring both loosened and via the screw-terminal “HAT”
  • Tested with two different RPi modules
  • Flashed the correct Remora firmware for LPC1768, config.txt matches hardware
Symptoms – what I see:
  • LinuxCNC starts, RPi and SKR both power up
  • E-stop never disengages, status bits change randomly
  • Console/log shows many “bad spi payload” errors, with hex codes changing each time
  • Stepper drivers do not respond, SPI module loads but does not work
My setup:
  • Raspberry Pi 4 Compute Module on official IO board
  • BTT SKR 1.4 (LPC1768) with Remora firmware
  • Connecting via SPI (EXP2 header), CS0
  • Cables all short, tried IDC and normal dupont/jumper types
Questions:
  • Is there anything obvious I’m missing in configs or wiring?
  • Has anyone had this persist even with good IDC cable and CM4?
  • Any proven working “plug-and-play” cable or adapter for this combo?
  • Are there common hardware quirks or firmware issues with this setup?
  • Would using a logic analyzer or scope help, and what to look for?
I’m attaching my 
.hal
.ini
 and 
config.txt
 files plus a photo of my wiring. Any advice, example configs, or troubleshooting steps would be greatly appreciated!

.hal file:
# Load the realtime components loadrt [KINS]KINEMATICS loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS loadrt remora-spi SPI num=0 CS_num=0 SPI [remora]SPI_FREQ=20000 # estop loopback, SPI comms enable and feedback net user-enable-out <= iocontrol.0.user-enable-out => remora.SPI.enable net user-request-enable <= iocontrol.0.user-request-enable => remora.SPI-reset net remora-status <= remora.SPI-status => iocontrol.0.emc-enable-in # add the remora and motion functions to threads addf remora.read servo-thread addf motion-command-handler servo-thread addf motion-controller servo-thread addf remora.update-req servo-thread addf remora.write servo-thread # Joint 0 setup setp remora.joint.0.scale [JOINT_0]SCALE setp remora.joint.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL net x:pos-cmd <= joint.0.motor-pos-cmd => remora.joint.0.pos-cmd net x:pos-fb <= remora.joint.0.pos-fb => joint.0.pos-fb net x:enable <= joint.0.amp-enable-out => remora.joint.0.enable # Joint 1 setup setp remora.joint.1.scale [JOINT_1]SCALE setp remora.joint.1.maxaccel [JOINT_1]STEPGEN_MAXACCEL net y:pos-cmd <= joint.1.motor-pos-cmd => remora.joint.1.pos-cmd net y:pos-fb <= remora.joint.1.pos-fb => joint.1.pos-fb net y:enable <= joint.1.amp-enable-out => remora.joint.1.enable # Joint 2 setup setp remora.joint.2.scale [JOINT_2]SCALE setp remora.joint.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL net z:pos-cmd <= joint.2.motor-pos-cmd => remora.joint.2.pos-cmd net z:pos-fb <= remora.joint.2.pos-fb => joint.2.pos-fb net z:enable <= joint.2.amp-enable-out => remora.joint.2.enable

.ini file:
# Basic LinuxCNC config for testing of Remora firmware [EMC] MACHINE = Remora-XYZ DEBUG = 0 VERSION = 1.1 [DISPLAY] DISPLAY = axis EDITOR = gedit POSITION_OFFSET = RELATIVE POSITION_FEEDBACK = ACTUAL ARCDIVISION = 64 GRIDS = 10mm 20mm 50mm 100mm MAX_FEED_OVERRIDE = 1.2 MIN_SPINDLE_OVERRIDE = 0.5 MAX_SPINDLE_OVERRIDE = 1.2 DEFAULT_LINEAR_VELOCITY = 50.00 MIN_LINEAR_VELOCITY = 0.00 MAX_LINEAR_VELOCITY = 200.00 DEFAULT_ANGULAR_VELOCITY = 36.00 MAX_ANGULAR_VELOCITY = 45.00 INTRO_GRAPHIC = linuxcnc.gif INTRO_TIME = 5 PROGRAM_PREFIX = ~/linuxcnc/nc_files INCREMENTS = 50mm 10mm 5mm 1mm .5mm .1mm .05mm .01mm [KINS] JOINTS = 3 #KINEMATICS =trivkins coordinates=XYZ kinstype=BOTH KINEMATICS = trivkins coordinates=XYZ [FILTER] PROGRAM_EXTENSION = .py Python Script py = python [TASK] TASK = milltask CYCLE_TIME = 0.010 [RS274NGC] PARAMETER_FILE = linuxcnc.var [EMCMOT] EMCMOT = motmod COMM_TIMEOUT = 1.0 COMM_WAIT = 0.010 BASE_PERIOD = 25000 SERVO_PERIOD = 1000000 [HAL] HALFILE = remora-xyz.hal POSTGUI_HALFILE = postgui_call_list.hal [TRAJ] COORDINATES = X Y Z LINEAR_UNITS = mm ANGULAR_UNITS = degree CYCLE_TIME = 0.010 DEFAULT_LINEAR_VELOCITY = 50.00 MAX_LINEAR_VELOCITY = 200.00 NO_FORCE_HOMING = 1 [EMCIO] EMCIO = io CYCLE_TIME = 1.00 TOOL_TABLE = tool.tbl [AXIS_X] MAX_VELOCITY = 250 MAX_ACCELERATION = 750.0 MIN_LIMIT = -5.0 MAX_LIMIT = 300.0 [JOINT_0] TYPE = LINEAR HOME = 0.0 MIN_LIMIT = -5.0 MAX_LIMIT = 300.0 MAX_VELOCITY = 250.0 MAX_ACCELERATION = 750.0 STEPGEN_MAXACCEL = 2000.0 SCALE = 80.0 FERROR = 2 MIN_FERROR = 2.0 HOME_OFFSET = 2.0 HOME_SEARCH_VEL = 0 HOME_LATCH_VEL = 0 HOME_SEQUENCE = 0 [AXIS_Y] MAX_VELOCITY = 250.0 MAX_ACCELERATION = 750.0 MIN_LIMIT = -0.01 MAX_LIMIT = 300.0 [JOINT_1] TYPE = LINEAR HOME = 0.0 MIN_LIMIT = -5.0 MAX_LIMIT = 300.0 MAX_VELOCITY = 250.0 MAX_ACCELERATION = 750.0 STEPGEN_MAXACCEL = 2000.0 SCALE = 80.0 FERROR = 5 MIN_FERROR = 5.0 HOME_OFFSET = 0.0 HOME_SEARCH_VEL = 0 HOME_LATCH_VEL = 0 HOME_SEQUENCE = 0 [AXIS_Z] OFFSET_AV_RATIO = 0.2 MAX_VELOCITY = 5.0 MAX_ACCELERATION = 200.0 MIN_LIMIT = -280 MAX_LIMIT = 280 [JOINT_2] TYPE = LINEAR HOME = 0.0 MIN_LIMIT = -280 MAX_LIMIT = 280 MAX_VELOCITY = 5.0 MAX_ACCELERATION = 200.0 STEPGEN_MAXACCEL = 3000.0 SCALE = 400.0 FERROR = 5 MIN_FERROR = 1.0 HOME_OFFSET = 0.0 HOME_SEARCH_VEL = 0 HOME_LATCH_VEL = 0 HOME_SEQUENCE = 0

config.txt:
{
  "Board": "BIGTREETECH SKR v1.3 & v1.4",
  "Threads": [
    { "Thread": "Base", "Frequency": 40000 },
    { "Thread": "Servo", "Frequency": 1000 }
  ],
  "Modules": [
    {
      "Thread": "Servo",
      "Type": "Reset Pin",
      "Comment": "Reset pin",
      "Pin": "1.31"
    },
    {
      "Thread": "Base",
      "Type": "SPI",
      "Comment": "SPI interface to Raspberry Pi",
      "CS Pin": "0.16"
    },
    {
      "Thread": "Base",
      "Type": "Stepgen",
      "Comment": "X - Joint 0 step generator",
      "Joint Number": 0,
      "Step Pin": "2.2",
      "Direction Pin": "2.6",
      "Enable Pin": "2.1"
    },
    {
      "Thread": "Base",
      "Type": "Stepgen",
      "Comment": "Y - Joint 1 step generator",
      "Joint Number": 1,
      "Step Pin": "0.19",
      "Direction Pin": "0.20",
      "Enable Pin": "2.8"
    },
    {
      "Thread": "Base",
      "Type": "Stepgen",
      "Comment": "Z - Joint 2 step generator",
      "Joint Number": 2,
      "Step Pin": "0.22",
      "Direction Pin": "2.11",
      "Enable Pin": "0.21"
    }
  ]
}
  • unknown
  • unknown
24 Oct 2025 06:41 - 24 Oct 2025 10:14

Proposal RPi Linuxcnc Image Based on Raspi OS All welcome/encoraged to comment

Category: Installing LinuxCNC

Current state of Trixie:
Images build fine & boot, with non rt kernel.

6.12.47 kernel crashes
6.12.47 headers cant' be installed due to gcc version issues

6.12.34 kernel is good
6.12.34 headers can't be installed due to gcc version issues

Issues installing Linuxcnc built from image below wont install due to version issues with a lot of packages.

Using Trixie image downloads.raspberrypi.com/raspios_arm64/...-trixie-arm64.img.xz can have 6.12.34 kernel & headers installed.

I'll have to do some greater investigation.

Wanna know a secret, I did a big stupid, didn't realise the image was armf instead of arm64.

Current state of Bookworm.
All appears to be good, build process needs some tweaks, login screen and having xfce the default desktop plus a few little more odds and sods. Basically it works, just would like it a little more user friendly. Good thing regarding this build system is you can set your OS settings when using RPi-Imager, something that was not possible with the earlier build system.

Non necessary stuff (eyecandy), would like to have a linuxcnc themed splash screen (plymouth theming), login background (lightdm config) and desktop background. Just some Linuxcnc "branding".
  • eoverton
  • eoverton
24 Oct 2025 05:18
Replied by eoverton on topic Remora with STM32H753ZI

Remora with STM32H753ZI

Category: Computers and Hardware

How close are you, and how can I help? It's been three or four years since I worked on an ST ARM core, but I do work in the embedded world all the time, and I'm happy to be of assistance. With a little bit of digging, I can probably even find my old ST background debug dongle and the tools to support it.

I presently have a strong interest in seeing this project through to completion. I have been standardizing my computer controlled systems on a Bigtreetech Manta M8P board, which basically is a breakout board for a Raspberry Pi CM4 with an ST32H723ZET6 on it to run the lower-level stuff. I've had very good luck with it using it for Klipper/Mainsail/Crowsnest to run a 3D printer. And since the stepper drivers I want to use to drive the motors on my milling machine drop right in, I'd like to bridge LinuxCNC to it. The higher current drivers (like variants of the TMC5160) use SPI, so I'd need that driver. And it'd be nice to be able to poll a few GPIO's so I can move the mill bed with a joystick for setup. But it shouldn't be *that* difficult, I don't think.

Just let me know if/how I can contribute.
  • unknown
  • unknown
23 Oct 2025 17:56
Replied by unknown on topic 7i92H

7i92H

Category: General LinuxCNC Questions

Mesa have a product called spinx or similar, converts digital pwm to isolated analogue out.

The new image I'm working is created using the same utility that Raspberry Pi company uses to create their own images, so basically raspios with a real time kernel and Linuxcnc pre installed. Far more raspios than the previous.
  • Will_cnc
  • Will_cnc
23 Oct 2025 08:09

Leadshine EL8 Servo motor clonking sound and motion

Category: EtherCAT

Current Setup:
  • Raspberry Pi 5
    • 3 × Leadshine EL8 Servo Drives and 400W Motors

      Problem:
      I’ve recently set up LinuxCNC on a Raspberry Pi 5 and configured it to use the Probe Basic user interface.I’m experiencing an issue where the servo drives occasionally disconnect. The main symptom is that the motors sometimes make a “clonking” sound while running, as if there’s a mechanical fault and judder under movement . Power-cycling the system (turning it off and back on) sometimes clears the issue, and the motors then run normally.
      Could this problem be caused by poor latency on the Raspberry Pi 5, or possibly by the EtherCAT network going out of sync?Any advice or suggestions on how to resolve this issue would be greatly appreciated.


  • unknown
  • unknown
22 Oct 2025 21:44
Replied by unknown on topic 7i92H

7i92H

Category: General LinuxCNC Questions

As an addendum to the above post, I'm working on a new Raspberry Pi image, suitable for both the 4 & 5 based on the raspios, that has all the nice setup features of a standard raspios image.

I'm hoping to create both a Bookworm & Trixie image.
  • unknown
  • unknown
22 Oct 2025 21:41
Replied by unknown on topic 7i92H

7i92H

Category: General LinuxCNC Questions

A Raspberry Pi has its own I/O pins (albeit limited to 3.3V); connection via ethernet seems a bit stupid.


 


That is horribly bad advice. When using the GPIO pins on an RPi you require a base & servo thread, as you would with a PC with a Parallel port. Using a Mesa Ethernet card, in the case of OP, or a Mesa SPI card you only require a servo thread.
I use a RPi5 with a Mesa 7i92 & 7i76(plus some other smart serial cards) and I am very happy with it.

Yes the RPi5 requires an external PSU (does that really need to be mentioned ?) but some mini PC's require an external as well. Lenovo is one brand that comes to mind, I think the power blocks are similar to the Laptop power blocks.

Thin Clients may also be an option HP T630 are not so expensive on the second hand market and have a Quad core CPU,
www.parkytowers.me.uk/thin/hp/t630/
  • langdons
  • langdons's Avatar
22 Oct 2025 20:56 - 23 Oct 2025 20:26
Replied by langdons on topic 7i92H

7i92H

Category: General LinuxCNC Questions

A Raspberry Pi has its own I/O pins (albeit limited to 3.3V); connection via ethernet seems a bit of a waste of the Pi's functionality, at least so far as I/O is concerned.

Is the ethernet NIC in the Raspberry Pi as good as a PC motherboard's NIC?

Mini PCs can be a bit annoying to to the space constraints.

Keep in mind that while PC can run off of AC line voltage, a Pi needs a separate power supply.

If your PC power supply is good, you can siphon off power for other stuff, though there is some risk involved with doing so.
  • Ingo
  • Ingo's Avatar
22 Oct 2025 20:31
7i92H was created by Ingo

7i92H

Category: General LinuxCNC Questions

Guys, I'd like to hear your opinions.

I have a 7i92H and would like to build something very compact with reasonable performance. What do you recommend using, a Raspberry Pi4, Pi5, or even a mini PC?

Ingo
  • unknown
  • unknown
21 Oct 2025 12:27

fixing "raspi firmware" errors on the official amd64 ISO

Category: Installing LinuxCNC

The RPi doesn't require an installer the way the PC platform does.
Plus I'm looking at some other tools put out by the Raspberry guys that look pretty good.
  • unknown
  • unknown
21 Oct 2025 11:19
Replied by unknown on topic Update LinuxCNC 2.9.5 on debian 13

Update LinuxCNC 2.9.5 on debian 13

Category: Installing LinuxCNC

I've been playing with pi-gen.....I think it is a little better, you get a more raspberry pi like experience. There's a link in my proposal thread. ATM the moment I've been building upto the "lite" stage burning & booting and installing the desktop,Xorg and the rest. Linuxcnc has been from the debian repo.....But I should be able to fine tune things.

Bookworm has been the target so far, Trixie shouldn't be an issue, but one thing I really need to know is the status of linuxcnc.org/docs/2.9/html/drivers/hal_gpio.html . I think there was an issue with the libgpiod library.
Bookworm version is 1.6.3-1
Trixie version is 2.2.1-2

You can burn to your boot device sing RPI-Imager and edit settings such via the imager.

There's realtime kernels available via the raspberry kernel repo. The Rpi4 4k page kernels run on the Rpi5.......so we may only need one image to cover both boards.
  • andypugh
  • andypugh's Avatar
20 Oct 2025 21:19
Replied by andypugh on topic Update LinuxCNC 2.9.5 on debian 13

Update LinuxCNC 2.9.5 on debian 13

Category: Installing LinuxCNC

However, the debian package itself seems to have a broken python3 dependency. I'm on the latest Raspberry Pi OS Lite (which is basically trixie with a custom kernel and a few Pi-specific tools installed). Any particular reason for the arm64 package to want python3 < 3.12? amd64 one depends on 3.13, and so does linuxcnc-uspace 2.9.4 that comes with trixie.
 

It's possibly a consequence of the recent Pi .deb that I posted being built on Bookworm as I don't have a Pi running Trixie at the moment. 
The Debian package control files don't specify a version, but it is possible that a dependency is introduced by the configure step of the software build. 

I have a feeling that the package for the Pi in www.linuxcnc.org/dists/trixie might be the Bookworm package rather than one built on Pi/Trixie. I don't know how that happened at this point, I might just have been hoping that it would work and have now found out otherwise 
 
  • unknown
  • unknown
19 Oct 2025 07:58

Proposal RPi Linuxcnc Image Based on Raspi OS All welcome/encoraged to comment

Category: Installing LinuxCNC

Ok you're telling me not to use a kernel that I have practical experience and have not had a single crash or anything similar. Neither have any users reported any crashes. I think an uptime of 39 days and being able to start Linuxcnc at anytime during that period with no crashes, latency errors or any other such issues proves to me that the kernel is solid and stable.
Before using it on the mill, I had been using to test some Mesa clones one based on a 7c81 and another more less based on the 7i92 design. I've also tested Ollie's riocore system, on the same 7c81 clone hardware early this year, before Oliie got his hands on a genuine Mesa 7c81 that he has made riocore formware for.
Could you point me to any papers, references or any such peer reviewed articles explaining why the 16k page kernel is broken by design.

So this time I will stand by my choices for the RPi5. Unless of course you can provide hard evidence as requested above.

Even this page says to config 2711 for RPi4 to RPi3 and 2712 for RPi5.
www.raspberrypi.com/documentation/computers/linux_kernel.html
  • unknown
  • unknown
19 Oct 2025 06:55 - 19 Oct 2025 06:56

Proposal RPi Linuxcnc Image Based on Raspi OS All welcome/encoraged to comment

Category: Installing LinuxCNC

A couple of things related to choosing a Kernel for Linuxcnc.

For the RPi4 you require options for the bcm2711 in the config.
For the RPi5 you require options for the bcm2712 in the config.

The change of the SoC broke a lot of stuff that broke GPIO stuff. What previously worked on the RPi4 failed on the RPi5. In the context of Linuxcnc this required a rewrite of the SPI driver for the RPi5.

For both SoCs
CONFIG_PREEMPT_RT=y
must be set. Otherwise we dont get the real time model required.

In the link you gave for the configs only the bcm_2711 rt config has that option set. The bcm_2712 config does not.

With regards to the kernel version the one on the image is uname -a
Linux raspberrypi 6.12.11 #1 SMP PREEMPT_RT Mon Jan 27 00:10:15 AEDT 2025 aarch64 GNU/Linux

This was built from the 6.12.y branch in January. Whilst not to up to date 6 months later it was in January and has proved to be stable. With regards to the kernel itself there have been no reports of crashing, except one user whilst using GMOCCAPY but this was traced to zram swap issue.

This is the one running my RPi5 on the mill, it's been up for 39 odd days with no issues. Having the power saving stuff turned off on the wifi has been constantly connected for those 39 days. Usually it powers down after some time.
Displaying 1 - 15 out of 835 results.
Time to create page: 0.398 seconds
Powered by Kunena Forum