LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

More
09 Oct 2024 15:10 - 09 Oct 2024 15:10 #311652 by meister
> I saw some pretty nice ones you have that look like they might plug into a pi?
Do you mean this one ?
github.com/multigcs/rio-iceshield
it's not so easy to solder :(
Last edit: 09 Oct 2024 15:10 by meister.

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

More
10 Oct 2024 00:45 #311686 by mBender
Hey, I am trying to get my hand around this. I have started the Docker container in a Virtual Machine. The GUI Starts, but as soon as I click on a board and want to save the config I get the following error.

/riocore$ sudo docker logs -f riocore
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
loading board: /usr/src/riocore/./riocore/boards/Colorlight_i5-v7_0/board.json
WARNING: no plugins configured
ERROR: module/slot is not compatible
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1235, resource id: 9178654, major code: 40 (TranslateCoords), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1524, resource id: 9179451, major code: 40 (TranslateCoords), minor code: 0
ERROR: module/slot is not compatible
ERROR: module/slot is not compatible
WARNING: no plugins configured
WARNING: no plugins configured
WARNING: no plugins configured
WARNING: no plugins configured
Traceback (most recent call last):
  File "/usr/src/riocore/bin/rio-setup", line 3582, in save_config_cb
    self.save_config(self.config_file)
  File "/usr/src/riocore/bin/rio-setup", line 3593, in save_config
    self.save_config_as()
  File "/usr/src/riocore/bin/rio-setup", line 3574, in save_config_as
    name[0] = f"{name[0]}.json"
    ~~~~^^^
TypeError: 'tuple' object does not support item assignment
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
loading board: /usr/src/riocore/./riocore/boards/Colorlight5A-75E/board.json
WARNING: no plugins configured
WARNING: no plugins configured
Traceback (most recent call last):
  File "/usr/src/riocore/bin/rio-setup", line 3582, in save_config_cb
    self.save_config(self.config_file)
  File "/usr/src/riocore/bin/rio-setup", line 3593, in save_config
    self.save_config_as()
  File "/usr/src/riocore/bin/rio-setup", line 3574, in save_config_as
    name[0] = f"{name[0]}.json"
    ~~~~^^^
TypeError: 'tuple' object does not support item assignment
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
loading board: /usr/src/riocore/./riocore/boards/Colorlight5A-75E/board.json
WARNING: no plugins configured
WARNING: no plugins configured
WARNING: no plugins configured
WARNING: no plugins configured
Traceback (most recent call last):
  File "/usr/src/riocore/bin/rio-setup", line 3582, in save_config_cb
    self.save_config(self.config_file)
  File "/usr/src/riocore/bin/rio-setup", line 3593, in save_config
    self.save_config_as()
  File "/usr/src/riocore/bin/rio-setup", line 3574, in save_config_as
    name[0] = f"{name[0]}.json"
    ~~~~^^^
TypeError: 'tuple' object does not support item assignment
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
loading board: /usr/src/riocore/./riocore/boards/Colorlight5A-75E/board.json
WARNING: no plugins configured
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 683, resource id: 8648058, major code: 40 (TranslateCoords), minor code: 0
Traceback (most recent call last):
  File "/usr/src/riocore/bin/rio-setup", line 3582, in save_config_cb
    self.save_config(self.config_file)
  File "/usr/src/riocore/bin/rio-setup", line 3593, in save_config
    self.save_config_as()
  File "/usr/src/riocore/bin/rio-setup", line 3574, in save_config_as
    name[0] = f"{name[0]}.json"
    ~~~~^^^
TypeError: 'tuple' object does not support item assignment
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
loading board: /usr/src/riocore/./riocore/boards/Colorlight5A-75E/board.json
WARNING: no plugins configured
ERROR: MISSING PIN CONFIGURATION for 'bit' (bitin)
#update w {'type': 'bitin', 'pins': {'bit': {'modifier': [], 'pin': 'w'}}, 'signals': {'bit': {'display': {}}}}
#update we {'type': 'bitin', 'pins': {'bit': {'modifier': [], 'pin': 'we'}}, 'signals': {'bit': {'display': {}}}}
#update w {'type': 'bitin', 'pins': {'bit': {'modifier': [], 'pin': 'w'}}, 'signals': {'bit': {'display': {}}}}
#update  {'type': 'bitin', 'pins': {'bit': {'modifier': []}}, 'signals': {'bit': {'display': {}}}}
Traceback (most recent call last):
  File "/usr/src/riocore/bin/rio-setup", line 3574, in save_config_as
    name[0] = f"{name[0]}.json"
    ~~~~^^^
TypeError: 'tuple' object does not support item assignment
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
loading board: /usr/src/riocore/./riocore/boards/Colorlight5A-75E/board.json
WARNING: no plugins configured
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 590, resource id: 8664042, major code: 40 (TranslateCoords), minor code: 0
WARNING: no plugins configured
WARNING: no plugins configured
WARNING: no plugins configured
ERROR: MISSING PIN CONFIGURATION for 'bit' (bitin)
#update 2 {'type': 'bitin', 'pins': {'bit': {'modifier': [], 'pin': '2'}}, 'signals': {'bit': {'display': {}}}}
#update down {'type': 'bitin', 'pins': {'bit': {'modifier': [], 'pin': '2', 'pull': 'down'}}, 'signals': {'bit': {'display': {}}}}
Traceback (most recent call last):
  File "/usr/src/riocore/bin/rio-setup", line 3574, in save_config_as
    name[0] = f"{name[0]}.json"
    ~~~~^^^
TypeError: 'tuple' object does not support item assignment
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
loading board: /usr/src/riocore/./riocore/boards/Colorlight5A-75E/board.json
WARNING: no plugins configured
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1102, resource id: 8686578, major code: 40 (TranslateCoords), minor code: 0
ERROR: MISSING PIN CONFIGURATION for 'step' (stepdir)
ERROR: MISSING PIN CONFIGURATION for 'dir' (stepdir)
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1614, resource id: 8688081, major code: 40 (TranslateCoords), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 2612, resource id: 8691031, major code: 40 (TranslateCoords), minor code: 0
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
loading board: /usr/src/riocore/./riocore/boards/OctoBot/board.json
WARNING: no plugins configured
Traceback (most recent call last):
  File "/usr/src/riocore/bin/rio-setup", line 3582, in save_config_cb
    self.save_config(self.config_file)
  File "/usr/src/riocore/bin/rio-setup", line 3593, in save_config
    self.save_config_as()
  File "/usr/src/riocore/bin/rio-setup", line 3574, in save_config_as
    name[0] = f"{name[0]}.json"
    ~~~~^^^
TypeError: 'tuple' object does not support item assignment
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
loading board: /usr/src/riocore/./riocore/boards/Colorlight5A-75E/board.json
WARNING: no plugins configured
WARNING: no plugins configured
#update d {'type': 'counter', 'pins': {'up': {'modifier': [], 'pin': 'd'}, 'down': {'modifier': []}, 'reset': {'modifier': []}}, 'signals': {'counter': {'display': {}}}}
#update d5 {'type': 'counter', 'pins': {'up': {'modifier': [], 'pin': 'd5'}, 'down': {'modifier': []}, 'reset': {'modifier': []}}, 'signals': {'counter': {'display': {}}}}
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1781, resource id: 8739807, major code: 40 (TranslateCoords), minor code: 0
Traceback (most recent call last):
  File "/usr/src/riocore/bin/rio-setup", line 3582, in save_config_cb
    self.save_config(self.config_file)
  File "/usr/src/riocore/bin/rio-setup", line 3593, in save_config
    self.save_config_as()
  File "/usr/src/riocore/bin/rio-setup", line 3574, in save_config_as
    name[0] = f"{name[0]}.json"
    ~~~~^^^
TypeError: 'tuple' object does not support item assignment
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
loading board: /usr/src/riocore/./riocore/boards/Colorlight5A-75E/board.json
WARNING: no plugins configured
WARNING: no plugins configured
WARNING: no plugins configured
WARNING: no plugins configured
WARNING: no plugins configured
Traceback (most recent call last):
  File "/usr/src/riocore/bin/rio-setup", line 3582, in save_config_cb
    self.save_config(self.config_file)
  File "/usr/src/riocore/bin/rio-setup", line 3593, in save_config
    self.save_config_as()
  File "/usr/src/riocore/bin/rio-setup", line 3574, in save_config_as
    name[0] = f"{name[0]}.json"
    ~~~~^^^
TypeError: 'tuple' object does not support item assignment

 

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

More
10 Oct 2024 06:08 #311698 by meister
fixed, but this error comes only if you do not add .json suffix to your filename.

Thanks for reporting !

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

More
11 Oct 2024 01:28 #311788 by digiex_chris

> I saw some pretty nice ones you have that look like they might plug into a pi?
Do you mean this one ?
github.com/multigcs/rio-iceshield
it's not so easy to solder :(

Yes that's the one thank you! Which XO91 did you end up going with? Is that for the SPI CLK? I'm looking into having jlcpcb solder it for me, their cost for the parts is quite low.

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

More
11 Oct 2024 14:33 #311812 by mBender
Hi all,

I am trying to get my hands around this. Played around with the Docker container a bit. I have so many questions... :D

I think it would make sense if we collect for the Boards to have a sample config file. E.G. I just ordered the Colorlight5A 75E and will set up a simple milling machine with stepper motors. What do you think?

Either way, if someone could share a running json file with me, that would give me a head start.

I will add to the documentation to make it easier for further users to get started.

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

More
12 Oct 2024 10:23 #311854 by meister
> Yes that's the one thank you! Which XO91 did you end up going with? Is that for the SPI CLK? > I'm looking into having jlcpcb solder it for me, their cost for the parts is quite low.
it's not needed, i use the RPI clock for the FPGA

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

More
23 Oct 2024 10:47 - 23 Oct 2024 11:11 #312939 by gitano
...just discovered this a few days ago and i am really impressed! Really nice work, also with the configuration wizard in the docker container! 

Just stepped inside the LinuxCNC world with a rudimentary BOB setup, so maybe a bit early... but i am really considering having a look at this :)

Cheers!
-lgitano
Last edit: 23 Oct 2024 11:11 by gitano.

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

More
23 Oct 2024 14:31 - 23 Oct 2024 14:32 #312969 by digiex_chris
Last edit: 23 Oct 2024 14:32 by digiex_chris.

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

More
23 Oct 2024 15:00 - 23 Oct 2024 15:01 #312976 by digiex_chris
 did a little small rework of the IceShield to make it so that JLCPCB can assemble the SMD parts for us, just got them in my hands. I just soldered the through hole components myself, it's pretty easy. I rearranged the connectors so that the routing to the FPGA is a little simpler, because everything has to be on one side of the board if we want the low cost assembly ($7 USD to assemble 5 boards!!! not including components). I used 4 layers for RFI reasons and making it easier to route to power and ground planes with single sided SMD assembly, and the cost to produce the board only increases by $1.50 USD to go to 4 layers.

They arrived yesterday, I plugged it in and was able to flash it using the riocore tooling, but linuxcnc throws bad data warnings with lots of zeros (I assume that's a log of the request data). I have to confirm my CE0 pin is hooked up correctly, that JLCPCB didn't flip the 2v5v dropping diode, and go take a look with a logic analyzer, but I'm wondering if there's some tooling somewhere to interact with the IceShield in a simpler way, perhaps command line? So I can test it without having to run linuxcnc.

The firmware seems to run, because it lights the one LED after it's flashed and rebooted. I have a feeling I have permission issues with the GPIO pins used by the chip select pins, I had to run as root to flash it but linuxcnc isn't happy running as root, something to do with rtapi_app running without a backup uid.  /dev/spidev* are the correct permissions in the spi and gpio group, my user is in that group, but running the flash script as my user fails for permission problems with gpio. That's just linux problems, those I can deal with, just ran out of time. @meister are you running your iceshield on the official linuxcnc pi image? Do you still use it over spi or have you converted yours to an ethernet spi bridge?

File Attachment:
Last edit: 23 Oct 2024 15:01 by digiex_chris.
The following user(s) said Thank You: meister

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

More
23 Oct 2024 15:31 #312978 by digiex_chris
total cost for 2 assembled boards and 3 spare unpopulated pcbs shipped to Canada was $96CAD, so just under $50/board. Not bad! That goes down with a larger order of course, the assembly fee doesn't really go up much to populate all 5 boards, it's just I didnt want to pay the parts costs if I'd made a mistake and it doesn't work.

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

Time to create page: 0.127 seconds
Powered by Kunena Forum