aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Sidrane <david_s5@nscdg.com>2015-03-05 05:14:48 -1000
committerDavid Sidrane <david_s5@nscdg.com>2015-04-07 07:48:25 -1000
commit7f53f28e5b79078bf8c3194888335314f0c98d57 (patch)
tree51c29b8d52bfa92af8d0b41b013a2c7f8b6c3fa0
parentd00b8e8a8e2979e44e6d7fa72b3a6cafd3736c6b (diff)
downloadpx4-firmware-7f53f28e5b79078bf8c3194888335314f0c98d57.tar.gz
px4-firmware-7f53f28e5b79078bf8c3194888335314f0c98d57.tar.bz2
px4-firmware-7f53f28e5b79078bf8c3194888335314f0c98d57.zip
Added BUILD_URI to locate elf file from fualt log
-rw-r--r--makefiles/firmware.mk7
-rw-r--r--src/lib/version/version.h2
-rw-r--r--src/systemcmds/hardfault_log/hardfault_log.c4
3 files changed, 12 insertions, 1 deletions
diff --git a/makefiles/firmware.mk b/makefiles/firmware.mk
index 21e8739aa..4b4823a98 100644
--- a/makefiles/firmware.mk
+++ b/makefiles/firmware.mk
@@ -110,7 +110,12 @@ ifneq ($(words $(PX4_BASE)),1)
$(error Cannot build when the PX4_BASE path contains one or more space characters.)
endif
+# The Url for the elf file for crash logging
+
+BUILD_URI ?= "localhost"
+
$(info % GIT_DESC = $(GIT_DESC))
+$(info % BUILD_URI = $(BUILD_URI))
#
# Set a default target so that included makefiles or errors here don't
@@ -183,7 +188,7 @@ EXTRA_CLEANS =
#
# Extra defines for compilation
#
-export EXTRADEFINES := -DGIT_VERSION=$(GIT_DESC)
+export EXTRADEFINES := -DGIT_VERSION=$(GIT_DESC) -DBUILD_URI=$(BUILD_URI)
#
# Append the per-board driver directory to the header search path.
diff --git a/src/lib/version/version.h b/src/lib/version/version.h
index d8ccb6774..366ba80a0 100644
--- a/src/lib/version/version.h
+++ b/src/lib/version/version.h
@@ -51,6 +51,8 @@
#define STRINGIFY(s) FREEZE_STR(s)
#define FW_GIT STRINGIFY(GIT_VERSION)
+#define FW_BUILD_URI STRINGIFY(BUILD_URI)
+
#ifdef CONFIG_ARCH_BOARD_PX4FMU_V1
#define HW_ARCH "PX4FMU_V1"
#endif
diff --git a/src/systemcmds/hardfault_log/hardfault_log.c b/src/systemcmds/hardfault_log/hardfault_log.c
index 3ac98ae95..d0d67b4fc 100644
--- a/src/systemcmds/hardfault_log/hardfault_log.c
+++ b/src/systemcmds/hardfault_log/hardfault_log.c
@@ -444,6 +444,10 @@ static int write_dump_info(int fdout, info_s *info, struct bbsramd_s * desc,
if (n != write(fdout, buffer, n)) {
return -EIO;
}
+ n = snprintf(buffer, sz, " Build url: %s \n", FW_BUILD_URI);
+ if (n != write(fdout, buffer, n)) {
+ return -EIO;
+ }
return OK;
}