On Saturday 13 May 2017 20:11:43 Tim wrote: > > Gene wrote > > I never renamed anything and kernel was updated to new version > > which reflects in command > > uname -r > >
I think we are crossing paths here. The sim runs just fine on the rt-preempt kernel. and this one should do: 4.4.9-rt17-v7+ Which is the kernel you sent a link to. > > Tim March > > The updated kernel is not an rt-preempt kernel. Does the linuxcnc-sim > run on that? Probably not unless its a uspace build. > Gene here is the output running linuxcnc from terminal on rpi > > pi@navio:~ $ linuxcnc > LINUXCNC - 2.8.0-pre1-2771-gdc2ff49 > Machine configuration directory is > '/home/pi/linuxcnc/configs/sim.axis.foam' Machine configuration file > is 'axis_foam.ini' > Starting LinuxCNC... > emc/iotask/ioControl.cc 768: can't load tool table. > Found file(LIB): /usr/share/linuxcnc/hallib/basic_sim.tcl > setup_kins: cmd=loadrt trivkins coordinates=xyuv > Note: Using POSIX realtime > task: main loop took 0.013645 seconds > note: MAXV max: 1.200 units/sec 72.000 units/min > note: LJOG max: 1.200 units/sec 72.000 units/min > note: LJOG default: 1.000 units/sec 60.000 units/min > note: AJOG max: 90.000 units/sec 5400.000 units/min > note: AJOG default: 45.000 units/sec 2700.000 units/min > note: jog_order='XYUV' > note: jog_invert=set([]) > task: main loop took 0.012554 seconds > task: main loop took 259836.406601 seconds > task: main loop took 0.013945 seconds > task: main loop took 0.011420 seconds > task: main loop took 0.010959 seconds > task: main loop took 0.011337 seconds > task: main loop took 0.012650 seconds > Shutting down and cleaning up LinuxCNC... > task: 699176 cycles, min=0.000036, max=259836.406601, avg=0.372714, 8 > latency excursions (> 10x expected cycle time of 0.001000s) Note: > Using POSIX realtime > pi@navio:~ $ This is obviously a pure sim, what I have is not, its actually (when it works) moving over half a ton of Sheldon cast iron. This was developed from a config in the samples that was actually moving someones lathe, but due to the tight coupling between stepper output and feedback from the stepper, and it needs no PID's anyplace. The header lines of the .hal file iI started with: # ####################################### # # HAL file for HostMot2 with 2 steppers for a lathe # To be modified for a lathe by Gene Heskett # Derived from Ted Hyde's original hm2-servo config # # Based up work and discussion with Seb & Peter & Jeff # GNU license references - insert here. www.linuxcnc.org My additions and comments # NOTICE-NOTICE-NOTICE # ANY gpio's setup after the config= command below are to be configured from # the top of P3 working down # ####################################################################### # Firmware files are in /lib/firmware/hm2/7i90/ # they are not there, no such directory exists in the r-pi install # but I created it and populated it with the SPI*.bit files, waste of time? Dunno # sudo ln -s $HOME/emc2-sandbox/src/hal/drivers/mesa-hostmot2/firmware /lib/firmware/hm2 # # See also: # <http://www.linuxcnc.org/docs/devel/html/man/man9/hostmot2.9.html#config%20modparam> # and http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?HostMot2 So we aren't talking about the same machinery. The only thing common between the above file and mine is the use of the Mesa 7i90HD interface card, which needs a special spi driver called hm2_rpspi.so, and which runs the spi bus at 32 megahertz. After spending the day following this recipe, I get the same error when attempting to start linuxcnc -l: pi@raspi:~/linuxcnc/configs/lathe $ linuxcnc -l LINUXCNC - 2.8.0-pre1-2771-gdc2ff49 Machine configuration directory is '/home/pi/linuxcnc/configs/sheldon-lathe' Machine configuration file is '7i90-axis.ini' Starting LinuxCNC... Found file(REL): ./hm2-7i90-stepper.hal Note: Using POSIX realtime hm2: loading Mesa HostMot2 driver version 0.15 Unknown board: HOST???? hm2_rpspi: rtapi_app_main: Operation not permitted (-1) ./hm2-7i90-stepper.hal:32: waitpid failed /usr/bin/rtapi_app hm2_rpspi ./hm2-7i90-stepper.hal:32: /usr/bin/rtapi_app exited without becoming ready ./hm2-7i90-stepper.hal:32: insmod for hm2_rpspi failed, returned -1 Shutting down and cleaning up LinuxCNC... The HOST???? has been read over the spi bus from the 7i90, and is the result of a 32 bit read but the correct response s/b "7i90". When it works, it works great. I am assuming that the spi_bcm2835 drivers are disabled, if they are present, the above magic cookie is 00000000 00000000 00000000 00000000, showing the bits, as opposed to showing the text on the Unknown board: line above. This is now the 6th sd card I have loaded, with exactly the same error when the build is done. It worked for probably a month intermittently while I was developing the code for the jog dials I put on the new apron. I have 3 pi's, but only 2 of them will boot, and 3 7i90HD's 2 with some damaged i/o, but all 3 respond exactly the same. I'll scope the spi signals come the middle of the day when I have both eyes open at the same time again. I've a gigahertz sampler, and have had a scope probe in one hand since about 1951. :) > pi@navio:~ $ uname -r > 4.4.9-rt17-v7+ > pi@navio:~ $ > > So it is a realtime kernel > The way I come up with sdcard image is as follows. > I started with a headless sdcard image from Emlid and built from there > > > Follow these direction in order to make a minamal Raspbian "Debian > Jessie" install with a realtime kernel,(ver. 4.4.9-rt17) and Mate > Desktop and Linuxcnc sdcard will work with rpi2 or 3 > > # Download, extract then install Emlid image to sdcard download at > https://files.emlid.com/images/emlid-raspbian-20160718.img.xz > > # On Linux computer download Etcher to write image to sdcard at > https://etcher.io/ > > Download, extract and run Etcher with administrator rights > Select the archive file with image and sd card drive letter. > Click “Flash!”. The process may take a few minutes. > > ---------------------------------------------------------------------- > > # RT-PREEMPT realtime kernel > # Download kernel image > > http://download.frank-durr.de/kernel-4.4.9-rt17.tgz > > # Extract files > # Start your file manager from terminal with root privliges, my file > manager is thunar so I use: # sudo thunar > # Copy extracted files inside boot directory, to boot directory on > sdcard choose to overwrite files # Copy extarcted file lib, to root of > other partition on sdcard choose to overwrite files > > ---------------------------------------------------------------------- >- > > # Install Sdcard into PI > > user = pi > password = raspberry > > # Connect to wired network > # Or shh from another computers ethernet connection > > ---------------------------------------------------------------------- >-- > > # See posts at this site about rt patched kernel on pi2 & 3 freezing > during wifi use > https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=159170 > > # Need to add to end of cmdline.txt > > sudo nano /boot/cmdline.txt > > #Add the following > > dwc_otg.fiq_fsm_enable=0 dwc_otg.fiq_enable=0 dwc_otg.nak_holdoff=0 > > sudo reboot -n > > --------------------------------------------------------------------- > > # Update to correct keyboard layout > > sudo dpkg-reconfigure keyboard-configuration > > --------------------------------------------------------------------- > > # Generate locales > > sudo dpkg-reconfigure locales > #add correct language > en_US.UTF-8 > locale -a > #To check locale > > ---------------------------------------------------------------------- >- > > #Update Time Zone > > sudo dpkg-reconfigure tzdata > > ---------------------------------------------------------------------- >-- > > Remove emlid repository > > sudo rm /etc/apt/sources.list.d/emlid.list > > ---------------------------------------------------------------------- >-- > > sudo raspi-config > #NOTE: do not Overclock > 1 Expand File system > when finished choose to reboot > If you need other things enabled such as SPI or C12 ect. it can be > done here > ---------------------------------------------------------------------- > > sudo apt-get -y update && sudo apt-get -y upgrade > > ---------------------------------------------------------------------- >-- > > # RPI 2 or 3 > sudo apt-get install -y mate-core mate-desktop-environment xorg > lightdm sudo apt-get install -y network-manager-gnome synaptic > iceweasel xterm > > # RPI 3 > sudo apt-get install -y pi-bluetooth > sudo apt-get install -y bluetooth bluez blueman > > ---------------------------------------------------------------------- >- > > #Setup network manager > > sudo nano /etc/network/interfaces > #Comment out > #iface wlan0 inet dhcp > #iface default inet dhcp > #iface wlan1 inet dhcp > #iface eth0 inet manual > # Use control key and x to save and save to default > > ---------------------------------------------------------------------- >--- > > #Update rpi firmware without over writing rt kernel > > sudo apt-get install rpi-update > sudo SKIP_KERNEL=1 rpi-update > > sudo reboot -n > > ---------------------------------------------------------------------- >-- > > #Install Linuxcnc > > On RPI goto web page > http://buildbot.linuxcnc.org/ > Follow directions to install 2.7 or Master, Jessie (uspace: realtime > with RT-Preempt, and simulation), armhf # first add repository key, > open Mate Terminal look for it in system tools menu item, you can copy > and paste from web site page: > > sudo apt-key adv --keyserver hkp://keys.gnupg.net --recv-key E0EE663E > > # Start text editor Pluma with root privliges like this: > > sudo pluma /etc/apt/sources.list.d/linuxcnc-buildbot.list > > #Add the following to file for 2.7 then save: > > deb http://buildbot.linuxcnc.org/ jessie 2.7-sim > deb-src http://buildbot.linuxcnc.org/ jessie 2.7-sim > > # Now update the system: > > sudo apt-get update > > # Now start Synaptic which will only start from terminal > > sudo synaptic > > # Type in search box linuxcnc find the following, then click and mark > for installation then apply; > > linuxcnc-uspace > linuxcnc-doc-en > > > Tim March Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) Genes Web page <http://geneslinuxbox.net:6309/gene> ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users