Hi everyone.
On my laptop, I, as a beginner, am using BBB connected to Windows, with the
following specs
Static hostname: beaglebone
Icon name: computer
Machine ID: 8b5a86912858117221dc298b5c72a450
Boot ID: 38e5bb9f7df54135ada2dd3fefd3ef14
Operating System: Debian GNU/Linux 9 (stretch)
Kernel: Linux 4.4.155-ti-rt-r153
Architecture: arm
Starting machinekit on element 14 BBB fails giving the error below:
MACHINEKIT - 0.1
Machine configuration directory is
'/home/machinekit/machinekit/configs/ARM.BeagleBone.PocketNC'
Machine configuration file is 'PocketNC.ini'
Starting Machinekit...
rtapi_msgd command: /usr/libexec/linuxcnc/rtapi_msgd --instance=0
--rtmsglevel=1 --usrmsglevel=1 --halsize=524288
rtapi_app command: /usr/libexec/linuxcnc/rtapi_app_rt-preempt --instance=0
io started
halcmd loadusr io started
*grep: /sys/devices/bone_capemgr.*/slots: No such file or directory*
*Loading PocketNCdriver overlay*
*bash: /sys/devices/bone_capemgr.*/slots: No such file or directory*
*Error loading device tree overlay file: PocketNCdriver*
*PocketNC.hal:10: program
'/home/machinekit/machinekit/configs/ARM.BeagleBone.PocketNC/setup.bridge.sh'
failed, returned 1*
Shutting down and cleaning up Machinekit...
Cleanup done
Machinekit terminated with an error. For simple cases more information
can be found in the following files:
/home/machinekit/linuxcnc_debug.txt
/home/machinekit/linuxcnc_print.txt
For other cases get more meaningfull information by restarting after
export DEBUG=5
and look at the output of:
/var/log/linuxcnc.log
dmesg
When looking for errors, specifically look for libraries that fail to load
by looking for lines with 'insmod failed' as per example below.
insmod failed, returned -1:
do_load_cmd: dlopen: nonexistant-component.so: cannot open shared object
file:
No such file or directory
For getting help, please have a look here:
www.machinekit.io/docs/getting-help/
To solve this, I have implemented instructions here
<https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays>and
checked all but all there
<https://github.com/beagleboard/bb.org-overlays/issues/55>, but couldn't
come up with anything.
Just in case it is useful, inside my *PocketNCdriver-00A0.dts* file seems
like:
/dts-v1/;
/plugin/;
/ {
compatible = "ti,beaglebone", "ti,beaglebone-black";
/* identification */
// part-number = "BB-LCNC-BEBOPRBR";
part-number = "PocketNCdriver";
version = "00A0";
/* state the resources this cape uses */
exclusive-use =
/* the pin header uses */
"P8.7", /* gpio2.2 Enablen */
"P8.8", /* gpio2.3 X_Min */
"P8.9", /* gpio2.5 X_Max */
"P8.10", /* gpio2.4 Y_Min */
"P8.11", /* gpio1.13 X_Dir */
"P8.12", /* gpio1.12 X_Step */
"P8.13", /* gpio0.23 PWM0 */
"P8.14", /* gpio0.26 Y_Max */
"P8.15", /* gpio1.15 Y_Dir */
"P8.16", /* gpio1.14 Y_Step */
"P8.17", /* gpio0.27 Z_Min */
"P8.18", /* gpio2.01 Z_Max */
"P8.19", /* gpio0.22 B Index */
"P8.26", /* gpio1.29 M.Power */
"P9.11", /* gpio0.30 SpndDir */
"P9.12", /* gpio1.28 SpndIdx */
"P9.14", /* gpio1.18 PWM2 */
"P9.15", /* gpio1.16 Z_Step */
"P9.16", /* gpio1.19 A_Home */
"P9.17", /* gpio0.05 B_Dir */
"P9.18", /* gpio0.04 B_Step */
"P9.21", /* gpio0.03 A_Dir */
"P9.22", /* gpio0.02 A_Step */
"P9.23", /* gpio1.17 Z_Dir */
"P9.24", /* gpio0.15 Spindle */
"P9.13", /* gpio0.31 A_Min */
"P9.26", /* gpio0.14 Mtr_Ena */
"P8.22", /* gpio1.05 SpndAtS */
// "P9.33", /* AIN4 Therm0 */
// "P9.35", /* AIN6 Therm2 */
// "P9.36", /* AIN5 Therm1 */
/* the hardware IP uses */
/* The following 4 pins conflict with the on-board mmc flash */
"gpio2_2",
"gpio2_3",
"gpio2_5",
"gpio2_4",
"gpio1_13",
"gpio1_12",
"gpio0_23",
"gpio0_26",
"gpio1_15",
"gpio1_14",
"gpio0_27",
"gpio2_1",
"gpio0_22",
"gpio1_29",
"gpio1_18",
"gpio1_16",
"gpio0_5",
"gpio0_4",
"gpio0_3",
"gpio0_2",
"gpio1_17",
"gpio0_15",
"pru0";
fragment@0 {
target = <&am33xx_pinmux>;
__overlay__ {
foo_pins: foo_pins {
pinctrl-single,pins = <
0x090 0x3f /* P8.7
gpio2.2 Enablen */
0x094 0x3f /* P8.8
gpio2.3 X_Min */
0x09c 0x3f /* P8.9
gpio2.5 X_Max */
0x098 0x3f /* P8.10
gpio2.4 Y_Min */
0x034 0x3f /* P8.11
gpio1.13 X_Dir */
0x030 0x3f /* P8.12
gpio1.12 X_Step */
0x024 0x3f /* P8.13
gpio0.23 PWM0 */
0x028 0x3f /* P8.14
gpio0.26 Y_Max */
0x03c 0x3f /* P8.15
gpio1.15 Y_Dir */
0x038 0x3f /* P8.16
gpio1.14 Y_Step */
0x02c 0x3f /* P8.17
gpio0.27 Z_Min */
0x08c 0x3f /* P8.18
gpio2.1 Z_Max */
0x020 0x3f /* P8.19
gpio0.22 B_Index */
0x814 0x3f /* P8.22
gpio1.5 SpndAtSp*/
0x87c 0x3f /* p8.26
gpio1.29 M.Power */
0x870 0x3f /* P9.11
gpio0.30 SpndlDr */
0x878 0x3f /* P9.12
gpio1.28 SpndIdx */
0x048 0x3f /* p9.14
gpio1.18 PWM2 */
0x040 0x3f /* p9.15
gpio1.16 Z_Step */
0x84c 0x3f /* p9.16
gpio1.19 A_Home */
0x15c 0x3f /* p9.17
gpio0.5 B_Dir */
0x158 0x3f /* p9.18
gpio0.4 B_Step */
0x154 0x3f /* p9.21
gpio0.3 A_Dir */
0x150 0x3f /* p9.22
gpio0.2 A_Step */
0x044 0x3f /* P9.23
gpio1.17 Z_Dir */
0x184 0x3f /* P9.24
gpio0.15 Spindle */
0x874 0x3f /* P9.13
gpio0.31 A_Min */
0x180 0x3f /* P9.26
gpio0.14 Mtr_Ena */
>;
};
};
};
fragment@1 {
target = <&pruss>;
__overlay__ {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&foo_pins>;
};
};
};
and my setup.bridge.sh file goes like:
#!/bin/bash
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 PocketNCdriver cape-bone-iio ; 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;
if [ ! -r /sys/devices/ocp.*/helper.*/AIN0 ] ; then
echo Analog input files not found in /sys/devices/ocp.*/helper.* >&2
exit 1;
fi
if [ ! -r /sys/class/uio/uio0 ] ; then
echo PRU control files not found in /sys/class/uio/uio0 >&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
#
# 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.
while read PIN DIR JUNK ; do
case "$PIN" in
""|\#*)
continue ;;
*)
[ -r /sys/class/gpio/gpio$PIN ] && continue
sudo -A su -c "echo $PIN > /sys/class/gpio/export" ||
pin_err
sudo -A su -c "echo $DIR >
/sys/class/gpio/gpio$PIN/direction" || dir_err
;;
esac
done <<- EOF
66 out # P8.7 gpio2.2 Enable_n (ECO
location)
# 67 out # P8.8 gpio2.3 X_Min
# 69 out # P8.9 gpio2.5 X_Max
# 68 out # P8.10 gpio2.4 Y_Min
45 out # P8.11 gpio1.13 X_Dir
44 out # P8.12 gpio1.12 X_Step
23 out # P8.13 gpio0.23 PWM0
# 26 out # P8.14 gpio0.26 Y_Max
47 out # P8.15 gpio1.15 Y_Dir
46 out # P8.16 gpio1.14 Y_Step
# 27 out # P8.17 gpio0.27 Z_Min
# 65 out # P8.18 gpio2.1 Z_Max
22 out # P8.19 gpio0.22 PWM1
# 61 out # p8.26 gpio1.29 Status
50 out # p9.14 gpio1.18 PWM2
48 out # p9.15 gpio1.16 Z_Step
# 5 out # p9.17 gpio0.5 B_Dir
# 4 out # p9.18 gpio0.4 B_Step
# 3 out # p9.21 gpio0.3 A_Dir
# 2 out # p9.22 gpio0.2 A_Step
112 out # p9.30 gpio3.16 B_Dir
111 out # p9.29 gpio3.15 B_Step
113 out # p9.21 gpio0.3 A_Dir
115 out # p9.22 gpio0.2 A_Step
49 out # P9.23 gpio1.17 Z_Dir
# 15 out # P9.24 gpio0.15 Spindle
# 14 out # P9.26 gpio0.14 Mtr_Ena
EOF
I am still a beginner, and would highly appreciate any pointers on this,
specially those put in simple English and simple technical terminology.
--
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.