Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wrpc-sw
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
hdl-core-lib
wr-cores
wrpc-sw
Commits
9e1372b2
Commit
9e1372b2
authored
12 years ago
by
Wesley W. Terpstra
Browse files
Options
Downloads
Patches
Plain Diff
Make Etherbone inclusion conditional. It costs 2944 bytes.
parent
1e06a5cc
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Makefile
+4
-2
4 additions, 2 deletions
Makefile
shell/shell.c
+2
-0
2 additions, 0 deletions
shell/shell.c
shell/shell.mk
+4
-1
4 additions, 1 deletion
shell/shell.mk
wrc_main.c
+6
-0
6 additions, 0 deletions
wrc_main.c
with
16 additions
and
3 deletions
Makefile
+
4
−
2
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
...
...
This diff is collapsed.
Click to expand it.
shell/shell.c
+
2
−
0
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
}
...
...
This diff is collapsed.
Click to expand it.
shell/shell.mk
+
4
−
1
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
This diff is collapsed.
Click to expand it.
wrc_main.c
+
6
−
0
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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment