ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board

More
07 Jan 2023 21:35 #261203 by TOLP2

I‘ve done it with sudo (so that everything goes to $PATH) No worries - I have time!

I've a feeling that this might be due to a version difference in lib-json. For developing I was using version 0.12 (based on Debian Stretch and Buster). For newer versions of Debian, version 0.15 and 0.16 of this library is installed. would you be so kind to test something for me?

Basically, browse to the folder where litexcnc is installed. This folder can be easily found by starting the Python interpreter and use the following script:
import litexcnc
print(litexcnc)

In the folder of
litexcnc change to the sub-directory of the driver and compile the driver manually with the following command:
sudo apt-get update
sudo apt-get install -y libjson-c-dev=0.12.1-1.1+deb9u1
sudo python halcompile.py --install litexcnc.c litexcnc_eth.c stepgen/pos2vel.c

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

More
07 Jan 2023 21:43 - 07 Jan 2023 21:45 #261204 by juergenmoser
Yes, sure I can test - give you a feedback tomorrow(when it‘s okay for you)
Last edit: 07 Jan 2023 21:45 by juergenmoser.
The following user(s) said Thank You: TOLP2

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

More
08 Jan 2023 08:31 - 08 Jan 2023 08:32 #261245 by juergenmoser
so i get this when i try to install libjson: terminal opened in /usr/bin/local
sudo apt-get install -y libjson-c-dev=0.12.1-1.1+deb9u1
[sudo] Passwort für cnc:    
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Paket libjson-c-dev ist nicht verfügbar, wird aber von einem anderen Paket
referenziert. Das kann heißen, dass das Paket fehlt, dass es abgelöst
wurde oder nur aus einer anderen Quelle verfügbar ist.
Doch die folgenden Pakete ersetzen es:
  libjson-c-dev:i386

E: Version »0.12.1-1.1+deb9u1« für »libjson-c-dev« konnte nicht gefunden werden.
So i dont know if you understand german - but it means that the Version can not be found....

What you mean with Python interpreter? do i have to install pycharm?
Last edit: 08 Jan 2023 08:32 by juergenmoser.
The following user(s) said Thank You: TOLP2

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

More
08 Jan 2023 11:08 - 08 Jan 2023 11:33 #261252 by deroj
Same for me. Library cannot be found.

@TOLP2:
running linux mint 21
Linux oj-turner 6.0.0-6-rt-amd64 #1 SMP PREEMPT_RT Debian 6.0.12-1 (2022-12-09) x86_64 x86_64 x86_64 GNU/Linux
LINUXCNC - 2.9.0~pre0+git20221105.ffb6bda926

Edit:
oj@oj-turner:/usr/local/lib/python3.10/dist-packages/litexcnc/driver$ aptitude versions libjson-c-dev
Paket libjson-c-dev:                                  
p   0.15-2build4                                                                   jammy                                                       500
p   0.15-3~ubuntu1.22.04.1                                                         jammy-updates                                               500

Paket libjson-c-dev:i386:
p   0.15-2build4                                                                   jammy                                                       500
p   0.15-3~ubuntu1.22.04.1                                                         jammy-updates                                               500
oj@oj-turner:/usr/local/lib/python3.10/dist-packages/litexcnc/driver$



Maybe we have to build it from source / github?

So, I tried to build it with the instruction from github.
github.com/json-c/json-c/tree/json-c-0.12

But the error stays. loadrt litexcnc throws error
litexcnc: dlopen: /usr/lib/linuxcnc/modules/litexcnc.so: undefined symbol: json_object_array_length
Last edit: 08 Jan 2023 11:33 by deroj.
The following user(s) said Thank You: TOLP2

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

More
08 Jan 2023 11:37 - 08 Jan 2023 11:39 #261253 by TOLP2
Thanks for your effort. With this information I think I can replicate the problem tomorrow using Docker. Although I'm not sure which version name of Debian you are using. Debian 6.0 sounds very old to me, although Linux Mint 21 is very new.

I will try to put LinuxCNC 2.9 on my machine tomorrow (if it is able to run that version). 
Last edit: 08 Jan 2023 11:39 by TOLP2.

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

More
08 Jan 2023 11:47 #261256 by deroj
I am the one to say thanks :)

i installed completely new with this instruction.
forum.linuxcnc.org/9-installing-linuxcnc...n-linux-mint-21-beta

It will be no problem for me to install another system, when you can prefer another one for litex

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

More
08 Jan 2023 12:04 #261257 by juergenmoser
I also tried to remove the new libjson-c-dev0.15 and try to install 0.12, but then it automatically installs 0.15 again

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

More
08 Jan 2023 21:08 #261304 by juergenmoser
@ TOLP2 i got LitexCNC now running on Buster2.8.4
So the next problem what I have:
What is that meaning  wrong Fingerprint in the Error Discription?
litexcnc: Loading Litex CNC driver version 1.1.0
load_components_show_pins.hal:1: Component 'litexcnc' ready
load_components_show_pins.hal:1: Program '/usr/bin/rtapi_app' started
smalloc_up: shmem available 347647
load_components_show_pins.hal:1: Realtime module 'litexcnc' loaded
HAL: removing component 02
HAL: releasing RTAPI resources
HAL: component 02 removed, name = 'halcmd3266'
HAL: initializing hal_lib
/usr/bin/rtapi_app load litexcnc_eth config_file="/home/cnc/Downloads/5a-75b.json"
HAL: initializing component 'halcmd3266'
HAL: component 'halcmd3266' initialized, ID = 06
litexcnc: loading litexCNC etherbone driver version 0.02
litexcnc: Connecting to board at address: 192.168.2.50:1234
[color=#27ae60]litexcnc: Fingerprint incorrect (driver: -1791217999, FPGA: 674788089)[/color]
litexcnc: Validation of config failed.
board fails LitexCNC registration
litexcnc_eth: rtapi_app_main: Operation not permitted (-1)
load_components_show_pins.hal:2: waitpid failed /usr/bin/rtapi_app litexcnc_eth
load_components_show_pins.hal:2: /usr/bin/rtapi_app exited without becoming ready
load_components_show_pins.hal:2: insmod for litexcnc_eth failed, returned -1
HAL: removing component 06
HAL: releasing RTAPI resources
HAL: component 06 removed, name = 'halcmd3266'
 
The following user(s) said Thank You: TOLP2

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

More
08 Jan 2023 22:10 #261307 by TOLP2
Thanks for narrowing it down to the version of LinuxCNC, 2.8.4 works, 2.9 not.

About the fingerprint: the JSON used for compiling the driver is different from the JSON used in the HAL-file. This can be a small change (for example removal of a space), because the checksum is merely a CRC-value. Please make sure that the JSON-file is not altered between compilation and running the HAL.

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

More
09 Jan 2023 05:39 #261331 by deroj
Nice to know :)
So I will try to install LCNC 2.8.4.
Or would you recommend an ISO with Buster?

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

Moderators: PCWjmelson
Time to create page: 0.297 seconds
Powered by Kunena Forum