Thanks for this list.
I've gotten a
Libre Computer Le Potato
upgraded to Bookworm, with a 4.xx RT kernel, and downloaded LinuxCNC from the Distro, so it's aaaalmost there.
It's an Amlogic S905X chip.
But you can's use "loadrt hal_pi_gpio" in your .hal file because that driver (Written by Andy Pugh, thank you) is specific to the Broadcom chip on the RasPi board.
I think I'm understanding that the methods in hal_pi_gpio are passing / accepting pointers in and out of the hal subsystem (my apologies for not getting the vocabulary right, I'm still reading the HAL documentation).
If this understanding is correct, then that means we can't use these boards manufacturer's "preferred method" for addressing these pins which is to use gpiod: while gpiod does have a C handling library libgpiod (
housed at linux' git.kernel.org
) , the EMC code of LinuxCNC would need to be modified to use that it instead of the direct addressing which I'm guessing it does instead. This probably is not only a big programming job but probably introduces latency. I believe the philosophy of the real-time thread is not to need anything from outside the thread and that libgpiod might already go outside and if not today might be modded later.
My initial hope was that libgpiod would have a way to return the pointers, but I didn't see that up-front -- keep in mind my skills in this area are pretty weak.
If anyone has a better set of ideas for pushing this further, I'd love to exchange thoughts.
Right now I'm thinking I need to either:
1: Develop something like "hal_amlogic_gpio" which means:
1a) figure out the memory mapping scheme for the amlogic chip, possibly using the source files from libgpiod
1b) write a piece of code that gets the requisite pointers, probably using hal_pi_gpio as a template
1c) compile said code, learning where to put the resulting driver file so that I can...
1d) do halcompile to make the new amlogic_gpio module available to hal.
1e) debug all the previous steps and incorporate the new amlogic_gpio into a .hal file and proceed with integrating a working machine.
OR
2: Get a Raspi 4, and proceed directly to step 'e'
OR
3: Use a full-sized PC.
I'm going on vacation next week, and will probably try to get a RasPi during that time.
Nonetheless, I'm very interested in this SBC world.
It seems there should be some utility out there that would allow generally getting those pointers and therefore it should be possible to create a golden hal_gp_gpio component.