How to design new driver for my own board

More
1 year 4 months ago #330732 by vitali
Hi.
I am new in Linuxcnc. I am going to design my own board use FPGA. I do not know how to make driver. I have experience in c c++. May be somebody knows how to do it, or where i can take any sample driver or any information.

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

More
1 year 4 months ago #330737 by meister
Comp-Style:
github.com/jzolee/HAL2UDP/blob/2.0/LinuxCNC%20driver/udp.comp

pure C/C++
github.com/scottalford75/Remora-NVEM/blo...emora-nv/remora-nv.c

what FPGA you want to use ? Verilog, VHDL, nmigem ,... ?
Open Source or closed ?

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

More
1 year 4 months ago #330746 by unknown
Basically you can make an FPGA design that uses a Spartan 6 and use the mesa hostmot2 firmware. No need to develop fpga code or write a new driver.

Here's an example
github.com/ozzyrob/Linuxcnc-FPGA

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

More
1 year 4 months ago #330754 by vitali
Thank you for the help. I am going to use EP4CE10E22, Verilog, and it will be open source project.
Board parameters:
Dimensions 67x76x20 mm
Weight 60g
Supply voltage 12-24V
Power 0.5 W
Opt. isolated inputs 24
Outputs: digital 16 (0.5A max)
analog 2 (0-10V)
JTAG, USB
The following user(s) said Thank You: meister

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

More
1 year 4 months ago #330755 by vitali
Sorry
Power 5 W
The following user(s) said Thank You: meister, unknown

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

More
1 year 4 months ago #330756 by meister
sweet :)

and for the host interface USB?
this will not really work :(
LinuxCNC is a little bit different to other controller like GRBL,
you need a realtime loop between board and host and this will only work with Ethernet/Ethercat/SPI(raspberry) or LPT., not with USB or UART.

If you need almost ready to use Gateware/Drivers for your board, you can look at:

github.com/multigcs/riocore/
( github.com/multigcs/riocore/blob/dev/doc/BOARDS.md )

this is a gateware generator and all the FPGA stuff is written in verilog,
but it use W5500 UDP interface or SPI.
There is also an UART/USB plugin, but only for testing, not for realtime use.

you can take a look on my youtube channel, there are many videos with different FPGA's running RIO:
www.youtube.com/@unixconf/

but i can understand if you prefer to write your own software, it's also fun :)

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

Moderators: PCW, jmelson
Time to create page: 0.248 seconds
Powered by Kunena Forum