Commit fd68e59b authored by Omar Gabella's avatar Omar Gabella

Build options added in Kconfig and Makefile

parent 6993102e
Pipeline #2834 failed with stages
......@@ -608,3 +608,32 @@ config PPSI
boolean
help
Select this option for the ppsi engine (now only option)
config BROADCAST
depends on WR_NODE
default n
boolean "Use broadcast mode"
help
Use broadcast (KM3NeT mode)
config MON_TO_DEBUG
depends on BROADCAST
default n
boolean "Monitoring to debug"
help
monitoring in broadcast mode
config PARENTWRMODEOFF
depends on BROADCAST
default n
boolean "Disable parentWrModeOn check"
config TRACK_PHASE_NOT_FOUND
depends on BROADCAST
default n
boolean "Reboot servo state if TRACKPHASE not found"
config WRPC_FAULTS
depends on WR_NODE
default n
boolean "Applies a correction to the timestamps"
......@@ -9,6 +9,11 @@ endif
export CROSS_COMPILE
export CONFIG_ABSCAL
export CONFIG_BROADCAST
export CONFIG_MON_TO_DEBUG
export CONFIG_PARENTWRMODEOFF
export CONFIG_TRACK_PHASE_NOT_FOUND
export CONFIG_WRPC_FAULTS
CC = $(CROSS_COMPILE)gcc
LD = $(CROSS_COMPILE)ld
......@@ -128,8 +133,15 @@ endif
OUTPUT-$(CONFIG_WR_SWITCH) = rt_cpu
OUTPUT := $(OUTPUT-y)
broadcast: CFLAGS += -DBROADCAST
broadcast: all
CFLAGS-$(CONFIG_MON_TO_DEBUG) += -DMON_TO_DEBUG
CFLAGS-$(CONFIG_PARENTWRMODEOFF) += -DPARENTWRMODEOFF
CFLAGS-$(CONFIG_TRACK_PHASE_NOT_FOUND) += -DTRACK_PHASE_NOT_FOUND
CFLAGS-$(CONFIG_BROADCAST) += -DBROADCAST
CFLAGS-$(CONFIG_WRPC_FAULTS) += -DCONFIG_WRPC_FAULTS
CFLAGS += $(CFLAGS-y)
#broadcast: CFLAGS += -DBROADCAST
#broadcast: all
GIT_VER = $(shell git describe --always --dirty | sed 's;^wr-switch-sw-;;')
GIT_USR = $(shell git config --get-all user.name)
......@@ -168,7 +180,8 @@ $(obj-ppsi): gitmodules
fi
$(MAKE) $(BC) -C $(PPSI) ppsi.o WRPCSW_ROOT=.. \
CROSS_COMPILE=$(CROSS_COMPILE) CONFIG_NO_PRINTF=y
USER_CFLAGS="$(PPSI_USER_CFLAGS)"
USER_CFLAGS="$(CFLAGS)"
#USER_CFLAGS="$(PPSI_USER_CFLAGS)"
sdb-lib/libsdbfs.a:
$(MAKE) -C sdb-lib
......
......@@ -76,7 +76,9 @@ static int wrc_mon_status(void)
struct wr_servo_state *s =
&((struct wr_data *)ppi->ext_data)->servo_state;
#ifdef BROADCAST
#ifdef MON_TO_DEBUG
cprintf(C_GREY, "\n\nFIRMWARE to TEST 3");
cprintf(C_GREY, "\n\nListening_state: ");
cprintf(C_BLUE, "%d", WR_DSPOR(ppi)->counter_listening_state);
cprintf(C_GREY, "\nwr_link_on_state: ");
......@@ -94,9 +96,9 @@ static int wrc_mon_status(void)
cprintf(C_BLUE, "\nWR_SERVO: downlink: ");
cprintf(C_GREY, "%d", WR_DSPOR(ppi)->ctr_update_downlink_servo);
cprintf(C_BLUE, "\ntimestamp: error++: ");
cprintf(C_GREY, "%d", WR_DSPOR(ppi)->ctr_downlink_timestamp_error);
cprintf(C_BLUE, ": count>5: ");
cprintf(C_GREY, "%d", WR_DSPOR(ppi)->ctr_downlink_timestamp_errorcount);
cprintf(C_BLUE, ": count>5: ");
cprintf(C_GREY, "%d", WR_DSPOR(ppi)->ctr_downlink_timestamp_error);
cprintf(C_BLUE, ": no_converge: ");
cprintf(C_GREY, "%d", WR_DSPOR(ppi)->ctr_ctr_no_converge);
cprintf(C_BLUE, "\n\nSERVO_STATES: busy: ");
......@@ -131,6 +133,9 @@ static int wrc_mon_status(void)
cprintf(C_GREY, "%d", WR_DSPOR(ppi)->counter_before_timeout_check);
cprintf(C_BLUE, ": ANN_RECIPT|TO_FAULT: ");
cprintf(C_GREY, "%d", WR_DSPOR(ppi)->counter_PP_TO_ANN_RECEIPT);
cprintf(C_BLUE, "\n\next_specific: 0x");
cprintf(C_GREY, "%04x", WR_DSPOR(ppi)->mon_ext_specific);
#endif
cprintf(C_BLUE, "\n\nPTP status: ");
......@@ -193,8 +198,8 @@ int wrc_mon_gui(void)
cprintf(C_RED, "Link down ");
minic_get_stats(&tx, &rx);
cprintf(C_GREY, "(RX: %d, TX: %d)", rx, tx);
// TMP KM3 cprintf(C_GREY, "(RX: %d, TX: %d)", rx, tx);
cprintf(C_GREY, "(RX %d, TX %d)", rx, tx);
if (!state.state) {
return 1;
}
......@@ -251,9 +256,11 @@ int wrc_mon_gui(void)
if (wrc_mon_status() == 0)
return 1;
cprintf(C_GREY, "Servo state: ");
// TMP KM3 cprintf(C_GREY, "Servo state: ");
cprintf(C_GREY, "Servo state ");
cprintf(C_WHITE, "%s\n", s->servo_state_name);
cprintf(C_GREY, "Phase tracking: ");
// TMP KM3 cprintf(C_GREY, "Phase tracking: ");
cprintf(C_GREY, "Phase tracking ");
if (s->tracking_enabled)
cprintf(C_GREEN, "ON\n");
else
......@@ -265,7 +272,8 @@ int wrc_mon_gui(void)
spll_get_num_channels(NULL, &n_out);
for(i = 0; i < n_out; i++) {
cprintf(C_GREY, "Aux clock %d status: ", i);
// TMP KM3 cprintf(C_GREY, "Aux clock %d status: ", i);
cprintf(C_GREY, "Aux clock %d status ", i);
aux_stat = spll_get_aux_status(i);
......@@ -277,7 +285,7 @@ int wrc_mon_gui(void)
pp_printf("\n");
}
#ifdef BROADCAST
#ifndef BROADCAST
/* If compiled with broadcast this information is meaninless, so don't show */
cprintf(C_BLUE, "\nTiming parameters:\n");
......
Subproject commit d0fcdf2fa7707bb0de7d0593c3ab2ba9cdf6d2b4
Subproject commit 2ffa3e76ef1aaf7ad88738b5330df06b9a3e90d4
Markdown is supported
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