New project, litehm2: a hostmot2 port to linsn rv901t

More
28 Jun 2023 17:11 - 28 Jun 2023 17:13 #274407 by sensille
I managed to reduce the footprint of the design and pushed an update.
It needs two patches to litex/liteeth:

github.com/sensille/litex/tree/tx_write_only and
github.com/sensille/liteeth/tree/tx_write_only

I also reduced the system clock from 100 to 80MHz, which should still be plenty. Before, it sometimes slightly missed timing closure, now it is solid.
Last edit: 28 Jun 2023 17:13 by sensille.
The following user(s) said Thank You: tommylight, xu

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

More
29 Jun 2023 11:07 #274439 by xu
Brush into rv901t_stock__example_in_initial.bin and ping10.10.10.10 can pass
Then mesaflash --addr 10.10.10.10 --device ether --write rv901t_stock__example_in_initial.bit --fix-boot-block

halrun -I -V HAL.hal

cnc@debian:~/linuxcnc/configs/litehm2_6040$ halrun -I -V HAL.hal
HAL: initializing hal_lib
HAL: initializing component 'halcmd1542'
smalloc_dn: shmem available 1048184
HAL: component 'halcmd1542' initialized, ID = 02
HAL: removing component 02
HAL: releasing RTAPI resources
HAL: component 02 removed, name = 'halcmd1542'
HAL: initializing hal_lib
/usr/bin/rtapi_app load hostmot2 
HAL: initializing component 'halcmd1542'
smalloc_dn: shmem available 1048184
HAL: component 'halcmd1542' initialized, ID = 02
Note: Using POSIX realtime
hm2: loading Mesa HostMot2 driver version 0.15
HAL.hal:1: Component 'hostmot2' ready
HAL.hal:1: Program '/usr/bin/rtapi_app' started
smalloc_up: shmem available 1048071
HAL.hal:1: Realtime module 'hostmot2' loaded
HAL: removing component 02
HAL: releasing RTAPI resources
HAL: component 02 removed, name = 'halcmd1542'
HAL: initializing hal_lib
/usr/bin/rtapi_app load hm2_eth board_ip="10.10.10.10" config=" num_encoders=0 num_pwmgens=0 num_stepgens=0 sserial_port_0=0000xx" 
HAL: initializing component 'halcmd1542'
HAL: component 'halcmd1542' initialized, ID = 06
hm2_eth: loading Mesa AnyIO HostMot2 ethernet driver version 0.2
hm2_eth: 10.10.10.10: INFO: Hardware address (MAC): 24:1f:83:30:66:de
hm2_eth: Unrecognized ethernet board found: litehm2 -- port names will be wrong
hm2_eth: discovered litehm2
hm2/hm2_lite.0: Low Level init 0.15
hm2/hm2_lite.0: 72 I/O Pins used:
hm2/hm2_lite.0:     IO Pin 000 (??-01): IOPort
hm2/hm2_lite.0:     IO Pin 001 (??-03): IOPort
hm2/hm2_lite.0:     IO Pin 002 (??-05): IOPort
hm2/hm2_lite.0:     IO Pin 003 (??-07): IOPort
hm2/hm2_lite.0:     IO Pin 004 (??-09): IOPort
hm2/hm2_lite.0:     IO Pin 005 (??-11): IOPort
hm2/hm2_lite.0:     IO Pin 006 (??-13): IOPort
hm2/hm2_lite.0:     IO Pin 007 (??-15): IOPort
hm2/hm2_lite.0:     IO Pin 008 (??-17): IOPort
hm2/hm2_lite.0:     IO Pin 009 (??-19): IOPort
hm2/hm2_lite.0:     IO Pin 010 (??-21): IOPort
hm2/hm2_lite.0:     IO Pin 011 (??-23): IOPort
hm2/hm2_lite.0:     IO Pin 012 (??-25): IOPort
hm2/hm2_lite.0:     IO Pin 013 (??-27): IOPort
hm2/hm2_lite.0:     IO Pin 014 (??-29): IOPort
hm2/hm2_lite.0:     IO Pin 015 (??-31): IOPort
hm2/hm2_lite.0:     IO Pin 016 (??-33): IOPort
hm2/hm2_lite.0:     IO Pin 017 (??-35): IOPort
hm2/hm2_lite.0:     IO Pin 018 (??-37): IOPort
hm2/hm2_lite.0:     IO Pin 019 (??-39): IOPort
hm2/hm2_lite.0:     IO Pin 020 (??-41): IOPort
hm2/hm2_lite.0:     IO Pin 021 (??-43): IOPort
hm2/hm2_lite.0:     IO Pin 022 (??-45): IOPort
hm2/hm2_lite.0:     IO Pin 023 (??-47): IOPort
hm2/hm2_lite.0:     IO Pin 024 (??-01): IOPort
hm2/hm2_lite.0:     IO Pin 025 (??-03): IOPort
hm2/hm2_lite.0:     IO Pin 026 (??-05): IOPort
hm2/hm2_lite.0:     IO Pin 027 (??-07): IOPort
hm2/hm2_lite.0:     IO Pin 028 (??-09): IOPort
hm2/hm2_lite.0:     IO Pin 029 (??-11): IOPort
hm2/hm2_lite.0:     IO Pin 030 (??-13): IOPort
hm2/hm2_lite.0:     IO Pin 031 (??-15): IOPort
hm2/hm2_lite.0:     IO Pin 032 (??-17): IOPort
hm2/hm2_lite.0:     IO Pin 033 (??-19): IOPort
hm2/hm2_lite.0:     IO Pin 034 (??-21): IOPort
hm2/hm2_lite.0:     IO Pin 035 (??-23): IOPort
hm2/hm2_lite.0:     IO Pin 036 (??-25): IOPort
hm2/hm2_lite.0:     IO Pin 037 (??-27): IOPort
hm2/hm2_lite.0:     IO Pin 038 (??-29): IOPort
hm2/hm2_lite.0:     IO Pin 039 (??-31): IOPort
hm2/hm2_lite.0:     IO Pin 040 (??-33): IOPort
hm2/hm2_lite.0:     IO Pin 041 (??-35): IOPort
hm2/hm2_lite.0:     IO Pin 042 (??-37): IOPort
hm2/hm2_lite.0:     IO Pin 043 (??-39): IOPort
hm2/hm2_lite.0:     IO Pin 044 (??-41): IOPort
hm2/hm2_lite.0:     IO Pin 045 (??-43): IOPort
hm2/hm2_lite.0:     IO Pin 046 (??-45): IOPort
hm2/hm2_lite.0:     IO Pin 047 (??-47): IOPort
hm2/hm2_lite.0:     IO Pin 048 (??-01): IOPort
hm2/hm2_lite.0:     IO Pin 049 (??-03): IOPort
hm2/hm2_lite.0:     IO Pin 050 (??-05): IOPort
hm2/hm2_lite.0:     IO Pin 051 (??-07): IOPort
hm2/hm2_lite.0:     IO Pin 052 (??-09): IOPort
hm2/hm2_lite.0:     IO Pin 053 (??-11): IOPort
hm2/hm2_lite.0:     IO Pin 054 (??-13): IOPort
hm2/hm2_lite.0:     IO Pin 055 (??-15): IOPort
hm2/hm2_lite.0:     IO Pin 056 (??-17): IOPort
hm2/hm2_lite.0:     IO Pin 057 (??-19): IOPort
hm2/hm2_lite.0:     IO Pin 058 (??-21): IOPort
hm2/hm2_lite.0:     IO Pin 059 (??-23): IOPort
hm2/hm2_lite.0:     IO Pin 060 (??-25): IOPort
hm2/hm2_lite.0:     IO Pin 061 (??-27): IOPort
hm2/hm2_lite.0:     IO Pin 062 (??-29): IOPort
hm2/hm2_lite.0:     IO Pin 063 (??-31): IOPort
hm2/hm2_lite.0:     IO Pin 064 (??-33): IOPort
hm2/hm2_lite.0:     IO Pin 065 (??-35): IOPort
hm2/hm2_lite.0:     IO Pin 066 (??-37): IOPort
hm2/hm2_lite.0:     IO Pin 067 (??-39): IOPort
hm2/hm2_lite.0:     IO Pin 068 (??-41): IOPort
hm2/hm2_lite.0:     IO Pin 069 (??-43): IOPort
hm2/hm2_lite.0:     IO Pin 070 (??-45): IOPort
hm2/hm2_lite.0:     IO Pin 071 (??-47): IOPort
hm2/hm2_lite.0: registered
HAL.hal:2: Component 'hm2_eth' ready
HAL.hal:2: Program '/usr/bin/rtapi_app' started
smalloc_up: shmem available 996956
HAL.hal:2: Realtime module 'hm2_eth' loaded
HAL.hal:3: setting parameter 'hm2_lite.0.watchdog.timeout_ns' to '5000000'
HAL.hal:3: Parameter 'hm2_lite.0.watchdog.timeout_ns' set to 5000000
HAL: removing component 06
HAL: releasing RTAPI resources
HAL: component 06 removed, name = 'halcmd1542'
HAL: initializing hal_lib
HAL: initializing component 'halcmd1542'
HAL: component 'halcmd1542' initialized, ID = 09
/usr/bin/rtapi_app load pid names=pid.x,pid.y,pid.z,pid.s 
HAL.hal:4: Component 'pid' ready
HAL.hal:4: Program '/usr/bin/rtapi_app' started
smalloc_up: shmem available 978465
HAL.hal:4: Realtime module 'pid' loaded
HAL: removing component 09
HAL: releasing RTAPI resources
HAL: component 09 removed, name = 'halcmd1542'
HAL: initializing hal_lib
mb2hal 
HAL: initializing component 'halcmd1542'
HAL: component 'halcmd1542' initialized, ID = 12
mb2hal parse_main_args ERR: wrong number of args
mb2hal main ERR: Unable to parse arguments
HAL.hal:5: waitpid failed mb2hal mb2hal
HAL.hal:5: mb2hal exited without becoming ready
HAL: removing component 12
HAL: releasing RTAPI resources
HAL: component 12 removed, name = 'halcmd1542'

linuxcnc litehm2_6040.ini
and can not open linuxcnc

cnc@debian:~/linuxcnc/configs/litehm2_6040$ linuxcnc litehm2_6040.ini
LINUXCNC - 2.10.0-pre0-1542-g93fccc095
Machine configuration directory is '/home/cnc/linuxcnc/configs/litehm2_6040'
Machine configuration file is 'litehm2_6040.ini'
Starting LinuxCNC...
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Note: Using POSIX realtime
Found file(REL): ./litehm2_6040.hal
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: INFO: Hardware address (MAC): 24:1f:83:30:66:de
hm2_eth: Unrecognized ethernet board found: litehm2 -- port names will be wrong
hm2_eth: discovered litehm2
hm2/hm2_lite.0: Low Level init 0.15
hm2/hm2_lite.0: 72 I/O Pins used:
hm2/hm2_lite.0:     IO Pin 000 (??-01): IOPort
hm2/hm2_lite.0:     IO Pin 001 (??-03): IOPort
hm2/hm2_lite.0:     IO Pin 002 (??-05): IOPort
hm2/hm2_lite.0:     IO Pin 003 (??-07): IOPort
hm2/hm2_lite.0:     IO Pin 004 (??-09): IOPort
hm2/hm2_lite.0:     IO Pin 005 (??-11): IOPort
hm2/hm2_lite.0:     IO Pin 006 (??-13): IOPort
hm2/hm2_lite.0:     IO Pin 007 (??-15): IOPort
hm2/hm2_lite.0:     IO Pin 008 (??-17): IOPort
hm2/hm2_lite.0:     IO Pin 009 (??-19): IOPort
hm2/hm2_lite.0:     IO Pin 010 (??-21): IOPort
hm2/hm2_lite.0:     IO Pin 011 (??-23): IOPort
hm2/hm2_lite.0:     IO Pin 012 (??-25): IOPort
hm2/hm2_lite.0:     IO Pin 013 (??-27): IOPort
hm2/hm2_lite.0:     IO Pin 014 (??-29): IOPort
hm2/hm2_lite.0:     IO Pin 015 (??-31): IOPort
hm2/hm2_lite.0:     IO Pin 016 (??-33): IOPort
hm2/hm2_lite.0:     IO Pin 017 (??-35): IOPort
hm2/hm2_lite.0:     IO Pin 018 (??-37): IOPort
hm2/hm2_lite.0:     IO Pin 019 (??-39): IOPort
hm2/hm2_lite.0:     IO Pin 020 (??-41): IOPort
hm2/hm2_lite.0:     IO Pin 021 (??-43): IOPort
hm2/hm2_lite.0:     IO Pin 022 (??-45): IOPort
hm2/hm2_lite.0:     IO Pin 023 (??-47): IOPort
hm2/hm2_lite.0:     IO Pin 024 (??-01): IOPort
hm2/hm2_lite.0:     IO Pin 025 (??-03): IOPort
hm2/hm2_lite.0:     IO Pin 026 (??-05): IOPort
hm2/hm2_lite.0:     IO Pin 027 (??-07): IOPort
hm2/hm2_lite.0:     IO Pin 028 (??-09): IOPort
hm2/hm2_lite.0:     IO Pin 029 (??-11): IOPort
hm2/hm2_lite.0:     IO Pin 030 (??-13): IOPort
hm2/hm2_lite.0:     IO Pin 031 (??-15): IOPort
hm2/hm2_lite.0:     IO Pin 032 (??-17): IOPort
hm2/hm2_lite.0:     IO Pin 033 (??-19): IOPort
hm2/hm2_lite.0:     IO Pin 034 (??-21): IOPort
hm2/hm2_lite.0:     IO Pin 035 (??-23): IOPort
hm2/hm2_lite.0:     IO Pin 036 (??-25): IOPort
hm2/hm2_lite.0:     IO Pin 037 (??-27): IOPort
hm2/hm2_lite.0:     IO Pin 038 (??-29): IOPort
hm2/hm2_lite.0:     IO Pin 039 (??-31): IOPort
hm2/hm2_lite.0:     IO Pin 040 (??-33): IOPort
hm2/hm2_lite.0:     IO Pin 041 (??-35): IOPort
hm2/hm2_lite.0:     IO Pin 042 (??-37): IOPort
hm2/hm2_lite.0:     IO Pin 043 (??-39): IOPort
hm2/hm2_lite.0:     IO Pin 044 (??-41): IOPort
hm2/hm2_lite.0:     IO Pin 045 (??-43): IOPort
hm2/hm2_lite.0:     IO Pin 046 (??-45): IOPort
hm2/hm2_lite.0:     IO Pin 047 (??-47): IOPort
hm2/hm2_lite.0:     IO Pin 048 (??-01): IOPort
hm2/hm2_lite.0:     IO Pin 049 (??-03): IOPort
hm2/hm2_lite.0:     IO Pin 050 (??-05): IOPort
hm2/hm2_lite.0:     IO Pin 051 (??-07): IOPort
hm2/hm2_lite.0:     IO Pin 052 (??-09): IOPort
hm2/hm2_lite.0:     IO Pin 053 (??-11): IOPort
hm2/hm2_lite.0:     IO Pin 054 (??-13): IOPort
hm2/hm2_lite.0:     IO Pin 055 (??-15): IOPort
hm2/hm2_lite.0:     IO Pin 056 (??-17): IOPort
hm2/hm2_lite.0:     IO Pin 057 (??-19): IOPort
hm2/hm2_lite.0:     IO Pin 058 (??-21): IOPort
hm2/hm2_lite.0:     IO Pin 059 (??-23): IOPort
hm2/hm2_lite.0:     IO Pin 060 (??-25): IOPort
hm2/hm2_lite.0:     IO Pin 061 (??-27): IOPort
hm2/hm2_lite.0:     IO Pin 062 (??-29): IOPort
hm2/hm2_lite.0:     IO Pin 063 (??-31): IOPort
hm2/hm2_lite.0:     IO Pin 064 (??-33): IOPort
hm2/hm2_lite.0:     IO Pin 065 (??-35): IOPort
hm2/hm2_lite.0:     IO Pin 066 (??-37): IOPort
hm2/hm2_lite.0:     IO Pin 067 (??-39): IOPort
hm2/hm2_lite.0:     IO Pin 068 (??-41): IOPort
hm2/hm2_lite.0:     IO Pin 069 (??-43): IOPort
hm2/hm2_lite.0:     IO Pin 070 (??-45): IOPort
hm2/hm2_lite.0:     IO Pin 071 (??-47): IOPort
hm2/hm2_lite.0: registered
mb2hal parse_main_args ERR: wrong number of args
mb2hal main ERR: Unable to parse arguments
./litehm2_6040.hal:12: waitpid failed mb2hal mb2hal
./litehm2_6040.hal:12: mb2hal exited without becoming ready
Shutting down and cleaning up LinuxCNC...
hm2_eth: in hm2_eth_reset
hm2_eth: HostMot2 ethernet driver unloaded
hm2: unloading
Note: Using POSIX realtime
LinuxCNC terminated with an error.  You can find more information in the log:
    /home/cnc/linuxcnc_debug.txt
and
    /home/cnc/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal
what do I need to do? Transform rv901t or install any software driver?
 

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

More
29 Jun 2023 11:38 #274442 by sensille
The supplied linuxcnc was only meant as an example. Initially it matched rv901t_4out__3stepgen_2enc_1pwm.conf, but I have modified the litehm2-config slightly since, without updating the 6040 config.
But "mb2hal parse_main_args ERR: wrong number of args" sounds more like a problem with linuxcnc.
Did you build it yourself from linuxcnc/master? mb2hal also has changed a bit since I made the config. It would be best to start with the smallest possible config, or even with halrun first.

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

More
29 Jun 2023 13:28 #274448 by xu

The supplied linuxcnc was only meant as an example. Initially it matched rv901t_4out__3stepgen_2enc_1pwm.conf, but I have modified the litehm2-config slightly since, without updating the 6040 config.
But "mb2hal parse_main_args ERR: wrong number of args" sounds more like a problem with linuxcnc.
Did you build it yourself from linuxcnc/master? mb2hal also has changed a bit since I made the config. It would be best to start with the smallest possible config, or even with halrun first.



My linuxcnc is downloaded from the build robot linuxcnc-uspace_2.10.0~pre0.1542.g93fccc095_amd64.deb 2023-06-19 21:34
You said there would be a patch merged into 2.10
The file rv901t_stock__with_jp4_initial.bin is programmed and uploaded to linsn rv901t can’t be pinged with 10.10.10.10, but the other two firmwares can


 

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

More
29 Jun 2023 13:29 #274449 by xu

sensille 帖子=274442 用户id=33477提供的 linuxcnc 仅作为示例。最初它与 rv901t_4out__3stepgen_2enc_1pwm.conf 匹配,但此后我稍微修改了 litehm2-config,而没有更新 6040 配置。
但是“mb2hal parse_main_args ERR:错误的参数数量”听起来更像是 linuxcnc 的问题。
你是从 linuxcnc/master 自己构建的吗?自从我进行配置以来,mb2hal 也发生了一些变化。最好从尽可能小的配置开始,甚至先从 halrun 开始。

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

More
29 Jun 2023 18:45 #274464 by sensille
The error you pasted was about mb2hal, not litehm2. You probably don't need mb2hal. Try to write a very small config.

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

More
30 Jun 2023 11:57 #274498 by xu
Thank sensille
Comment out all the output and finally be able to start linuxcnc
Maybe I should modify the circuit of rv901t before running linuxcnc


 

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

More
30 Jun 2023 13:03 #274504 by xu
rv901t_4out__3stepgen_2enc_1pwm, can you do a pre-firmware bit that will contain 6 outputs, 20 inputs, 6 stepgens, 6 encoder interfaces and 2 pwm generators.
The following user(s) said Thank You: Pro_El

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

More
30 Jun 2023 13:20 #274506 by sensille
Yes. Did you modify the board in the same way I did?
Do you want differential stepgen?

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

More
30 Jun 2023 14:40 #274514 by xu
Thank sensille
Yes, I want differential stepgen, because it can better support servo motors,
I would like to try Ilya Koubatkin's retrofit method first and am also interested in your method

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

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