add sample c realtime code
This commit is contained in:
55
src/triggerSync/Makefile
Normal file
55
src/triggerSync/Makefile
Normal file
@@ -0,0 +1,55 @@
|
||||
HOST=MOTTEST-CPPM-CRM0573
|
||||
|
||||
|
||||
XENOMAI_INC_DIR=/opt/powerpc-465-rootfs/usr/local/xenomai-2.6.2.1/include
|
||||
XENOMAI_LIB_DIR=/opt/powerpc-465-rootfs/usr/local/xenomai-2.6.2.1/lib
|
||||
|
||||
INC=-I/opt/eldk-4.2/PPMAC_rootfs-7-wheezy/opt/ppmac/libppmac -I/opt/eldk-4.2/PPMAC_rootfs-7-wheezy/opt/ppmac/rtpmac -I$(XENOMAI_INC_DIR)
|
||||
|
||||
|
||||
LIB=-L/opt/eldk-4.2/PPMAC_rootfs-7-wheezy/opt/ppmac/libppmac -lppmac -L/opt/eldk-4.2/PPMAC_rootfs-7-wheezy/usr/local/xenomai-2.6.2.1/lib -lnative -lxenomai -lpthread_rt -lpthread -lrt -ldl
|
||||
|
||||
CC=/opt/eldk-4.2/usr/bin/ppc_4xxFP-g++
|
||||
LD=$(CC)
|
||||
|
||||
all: sampleCode
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -g $(INC) -c $^ -o $@
|
||||
|
||||
sampleCode: sampleCode.o
|
||||
$(LD) -g $(LIB) $^ -o $@
|
||||
scp $@ root@$(HOST):/tmp
|
||||
scp /opt/eldk-4.2/ppc_4xxFP/usr/bin/gdbserver root@$(HOST):/tmp
|
||||
|
||||
clean:
|
||||
rm -f sampleCode sampleCode *.o
|
||||
|
||||
Debug: all
|
||||
cleanDebug: clean
|
||||
|
||||
#export LD_LIBRARY_PATH=/opt/ppmac/libppmac/
|
||||
#/tmp/sampleCode
|
||||
#/tmp/gdbserver localhost:2000 /tmp/sampleCode
|
||||
|
||||
# /opt/eldk-4.2/usr/bin/ppc_4xxFP-gdb
|
||||
# file sampleCode
|
||||
# b main
|
||||
# target remote MOTTEST-CPPM-CRM0573:2000
|
||||
# continue
|
||||
# step
|
||||
#
|
||||
|
||||
#ddd --debugger /opt/eldk-4.2/usr/bin/ppc_4xxFP-gdb
|
||||
|
||||
#scp /opt/eldk-4.2/PPMAC_rootfs-7-wheezy/usr/bin/gdbserver root@mottest-cppm-crm0573:/tmp -> failed
|
||||
#scp /opt/eldk-4.2/PPMAC_rootfs/usr/bin/gdbserver root@mottest-cppm-crm0573:/tmp -> works
|
||||
#scp /opt/eldk-4.2/ppc_4xxFP/usr/bin/gdbserver root@mottest-cppm-crm0573:/tmp -> works
|
||||
|
||||
#codeblocks config is in: /home/zamofing_t/.config/codeblocks/default.conf
|
||||
|
||||
|
||||
#rtpmacapi.h:struct SHM* GetSharedMemPtr(void);
|
||||
|
||||
#Linux MOTTEST-CPPM-CRM0573 3.2.21-powerpmac-smp #213 SMP Fri Oct 2 14:29:46 PDT 2015 ppc
|
||||
|
||||
Reference in New Issue
Block a user