diff --git a/make/templates/firmware_info.c.template b/flight/templates/firmware_info.c.template similarity index 78% rename from make/templates/firmware_info.c.template rename to flight/templates/firmware_info.c.template index e686ac2b4..babc4eff3 100644 --- a/make/templates/firmware_info.c.template +++ b/flight/templates/firmware_info.c.template @@ -44,15 +44,15 @@ */ struct __attribute__((packed)) fw_version_info { - uint8_t magic[4]; - uint32_t commit_hash_prefix; - uint32_t timestamp; - uint8_t board_type; - uint8_t board_revision; - uint8_t commit_tag_name[26]; - uint8_t sha1sum[20]; - uint8_t uavosha1[20]; - uint8_t pad[20]; + uint8_t magic[4]; + uint32_t commit_hash_prefix; + uint32_t timestamp; + uint8_t board_type; + uint8_t board_revision; + uint8_t commit_tag_name[26]; + uint8_t sha1sum[20]; + uint8_t uavosha1[20]; + uint8_t pad[20]; }; #if (defined(__MACH__) && defined(__APPLE__)) @@ -60,16 +60,12 @@ const struct fw_version_info fw_version_blob __attribute__((used)) __attribute__ #else const struct fw_version_info fw_version_blob __attribute__((used)) __attribute__((__section__(".fw_version_blob"))) = { #endif - .magic = { 'O','p','F','w' }, - .commit_hash_prefix = 0x${HASH8}, - .timestamp = ${UNIXTIME}, - .board_type = ${BOARD_TYPE}, - .board_revision = ${BOARD_REVISION}, - .commit_tag_name = "${FWTAG}", - .sha1sum = { ${SHA1} }, - .uavosha1 = { ${UAVOSHA1} }, -}; - -/** - * @} - */ + .magic = { 'O','p','F','w' }, + .commit_hash_prefix = 0x${HASH8}, + .timestamp = ${UNIXTIME}, + .board_type = ${BOARD_TYPE}, + .board_revision = ${BOARD_REVISION}, + .commit_tag_name = "${FWTAG}", + .sha1sum = { ${SHA1} }, + .uavosha1 = { ${UAVOSHA1} }, +}; diff --git a/make/.gitattributes b/make/.gitattributes index fe48df9c1..f02d5b2be 100644 --- a/make/.gitattributes +++ b/make/.gitattributes @@ -6,8 +6,6 @@ *.py text eol=lf *.sh text eol=lf -/doxygen/*.cfg text eol=lf -/templates/firmware_info.c.template text eol=lf -/templates/gcs_version_info.h.template text eol=crlf +/doxygen/* text eol=lf /templates/*.txt text eol=crlf /uncrustify/*.cfg text eol=lf diff --git a/make/firmware-defs.mk b/make/firmware-defs.mk index dbda89b26..e0c5f6cc3 100644 --- a/make/firmware-defs.mk +++ b/make/firmware-defs.mk @@ -133,10 +133,10 @@ endef define OPFW_TEMPLATE FORCE: -$(1).firmware_info.c: $(1) $(ROOT_DIR)/make/templates/firmware_info.c.template FORCE +$(1).firmware_info.c: $(1) $(ROOT_DIR)/flight/templates/firmware_info.c.template FORCE @$(ECHO) $(MSG_FWINFO) $$(call toprel, $$@) $(V1) $(VERSION_INFO) \ - --template=$(ROOT_DIR)/make/templates/firmware_info.c.template \ + --template=$(ROOT_DIR)/flight/templates/firmware_info.c.template \ --outfile=$$@ \ --image=$(1) \ --type=$(2) \