- Posts: 91
- Thank you received: 0
EMC2 running on Raspberry Pi?
Please Log in to join the conversation.
mungkie wrote:
Is it possible that you didn't switch to the correct branch after cloning the repo?THERE ARE NO RT_PREEMPT PATCHES OR MODIFICATIONS MADE TO THE GIT REPO AT git://gitorious.org/emc-rt-preempt/emc-rt-preempt.git linuxcnc-buesch-rt
It is possible, but I basically followed the instructions on the wiki so it should have worked, I know nothing about git.
I have updated the wiki with what I did to get my current compilation to work, I hope someone that knows can correct what I have added if I have made a mistake.
Please Log in to join the conversation.
andypugh wrote:
It is possible, but I basically followed the instructions on the wiki so it should have worked, I know nothing about git.mungkie wrote:Is it possible that you didn't switch to the correct branch after cloning the repo?
What does "git branch" tell you?
You will see a list of branches and one will have an asterisk. That is the branch you are on. Quite possibly "master"
git checkout <branchname> will move you to a different branch.
(and git checkout <master> will take you back to the standard LinuxCNC "master" with whatever changes you have made there.)
Please Log in to join the conversation.
All above tests were on a stock RPI apart from the kernel which is the made from the default RPI kernel code with the RT_PREEMPT atch applied.
I will be over clocking the RPI which maybe will increase performance but upto 60%, I will remove all unnecessary modules and services that are running in the background.
If python OGL and accelerated X working that will also take a lot of load off the processor.
Also using xenomai would probably improve performance marginally.
I have not read up on how to set prioritys in RT_PREEMPT but this will also possibly improve things?
I think getting my hardware drivers working on the PREEMPT version maybe will take 4-5 hours.
Hacking and tuning the code could take months or maybe could take hours?
I sort of would like to try adding xenomai support in the same way that the RT_PREEMPT has been added (basically a wrapper for convert RTAI calls to RT_PREEMPT equivalent).
I would also like to look at drivers for SPI devices and possibly microcontroller buffered step output (probably needs to add some sort of config options to hal so that it knows output does not step with basethread but instead is calculated in blocks of a given buffer size and flushed out by serial at servo thread resolution).
Lots of stuff looks possible, I dont know if any of it will actually work?
Please Log in to join the conversation.
Have you been following the recent discussions on the developer mailing list? There has been a sudden surge in enthusiasm for making rt-preempt and Xenomai support work properly in the main LinuxCNC version.All above tests were on a stock RPI apart from the kernel which is the made from the default RPI kernel code with the RT_PREEMPT atch applied.
(When it was realised that the current dependence on RTAI is actually a dependence on one RTAI developer remaining interested.)
thread.gmane.org/gmane.linux.distributions.emc.devel/7351
Please Log in to join the conversation.
- mhaberler
- New Member
-
- Thank you received: 0
Have you been following the recent discussions on the developer mailing list? There has been a sudden surge in enthusiasm for making rt-preempt and Xenomai support work properly in the main LinuxCNC version.
(When it was realised that the current dependence on RTAI is actually a dependence on one RTAI developer remaining interested.)
thread.gmane.org/gmane.linux.distributions.emc.devel/7351
I would not exactly call it enthusiasm, but rather pressing for a solid foundation for the future.
"Technically sound" doesnt necessarily translate automatically into "a wise decision from a project perspective".
- Michael
Please Log in to join the conversation.
It made me think about the real problem of open source, which is that often those that are enthusiastic do not have the skill or understanding to do a good job and will hack into a codebase and ruin things :lol:
I actually think I probably have enough understanding to realise that I am going to do a rather crap job of this, but I am hacking on it as a hobby for fun, but also in the hope that someone with the right skills might see there is some interest in using new RT kernels and decide to show how it should be done properly.
I actually did a degree in computer engineering, but that was a long time ago and I spent most of my time getting stoned at college, and never got a job in the computing industry.
I think linuxcnc is a sort of infrastructure project for machine control and needs some real planning by experts to be worthwhile, but that said I think and hope that ideas and lessons can be gained from people attempting to hack things and see what happens.
Please Log in to join the conversation.
As I am going to have to start again, I decided I will try and make an autobuild script so I can quickly get back to a working system if the filesystem is trashed again.
Most of my code is backed up but there is maybe a little lost so it may take some time to get working, I will start this evening and hope to post the scripts at the end of the weekend, if anyone is interested in testing please let me know as I would like to know if the build scripts will work okay for others.
I am not sure if I will have enough time to get a full system setup but will see how it goes, as I am building everything on the rpi kernel build is an overnight compile job and linuxcnc probably takes 5 hours to compile.
I may also get enough time to show the circuits for the parallel port interface that I made, if anyone lets me know that they are actually interested enough to bother soldering one together.
Suggested hardware to compile is : rpi, 8Gb SD card, a powered usb hd for swapspace.
Please Log in to join the conversation.
If anyone wants a copy its available at : www.soundproofingforum.co.uk/halitosis/rpi_linuxcnc.tgz
File size is about 32Mb, but you have to download 90Mb of update packages for raspbian, 30Mb of git source checkout for linuxcnc, and 100Mb of kernel source.
If you are good you should be able to compile and run the system with an hour or so of reading and leave the raspberry pi on over night to compile new kernel and linuxcnc RT_PREEMPT.
I have done some brief tests on the RT system and it needs a lot of tuning of ini file for base period and other params, but the RT version is definitly much better than the sim mode compile (though still slow and crap compared to an x86 version).
I think the i2c driver also needs some work though as I guess the i2c transmit speed maybe causing some problems.
I still need to make some docs about how to wire the i2c io expander though most people should be able to do that from the datasheet

I hope there are some people that can help and give feedback.
Please Log in to join the conversation.
- mhaberler
- New Member
-
- Thank you received: 0
I have uploaded all the development drivers, machine config examples and hardware datasheets, plus the scripts I use to grab the kernel source and patches for RT, and packages and source to compile the RT version of linuxcnc for the raspberry pi.
If anyone wants a copy its available at : www.soundproofingforum.co.uk/halitosis/rpi_linuxcnc.tgz
wow - thanks! exactly what I was looking for!
- Michael
Please Log in to join the conversation.
