Here is what i did:

    - 1st: i make a coppy trivkins.c then rename it become trivkinstest.c 
 and changing line 88 to: static const char *name = "trivkinstest";

    - 2nd: i follow this 
        
 
https://groups.google.com/forum/#!msg/machinekit/yrBnTxQL7_E/IrPHxKn3BQAJ;context-place=forum/machinekit
         + i pass Submakefile
         + just change something in Makefile 
    - 3rd: use terminal go to /home/machinekit/machinekit/src and "make" 
then type command "sudo make setuid"

    - 4th: i try to test if trivkinstest work. i open CRAMPS.hal, change 
           loadrt trivkins -->loadrt trivkinstest 
           loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD 
num_joints=[TRAJ]AXES tp=tp kins=trivkins--->trivkinstest

    - finally: i try run CRAMPS but it's bugged 
     Debug file information:
     stat: No such file or directory
     CRAMPS.hal:18: insmod failed, returned -1:
     do_load_cmd: dlopen: trivkinstest.so: cannot open shared object file: 
No such file or directory
     rpath=/usr/lib/linuxcnc/xenomai
     See /var/log/linuxcnc.log for more information.
     10047
     PID TTY      STAT   TIME COMMAND  
     Stopping realtime threads
     Unloading hal components

i'm using BBB and machinekit. sorry for my trash English.

Vào 15:41:12 UTC+7 Thứ Hai, ngày 14 tháng 8 năm 2017, Schooner đã viết:
>
> Going to need a lot more info than that and to see the source.
>
> You basically need to know how to write Makefiles, to alter the existing 
> ones to build your stuff too, assuming it is compatible.
>
> On 14/08/17 03:39, thangle wrote:
>
> Hi, 
>
> Does anyone know how to compile a new source? example, i coppy a new  C 
> project from an old project in machinekit src and rename, what should i do 
> to make it work. please help me. tks 
> -- 
> 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 machinekit+...@googlegroups.com <javascript:>.
> 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 machinekit+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.
Reading 2/2 PRU dependency files
Reading 327/330 dependency files
Done reading dependencies

Reading 0/0 realtime dependency files
Done reading realtime dependencies
make: Entering directory '/home/machinekit/machinekit/src'
cp  rtapi/xenomai.h ../include/xenomai.h
Making modules for flavor posix
make[1]: Entering directory '/home/machinekit/machinekit/src'
Reading 2/2 PRU dependency files
Reading 335/338 dependency files
Done reading dependencies

Reading 426/427 realtime dependency files
Done reading realtime dependencies
Depending emc/kinematics/trivkinstest.c
Compiling realtime emc/kinematics/trivkinstest.c
Linking ../rtlib/posix/trivkinstest.so
make[1]: Leaving directory '/home/machinekit/machinekit/src'
Making modules for flavor rt-preempt
make[1]: Entering directory '/home/machinekit/machinekit/src'
Reading 2/2 PRU dependency files
Reading 335/338 dependency files
Done reading dependencies

Reading 426/427 realtime dependency files
Done reading realtime dependencies
Depending emc/kinematics/trivkinstest.c
Compiling realtime emc/kinematics/trivkinstest.c
Linking ../rtlib/rt-preempt/trivkinstest.so
make[1]: Leaving directory '/home/machinekit/machinekit/src'
Making modules for flavor xenomai
make[1]: Entering directory '/home/machinekit/machinekit/src'
Reading 2/2 PRU dependency files
Reading 335/338 dependency files
Done reading dependencies

Reading 426/427 realtime dependency files
Done reading realtime dependencies
Depending emc/kinematics/trivkinstest.c
Compiling realtime emc/kinematics/trivkinstest.c
Linking ../rtlib/xenomai/trivkinstest.so
make[1]: Leaving directory '/home/machinekit/machinekit/src'
for f in posix rt-preempt xenomai; do \
    test -f ../libexec/rtapi_app_$f -a \
            \( 0`stat -c %u ../libexec/rtapi_app_$f 2>/dev/null` \
                -ne 0 -o ! -u ../libexec/rtapi_app_$f \) \
        && need_setuid=1; \
done; \
test "$need_setuid" = 1 && \
    echo -n "You now need to run 'sudo make setuid' " && \
    echo "in order to run in place." || true
make: Leaving directory '/home/machinekit/machinekit/src'

Reply via email to