diff --git a/projects/rfdsatt/Makefile b/projects/rfdsatt/Makefile index 621efc3..e42127f 100644 --- a/projects/rfdsatt/Makefile +++ b/projects/rfdsatt/Makefile @@ -40,13 +40,12 @@ OOCD_TARGET ?= stm32f1x ARCH_FLAGS += --specs=/usr/lib/picolibc/arm-none-eabi/picolibc.specs -LIBCOMMON_DIR = ../../libcommon -CPPFLAGS += -I$(LIBCOMMON_DIR)/include -D_GNU_SOURCE -vpath %.c $(LIBCOMMON_DIR)/src/ +# selective libcommon parts OBJS += watchdog.o fault.o iob_stm32_nonblocking.o kill.o microvty.o all: elf bin srec +include ../../mk/libcommon.mk include ../../mk/librfn.mk include ../../mk/libopencm3.mk diff --git a/projects/rfdsatt/rfdsatt.c b/projects/rfdsatt/rfdsatt.c index 22bab8f..8a9817a 100644 --- a/projects/rfdsatt/rfdsatt.c +++ b/projects/rfdsatt/rfdsatt.c @@ -158,6 +158,11 @@ DEFUN(uuid, uuid_cmd, "uuid", "Get the unique ID") printf("UUID: %s\r\n", uuid); } +DEFUN(version, version_cmd, "version", "Get the firmware version") +{ + printf("Firmware Version: %s\r\n", GIT_VERSION); +} + DEFUN(att_set, att_set_cmd, "attenuator-set", "Set an attenuator (channel, stage, dB)") { @@ -189,7 +194,7 @@ static void print_banner(void) desig_get_unique_id_as_string(uuid, sizeof(uuid)); printf("\r\n======================================================================\r\n"); - //printf("sysmocom RFDSATT main (build %s)\r\n", BUILD_VERSION); + printf("sysmocom RFDSATT main (build %s)\r\n", GIT_VERSION); printf("UUID: %s\r\n", uuid); printf("Reset cause(s): 0x%08lx\r\n", last_reset_cause); printf("======================================================================\r\n\r\n"); @@ -211,6 +216,7 @@ int main(void) microvty_init("rfdsat4ch> "); microvty_register(&reset_cmd); microvty_register(&uuid_cmd); + microvty_register(&version_cmd); microvty_register(&att_set_cmd); print_banner();