Merge pull request #2350 from PX4/master_versioning_fix

Back Port of Git Versioning - without side effects
This commit is contained in:
Lorenz Meier
2015-06-13 00:07:19 +02:00
9 changed files with 48 additions and 15 deletions
+2
View File
@@ -41,6 +41,8 @@
#include <stdint.h>
#include "build_git_version.h"
__BEGIN_DECLS
__EXPORT extern const char* px4_git_version;
+1 -2
View File
@@ -52,8 +52,7 @@ SRCS = \
mcu_version.c \
bson/tinybson.c \
circuit_breaker.cpp \
circuit_breaker_params.c \
$(BUILD_DIR)git_version.c
circuit_breaker_params.c
ifeq ($(PX4_TARGET_OS),nuttx)
SRCS += err.c \
@@ -9,3 +9,5 @@
#define PX4_I2C_BUS_LED 3
#define PX4_I2C_OBDEV_LED 0x55
#define STM32_SYSMEM_UID "SIMULATIONID"
+1
View File
@@ -125,6 +125,7 @@ typedef param_t px4_param_t;
/* FIXME - Used to satisfy build */
//STM DocID018909 Rev 8 Sect 39.1 (Unique device ID Register)
#define UNIQUE_ID 0x1FFF7A10
#define STM32_SYSMEM_UID "SIMULATIONID"
/* FIXME - Used to satisfy build */
#define getreg32(a) (*(volatile uint32_t *)(a))
+8 -2
View File
@@ -41,6 +41,7 @@
*/
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <version/version.h>
#include <systemlib/err.h>
@@ -57,6 +58,9 @@ static const char sz_ver_all_str[] = "all";
static const char mcu_ver_str[] = "mcu";
static const char mcu_uid_str[] = "uid";
const char* px4_git_version = PX4_GIT_VERSION_STR;
const uint64_t px4_git_version_binary = PX4_GIT_VERSION_BINARY;
static void usage(const char *reason)
{
if (reason != NULL) {
@@ -88,7 +92,8 @@ int ver_main(int argc, char *argv[])
return ret;
} else {
errx(1, "Not enough arguments, try 'ver hwcmp PX4FMU_V2'");
warn("Not enough arguments, try 'ver hwcmp PX4FMU_V2'");
return 1;
}
}
@@ -155,7 +160,8 @@ int ver_main(int argc, char *argv[])
if (ret == 1) {
errx(1, "unknown command.\n");
warn("unknown command.\n");
return 1;
}
} else {