Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
28
Issues
28
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
9e1372b2
Commit
9e1372b2
authored
Jul 09, 2012
by
Wesley W. Terpstra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make Etherbone inclusion conditional. It costs 2944 bytes.
parent
1e06a5cc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
3 deletions
+16
-3
Makefile
Makefile
+4
-2
shell.c
shell/shell.c
+2
-0
shell.mk
shell/shell.mk
+4
-1
wrc_main.c
wrc_main.c
+6
-0
No files found.
Makefile
View file @
9e1372b2
...
...
@@ -57,7 +57,9 @@ OBJS_WRC = wrc_main.o \
PTP_NOPOSIX
=
ptp-noposix
INCLUDE_DIRS
=
-I
$(PTP_NOPOSIX)
/wrsw_hal
-I
$(PTP_NOPOSIX)
/libptpnetif
-Isoftpll
-Iinclude
CFLAGS_EB
=
-DWITH_ETHERBONE
=
$(WITH_ETHERBONE)
CFLAGS_PTPD
=
-ffreestanding
-DPTPD_FREESTANDING
-DWRPC_EXTRA_SLIM
-DPTPD_MSBF
-DPTPD_DBG
\
-DPTPD_NO_DAEMON
-DNEW_SINGLE_WRFSM
-DPTPD_TRACE_MASK
=
0
\
-include
$(PTP_NOPOSIX)
/compat.h
\
...
...
@@ -95,7 +97,7 @@ OBJDUMP=$(CROSS_COMPILE)objdump
OBJCOPY
=
$(CROSS_COMPILE)
objcopy
SIZE
=
$(CROSS_COMPILE)
size
CFLAGS
=
$(CFLAGS_PLATFORM)
$(CFLAGS_PTPD)
$(INCLUDE_DIRS)
-ffunction-sections
-fdata-sections
-Os
-Iinclude
-include
include/trace.h
$(PTPD_CFLAGS)
-I
$(PTP_NOPOSIX)
/PTPWRd
-I
.
-Isoftpll
CFLAGS
=
$(CFLAGS_PLATFORM)
$(CFLAGS_
EB)
$(CFLAGS_
PTPD)
$(INCLUDE_DIRS)
-ffunction-sections
-fdata-sections
-Os
-Iinclude
-include
include/trace.h
$(PTPD_CFLAGS)
-I
$(PTP_NOPOSIX)
/PTPWRd
-I
.
-Isoftpll
LDFLAGS
=
$(LDFLAGS_PLATFORM)
-ffunction-sections
-fdata-sections
-Wl
,--gc-sections
-Os
-Iinclude
OBJS
=
$(OBJS_PLATFORM)
$(OBJS_WRC)
$(OBJS_PTPD)
$(OBJS_SHELL)
$(OBJS_TESTS)
$(OBJS_LIB)
$(OBJS_SOCKITOWM)
$(OBJS_SOFTPLL)
$(OBJS_DEV)
OUTPUT
=
wrc
...
...
shell/shell.c
View file @
9e1372b2
...
...
@@ -45,7 +45,9 @@ static const struct shell_cmd cmds_list[] = {
{
"saveenv"
,
cmd_saveenv
},
{
"time"
,
cmd_time
},
{
"sfp"
,
cmd_sfp
},
#if WITH_ETHERBONE
{
"ip"
,
cmd_ip
},
#endif
{
"mac"
,
cmd_mac
},
{
NULL
,
NULL
}
...
...
shell/shell.mk
View file @
9e1372b2
...
...
@@ -9,5 +9,8 @@ OBJS_SHELL = shell/shell.o \
shell/cmd_measure_t24p.o \
shell/cmd_time.o \
shell/cmd_gui.o \
shell/cmd_ip.o \
shell/cmd_mac.o
ifneq ($(WITH_ETHERBONE), 0)
OBJS_SHELL += shell/cmd_ip.o
endif
wrc_main.c
View file @
9e1372b2
...
...
@@ -60,8 +60,10 @@ void wrc_initialize()
pps_gen_init
();
wrc_ptp_init
();
#if WITH_ETHERBONE
ipv4_init
(
"wru1"
);
arp_init
(
"wru1"
);
#endif
}
#define LINK_WENT_UP 1
...
...
@@ -147,14 +149,18 @@ int main(void)
switch
(
l_status
)
{
#if WITH_ETHERBONE
case
LINK_WENT_UP
:
needIP
=
1
;
break
;
#endif
case
LINK_UP
:
update_rx_queues
();
#if WITH_ETHERBONE
ipv4_poll
();
arp_poll
();
#endif
break
;
case
LINK_WENT_DOWN
:
...
...
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