Hello,

I am using furaday + BBB red.
There is a random issue with the configuration of uio0: there can be a latency in the init phase which is breaking access to /sys/class/uio/uio0 in setup.sh.
I have added few lines to handle that.
See my setup.sh, line #48 (attached to this post).
Not sure that is linked to what you see, but that could help.

Frederic.
http://cnc.f1oat.org


On 2018-01-27 00:36, Moi Toi wrote:
Hi all

I try to start machinekit with fresh debian instal after many test i can't have machinekit starting, i have allways same error

 i try to start machinekit with furaday cape files
actually with a debian release provided and tested by furaday author on beaglebone black debian release is made without x11 so we try to execute machinekit remotely with client (but i have same issue with lxde) for start program i need to execute a python script with the command ./run.py
and the error is
./run.py
loading furaday_stepgen.bbio... cape-universal already loaded
Loading cape-bone-iio overlay
bash: line 0: echo: write error: No such file or directory
Error loading device tree overlay file: cape-bone-iio


Tha author try to help me without success so if you have any suggestion this is greatly appreciated !


Many thanks, best regards
--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- You received this message because you are subscribed to the Google Groups "Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.
#!/bin/bash
# Copyright 2014
# Charles Steinkuehler <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

dtbo_err () {
        echo "Error loading device tree overlay file: $DTBO" >&2
        exit 1
}

pin_err () {
        echo "Error exporting pin:$PIN" >&2
        exit 1
}

dir_err () {
        echo "Error setting direction:$DIR on pin:$PIN" >&2
        exit 1
}

SLOTS=/sys/devices/bone_capemgr.*/slots

# Make sure required device tree overlay(s) are loaded
for DTBO in cape-universal ; do

        if grep -q $DTBO $SLOTS ; then
                echo $DTBO overlay found
        else
                echo Loading $DTBO overlay
                sudo -A su -c "echo $DTBO > $SLOTS" || dtbo_err
                sleep 1
        fi
done;

PRU=/sys/class/uio/uio0
echo -n "Waiting for $PRU "

while [ ! -r $PRU ]
do
    echo -n "."
    sleep 1
done
echo OK

if [ ! -r $PRU ] ; then
        echo PRU control files not found in $PRU >&2
        exit 1;
fi

# Export GPIO pins:
# One pin needs to be exported to enable the low-level clocks for the GPIO
# modules (there is probably a better way to do this)
# 
# Any GPIO pins driven by the PRU need to have their direction set properly
# here.  The PRU does not do any setup of the GPIO, it just yanks on the
# pins and assumes you have the output enables configured already
# 
# Direct PRU inputs and outputs do not need to be configured here, the pin
# mux setup (which is handled by the device tree overlay) should be all
# the setup needed.
# 
# Any GPIO pins driven by the hal_bb_gpio driver do not need to be
# configured here.  The hal_bb_gpio module handles setting the output
# enable bits properly.  These pins _can_ however be set here without
# causing problems.  You may wish to do this for documentation or to make
# sure the pin starts with a known value as soon as possible.

sudo $(which config-pin) -f - <<- EOF
        P8_7    out     # DO0
        P8_8    out     # DO1
        P8_9    out     # DO2
        P8_10   out     # DO3
        P8_11   qep     # eQEP2B
        P8_12   qep     # eQEP2A
        P8_13   out     # OO0
        P8_14   out     # DO4
        P8_15   out     # DO5
        P8_16   qep     # eQEP2I
        P8_17   out     # DO6
        P8_18   in      # DO7
        P8_19   out     # OO1

        # eMMC signals, uncomment *ONLY* if you have disabled the on-board eMMC!
        #  MachineKit images disable eMMC and HDMI audio by default in uEnv.txt:
        #  capemgr.disable_partno=BB-BONELT-HDMI,BB-BONE-EMMC-2G
        #       P8.22   low     #
        #   P8.23   low #
        #   P8.24   low #
        #   P8.25   low #


        #   P8.31 # eQEP1I
        #   P8.33 # eQEP1B
        #   P8.35 # eQEP1A

        P8_26   out     # OO2

        P9_11   in      # DI7
        P9_12   in      # DI6
        P9_13   in      # DI5
        P9_14   low     # PWM4
        P9_15   in      # DI4
        P9_16   low     # PWM2
        P9_17   in      # DI3
        P9_18   in      # DI2
        #   P9_19       pwm     # DI1 # TODO: reserved for I2C ?
        #   P9.20       low     # not connected. Maybe DI0 would be possible in 
future versions?
        P9_21   low     # PWM1
        P9_22   low     # PWM3
        P9_23   out     # OO3
        P9_24   pruin   # ENCxB
        P9_25   pruin   # ENCxI, can connect A channel (?)
        P9_26   in      # ENCxA  # TODO: pruin, but pru1, no pru0 !?
        P9_27   pruin   # eQEP0B
        P9_28   out     # OO4
        P9_29   pruin   # ENCyB
        P9_30   pruin   # ENCyI
        P9_31   pruin   # ENCyA

        P9_41   pruin   # eQEP0I ?
        P9_91   pruin   # eQEP0I ?

        P9_42   in      # eQEP0A ?
        P9_92   qep     # eQEP0A ?
EOF

Reply via email to