PnCConf with RPI 4 and Mesa 7C81

More
5 years 11 months ago #189615 by smogol
Hello every one,
I am quite new with LinuxCNC, I managed once to setup linuxcnc 2.5.5 on an old PC running ubuntu 10.04 with a parallel port.
My goal is to replace this old lady with a raspberry pi 4 and a MESA 7C81.
Until now, the installation of linucCNC was a success thank to the post :
forum.linuxcnc.org/9-installing-linuxcnc...it-linuxcnc?start=10

I also could manage to compile the mesaflash and can "talk" to the 7C81 over the command:
mesaflash --spi --addr /dev/spidev0.0 --device 7c81 --readhmid

My next step is to configure the MESA 7C81 over th PnCConf utility.
Unfortunately, I'm blocked with the warning "You have no hostmot2 firmware downloaded in folder:
/lib/firmware/hm2/"

I guess I have to install hostmot2, in some sort, but I don't find any further information.

Any help is welcome
Best regards

Please Log in to join the conversation.

More
5 years 11 months ago #189620 by tommylight

smogol wrote:
My next step is to configure the MESA 7C81 over th PnCConf utility.
Unfortunately, I'm blocked with the warning "You have no hostmot2 firmware downloaded in folder:
/lib/firmware/hm2/"

That is pertaining to firmware for some other/older Mesa boards that required uploading the firmware at LinuxCNC start, new ones have that on board so you can safely ignore that and move on.

Please Log in to join the conversation.

More
5 years 11 months ago #189658 by andypugh
If it refuses to continue without the firmware package:

sudo apt-get install hostmot2-firmware

Though I am not 100% sure that PnCConf knows about the 7C81.

Please Log in to join the conversation.

More
5 years 11 months ago #189661 by PCW
PNCConf does not support the 7C81.
The easiest path to creating a working hal/ini file for the 7C81 is probably:

1. Run pncconf and select 5I25/G540 firmware
2. Edit the created hal file and replace hm2_pci with hm2_rpspi
3. Replace all instances of "5i25" in the hal/ini files with "7c81" **
4. GPIO used for inputs and outputs will need to be hand edited in the hal file.

** if you select "Use INI substitution for Mesa board names." in pncconf
there will be just on instance of the board name in the ini file. If you do not
select this option, the board name will appear throughout the main hal file.

Please Log in to join the conversation.

More
5 years 11 months ago #189662 by PCW
Sorry for double post...

Please Log in to join the conversation.

More
5 years 11 months ago #189716 by smogol
Thanks andypugh for your advice,
unfortunately, the RPI 4 does not have this package.

Please Log in to join the conversation.

More
5 years 11 months ago #189721 by smogol
Thanks PCW,
I'll give it a try and get back with the results:
BTW: when I run the mesafirmware command, I get the following configuration :
Code:
unable to set bpw32, fallback to bpw8 <-- this is ok, found a post covering it..... :-) Configuration Name: HOSTMOT2
My need is to hook my Chinese CNC. I downloaded the configs from the MESA site. Is there a better configuration to apply?
This is my actual DB25 pinout for my machine (extract out of my working .hal file):
Code:
net estop-out => parport.0.pin-01-out net ystep => parport.0.pin-02-out setp parport.0.pin-02-out-reset 1 net ydir => parport.0.pin-03-out net xstep => parport.0.pin-04-out setp parport.0.pin-04-out-reset 1 setp parport.0.pin-05-out-invert 1 net xdir => parport.0.pin-05-out net zstep => parport.0.pin-06-out setp parport.0.pin-06-out-reset 1 net zdir => parport.0.pin-07-out net astep => parport.0.pin-08-out setp parport.0.pin-08-out-reset 1 net adir => parport.0.pin-09-out net xenable => parport.0.pin-14-out net xenable => parport.0.pin-16-out net xenable => parport.0.pin-17-out net all-limit-home <= parport.0.pin-11-in-not net probe-in <= parport.0.pin-15-in-not

I am aware that I need to read and understand the documentation ;-) but a little help from the community will surely help me to get quickly to a running system and then I can enhance it in a second step.

Regards

Please Log in to join the conversation.

More
5 years 11 months ago #189726 by PCW
Look like the 7C81 G540 or 5ABOB configs are close
You have X,Y swapped from the normal pins, but if you
assign XYZ stepgens in pncconf:
0 Y
1 X
2 Z
pncconf will create the correct hal connections

Please Log in to join the conversation.

More
5 years 11 months ago #190033 by smogol
I followed the instructions as mentioned in the upper post from PCW, renaming manually the reference to 7C81 and hm2_rspi and that worked well.
I can use the PnCConf to re-edit some gpios and redo the replacements.
My next step is to configure my HB04 to my rasberry pi as I could notice that the configuration has changed slignthly from the older version.

Change the subject ot solved

Please Log in to join the conversation.

More
2 years 10 months ago #288733 by Mehta_123
how to hand edit input output (GPIO) in hal and ini? 
please give me one example.
Thanks!!!!!

Please Log in to join the conversation.

Time to create page: 0.090 seconds
Powered by Kunena Forum