EMC2 running on Raspberry Pi?

More
01 Mar 2014 10:36 #44278 by kinsa
Replied by kinsa on topic EMC2 running on Raspberry Pi?
You can get the code here:
git clone -b testing/sunxi https://code.google.com/p/picnc/
You'll have to modify the defines in HAL/picnc_grbl.h especially the CCM clock and gate values as I don't think the A10 shares the same settings.

Getting the SPI to work is a bit tricky as the documentation is sorely lacking. I must admit that RPi is way much better in this regard compared to the Allwinner chips.
The following user(s) said Thank You: wizard69

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

More
01 Mar 2014 19:10 #44289 by ADBensi
Hello,

  You compiled the emc2 supporting any platform? example
  . / configure - prefix = / usr / local - with-platform = raspberry ...

Best Regards

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

More
01 Mar 2014 20:37 #44293 by kinsa
Replied by kinsa on topic EMC2 running on Raspberry Pi?
I'm using the UBC3 branch and configured using the following setting:
./configure --with-xenomai

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

More
01 Mar 2014 22:31 #44296 by ADBensi
Hello,

These were your steps? Forgive me for asking before testing. It will be several hours until the process is finished ;)

git clone git://git.linuxcnc.org/git/linuxcnc.git linuxcnc-dev
cd linuxcnc-dev

git checkout -b v2.5_branch origin/v2.5_branch
git checkout v2.5_branch

cd debian
./configure -r
cd ..
dpkg-checkbuilddeps

cd src
./autogen.sh
./configure --prefix=/usr/local --with-xenomai --disable-build-documentation --with-kernel=/boot/config-3.4.12

make
make setuid
make install

Best Regards

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

More
01 Mar 2014 22:34 #44297 by kinsa
Replied by kinsa on topic EMC2 running on Raspberry Pi?

Hello,

These were your steps? Forgive me for asking before testing. It will be several hours until the process is finished ;)

git clone git://git.linuxcnc.org/git/linuxcnc.git linuxcnc-dev
cd linuxcnc-dev

git checkout -b v2.5_branch origin/v2.5_branch
git checkout v2.5_branch

cd debian
./configure -r
cd ..
dpkg-checkbuilddeps

cd src
./autogen.sh
./configure --prefix=/usr/local --with-xenomai --disable-build-documentation --with-kernel=/boot/config-3.4.12

make
make setuid
make install

Best Regards

I've used this one: github.com/mhaberler/asciidoc-sandbox/wi...RT-Operating-Systems

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

More
02 Mar 2014 21:36 #44315 by ADBensi
Hello,

  I have a problem, What it could be?
when I run . scripts/rip-environment to set up the environment I get error:
This script is only useful on run-in-place systems.

I try:

cd src
./autogen.sh
./configure --prefix=/usr/local --with-xenomai --disable-build-documentation
make
make setuid
make install
cd ..
source scripts/rip-environment

After over xterm (X11 sshd) I try:

cd src
make clean
./autogen.sh
./configure --prefix=/usr/local --with-xenomai --disable-build-documentation --enable-run-in-place --enable-simulator
make
make setuid
source scripts/rip-environment

And same error, "This script is only useful on run-in-place systems".

My shell set:
root@cubie:/var/source/linuxcnc # set
BASH=/bin/bash
BASHOPTS=cmdhist:expand_aliases:extquote:force_fignore:hostcomplete:interactive_comments:login_shell:progcomp:promptvars:sourcepath
BASH_ALIASES=()
BASH_ARGC=()
BASH_ARGV=()
BASH_CMDS=()
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="4" [1]="2" [2]="37" [3]="1" [4]="release" [5]="arm-unknown-linux-gnueabihf")
BASH_VERSION='4.2.37(1)-release'
COLUMNS=214
DIRSTACK=()
DISPLAY=localhost:12.0
EUID=0
GROUPS=()
HISTFILE=/root/.bash_history
HISTFILESIZE=500
HISTSIZE=500
HOME=/root
HOSTNAME=cubie
HOSTTYPE=arm
IFS=$' \t\n'
LANG=pt_BR.UTF-8
LINES=56
LOGNAME=root
MACHTYPE=arm-unknown-linux-gnueabihf
MAIL=/var/mail/root
MAILCHECK=60
OLDPWD=/var/source/linuxcnc/src
OPTERR=1
OPTIND=1
OSTYPE=linux-gnueabihf
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PIPESTATUS=([0]="1")
PPID=13584
PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
PS1='\[\033[1;33m\]\u\[\033[1;37m\]@\[\033[1;32m\]\h\[\033[1;37m\]:\[\033[1;31m\]\w \[\033[1;36m\]\$ \[\033[0m\]'
PS2='> '
PS3='> '
PS4='+ '
PWD=/var/source/linuxcnc
SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
SHLVL=1
TERM=xterm
UID=0
USER=root
_=test

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

More
02 Mar 2014 23:32 #44316 by ADBensi
solved - I remove --prefix=/usr/local and it works.
Next - try SPI on A10 :D

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

More
03 Mar 2014 00:20 #44322 by mhaberler
Hi ADBensi,

just a note: you write

...
./configure --prefix=/usr/local --with-xenomai --disable-build-documentation --with-kernel=/boot/config-3.4.12
...


I think you do not need the " --with-kernel=/boot/config-3.4.12" option; the xenomai build is kernel-independent. That flag makes sense only if one is building for a kernel RT thread flavor (like RTAI, or Xenomai kernel (the latter is not recommended)).

- Michael

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

More
05 Apr 2014 04:20 #45570 by michael.oosten
Hi,

I installed LinuxCNC on my RPi
Got the hal_gpio driver
Compiled it: comp --install hal_gpio.c
Loaded it: halcmd: loadrt hal_gpio
It's loaded: halcmd: show pin
Component Pins:
Owner Type Dir Value Name
32770 bit IN FALSE hal_gpio.pin-03-out
32770 bit IN FALSE hal_gpio.pin-05-out
32770 bit IN FALSE hal_gpio.pin-07-out
32770 bit IN FALSE hal_gpio.pin-08-out
32770 bit IN FALSE hal_gpio.pin-10-out
32770 bit IN FALSE hal_gpio.pin-11-out
32770 bit IN FALSE hal_gpio.pin-12-out
32770 bit IN FALSE hal_gpio.pin-13-out
32770 bit IN FALSE hal_gpio.pin-15-out
32770 bit IN FALSE hal_gpio.pin-16-out
32770 bit IN FALSE hal_gpio.pin-18-out
32770 bit IN FALSE hal_gpio.pin-19-out
32770 bit IN FALSE hal_gpio.pin-21-out
32770 bit IN FALSE hal_gpio.pin-22-out
32770 bit IN FALSE hal_gpio.pin-23-out
32770 bit IN FALSE hal_gpio.pin-24-out
32770 bit IN FALSE hal_gpio.pin-26-out

When I measure between pin 7 (GPIO 4) and 3v3, I get 3v3, so pin 7 is indeed low.
After: halcmd: setp hal_gpio.pin-07-out TRUE
I am expecting to measure 0v, but I'm still measuring 3v3.

What am I doing wrong here?

Thanks, Michael

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

More
15 Apr 2014 20:00 #45974 by mungkie

Hi,

I installed LinuxCNC on my RPi
Got the hal_gpio driver
Compiled it: comp --install hal_gpio.c
Loaded it: halcmd: loadrt hal_gpio
>SNIP
When I measure between pin 7 (GPIO 4) and 3v3, I get 3v3, so pin 7 is indeed low.
After: halcmd: setp hal_gpio.pin-07-out TRUE
I am expecting to measure 0v, but I'm still measuring 3v3.

What am I doing wrong here?

Thanks, Michael


I have no idea, linuxcnc on raspberry pi has never really worked very well with direct gpio control, it was all work in progress. I have not looked at linuxcnc on the rpi since last year, I don't think much has been done for the rpi, maybe better to check the beagle?

I am thinking about getting back to work on linuxcnc on the raspberry pi, but I am not sure if it is viable.
I have never tried using xenomai kernels, I may give that a try in the hope that the UI is a little more responsive.

I have always used RT_PREEMPT kernel and there are problems with it that I am not sure may cause safety issues.

So far you can either have good realtime performance but lockup issues on the UI or you can have poor realtime performance and a better UI control.

The issue being you can click buttons in axis and occasionally the mouse will freeze for upto 2-3 seconds, this happens intermittently but will probably occur every 10 minutes, the safety issue comes if you click jog it can get stuck on moving a motor for 2 seconds without possible stopping.

I also have never implemented input via GPIO.

I am not sure how kinsa's pic IO board functions as I never got time to actually try his work.

I am considering setting up a kickstarter project to fund development of the DMA direct gpio driver, but I want to be able to offer more than just the driver so have been looking to workout a crowdfunding bulk purchase of stepper motors and drivers for a 5 axis hobby system. Part of me thinks its a bad idea as perfect cnc control maynot be possible with the rpi, but I thought maybe hobbyists would put up with it if they got a good deal on motors and drivers.
I doubt there would be enough people interested to justify the effort though.

I was looking along the lines of getting 10,000 people interested enough to donate $65 each and it could be possible to get 5 nema17 0.4Nm motors with A4988 drivers for all backers (would still need to know how to solder and provide a power supply).

Otherwise I would probably just run the kickstarter as request for $2000 so I can buy some decent stepper drivers and some test equipment to make sure there are no missed steps.

I got as far as getting 6 motors running under axis using the dma driver and it would run the default test gcode from axis, but never fully tested it as there was the problem with mouse lockups and I was waiting for a decent RT_PREEMPT kernel to be released.

I doubt the hal_gpio.c driver will give decent performance, but I have never tried it so that is just my unproven opinion.

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

Time to create page: 0.123 seconds
Powered by Kunena Forum