-
Notifications
You must be signed in to change notification settings - Fork 6
/
runtest
49 lines (34 loc) · 1.28 KB
/
runtest
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
# make clean
# make all
# make install
HAL_TOP_DIR="/opt/linuxcnc"
COMP_SO_DIR="/home/user/Desktop/Linux-Embedded/linux-hal/halcompile-opencascade"
rm -rf $HAL_TOP_DIR/rtlib/opencascade.so
cp -rf $COMP_SO_DIR/opencascade.so $HAL_TOP_DIR/rtlib/
# When using qt activate this:
cp -rf $COMP_SO_DIR/next/libnext.so $HAL_TOP_DIR/rtlib/
cp -rf $COMP_SO_DIR/next/libnext.so.1 $HAL_TOP_DIR/rtlib/
cp -rf $COMP_SO_DIR/next/libnext.so.1.0 $HAL_TOP_DIR/rtlib/
cp -rf $COMP_SO_DIR/next/libnext.so.1.0.0 $HAL_TOP_DIR/rtlib/
sudo ldconfig $HAL_TOP_DIR/rtlib/
# Add libnext also to the Makefile -L/path.. -lnext
# Don't edit the Makefile with qt, use a normal texteditor.
# For example, how to compile a .cpp file into a shared .so lib by terminal:
# g++ -c -Wall -Werror -fPIC testlib.cpp
# g++ -shared -o libtest.so testlib.o
cd $HAL_TOP_DIR/scripts && . ./rip-environment
#cd $HAL_TOP_DIR/bin
# Load rt component:
halcmd loadrt threads name1=base-thread fp1=0 period1=25000 name2=servo-thread period2=1000000
halcmd loadrt opencascade
halcmd addf opencascade servo-thread
#halcmd setp test.bit-in true
#halcmd \-f $COMP_SO_DIR/machinemodel.hal
halcmd start
# Start hal programs to debug:
#halmeter
halshow
#halscope
# Unload rt components and clean up hal:
halrun -U