Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
tsn-measures
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
tsn-measures
Commits
a03e6d00
Commit
a03e6d00
authored
Jul 16, 2021
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change client/server to master/slave to avoid confusions
parent
12c9d3cd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
28 deletions
+28
-28
src/motor-control/build/Makefile
src/motor-control/build/Makefile
+26
-26
src/motor-control/src/master.c
src/motor-control/src/master.c
+1
-1
src/motor-control/src/slave.c
src/motor-control/src/slave.c
+1
-1
No files found.
src/motor-control/build/Makefile
View file @
a03e6d00
S
ERVER_PROG
=
server
S
LAVE_PROG
=
slave
CLIENT_PROG
=
client
MASTER_PROG
=
master
SRCDIR
=
../src
SRCDIR
=
../src
S
ERVER_SRCS
=
server
.c
S
LAVE_SRCS
=
slave
.c
S
ERVER
_SRCS
+=
recv_packet.c
S
LAVE
_SRCS
+=
recv_packet.c
S
ERVER
_SRCS
+=
send_packet.c
S
LAVE
_SRCS
+=
send_packet.c
S
ERVER
_SRCS
+=
common.c
S
LAVE
_SRCS
+=
common.c
S
ERVER
_SRCS
+=
gpio.c
S
LAVE
_SRCS
+=
gpio.c
CLIENT_SRCS
=
client
.c
MASTER_SRCS
=
master
.c
CLIENT
_SRCS
+=
recv_packet.c
MASTER
_SRCS
+=
recv_packet.c
CLIENT
_SRCS
+=
send_packet.c
MASTER
_SRCS
+=
send_packet.c
CLIENT
_SRCS
+=
common.c
MASTER
_SRCS
+=
common.c
S
ERVER_OBJS
=
$(SERVER
_SRCS:%.c=%.o)
S
LAVE_OBJS
=
$(SLAVE
_SRCS:%.c=%.o)
CLIENT_OBJS
=
$(CLIENT
_SRCS:%.c=%.o)
MASTER_OBJS
=
$(MASTER
_SRCS:%.c=%.o)
ifeq
($(DEBUG),)
ifeq
($(DEBUG),)
CFLAGS
=
-O2
CFLAGS
=
-O2
...
@@ -41,36 +41,36 @@ endif
...
@@ -41,36 +41,36 @@ endif
vpath
%.c
$(SRCDIR)
vpath
%.c
$(SRCDIR)
all
:
links
all
:
links
links
:
bin/$(S
ERVER_PROG) bin/$(CLIENT
_PROG)
links
:
bin/$(S
LAVE_PROG) bin/$(MASTER
_PROG)
bin/$(S
ERVER_PROG)
:
$(SERVER
_PROG)
bin/$(S
LAVE_PROG)
:
$(SLAVE
_PROG)
mkdir
-p
bin
mkdir
-p
bin
ln
-fs
$(
realpath
$(S
ERVER
_PROG)
)
$@
ln
-fs
$(
realpath
$(S
LAVE
_PROG)
)
$@
bin/$(
CLIENT_PROG)
:
$(CLIENT
_PROG)
bin/$(
MASTER_PROG)
:
$(MASTER
_PROG)
mkdir
-p
bin
mkdir
-p
bin
ln
-fs
$(
realpath
$(
CLIENT
_PROG)
)
$@
ln
-fs
$(
realpath
$(
MASTER
_PROG)
)
$@
xdp_kern.o
:
xdp_kern.c
xdp_kern.o
:
xdp_kern.c
clang
$(IFLAGS)
-isystem
/usr/include/arm-linux-gnueabihf
-S
-target
bpf
-D
__BPF_TRACING__
-Wall
-O2
-emit-llvm
-c
-g
-o
xdp_kern.ll
$^
clang
$(IFLAGS)
-isystem
/usr/include/arm-linux-gnueabihf
-S
-target
bpf
-D
__BPF_TRACING__
-Wall
-O2
-emit-llvm
-c
-g
-o
xdp_kern.ll
$^
llc
-march
=
bpf
-filetype
=
obj
-o
$@
xdp_kern.ll
llc
-march
=
bpf
-filetype
=
obj
-o
$@
xdp_kern.ll
ifneq
($(WITH_GIT_XDP),)
ifneq
($(WITH_GIT_XDP),)
$(S
ERVER_PROG)
:
$(SERVER
_OBJS) xdp_kern.o
$(S
LAVE_PROG)
:
$(SLAVE
_OBJS) xdp_kern.o
$(CC)
$(LDFLAGS)
$(LDIRS)
$(S
ERVER
_OBJS)
$(LLIBS)
-o
$@
$(CC)
$(LDFLAGS)
$(LDIRS)
$(S
LAVE
_OBJS)
$(LLIBS)
-o
$@
else
else
$(S
ERVER_PROG)
:
$(SERVER
_OBJS)
$(S
LAVE_PROG)
:
$(SLAVE
_OBJS)
$(CC)
$(LDFLAGS)
$(LDIRS)
$^
$(LLIBS)
-o
$@
$(CC)
$(LDFLAGS)
$(LDIRS)
$^
$(LLIBS)
-o
$@
endif
endif
$(
CLIENT_PROG)
:
$(CLIENT
_OBJS)
$(
MASTER_PROG)
:
$(MASTER
_OBJS)
$(CC)
$(LDFLAGS)
$(LDIRS)
$^
$(LLIBS)
-o
$@
$(CC)
$(LDFLAGS)
$(LDIRS)
$^
$(LLIBS)
-o
$@
-include
$(subst .c,.d,$(S
ERVER
_SRCS))
-include
$(subst .c,.d,$(S
LAVE
_SRCS))
-include
$(subst .c,.d,$(
CLIENT
_SRCS))
-include
$(subst .c,.d,$(
MASTER
_SRCS))
clean
:
clean
:
$(RM)
-rf
bin
$(RM)
-rf
bin
$(RM)
$(S
ERVER_OBJS)
$(SERVER_PROG)
$(
subst
.c,.d,
$(SERVER
_SRCS)
)
$(RM)
$(S
LAVE_OBJS)
$(SLAVE_PROG)
$(
subst
.c,.d,
$(SLAVE
_SRCS)
)
$(RM)
$(
CLIENT_OBJS)
$(CLIENT_PROG)
$(
subst
.c,.d,
$(CLIENT
_SRCS)
)
$(RM)
$(
MASTER_OBJS)
$(MASTER_PROG)
$(
subst
.c,.d,
$(MASTER
_SRCS)
)
.PHONY
:
clean all links
.PHONY
:
clean all links
src/motor-control/src/
client
.c
→
src/motor-control/src/
master
.c
View file @
a03e6d00
/*
/*
*
Real time packet sending client
*
Motor control master
*
*
* Large portions taken from cyclictest
* Large portions taken from cyclictest
*
*
...
...
src/motor-control/src/s
erver
.c
→
src/motor-control/src/s
lave
.c
View file @
a03e6d00
/*
/*
*
Real time packet receiving server
*
Motor control slave
*
*
* Large portions taken from cyclictest
* Large portions taken from cyclictest
*
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment