Skip to content
Snippets Groups Projects
Commit 9e1372b2 authored by Wesley W. Terpstra's avatar Wesley W. Terpstra
Browse files

Make Etherbone inclusion conditional. It costs 2944 bytes.

parent 1e06a5cc
Branches
Tags
No related merge requests found
......@@ -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
......
......@@ -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 }
......
......@@ -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
......@@ -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:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment