From d923017cf90793839629f3da51a5787da8020b6f Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Fri, 30 Oct 2020 13:12:19 -0400 Subject: [PATCH 1/3] Fix #3, use sizeof() for header sizes. sizeof() will keep this tool in sync if the size of the CFE file or table header should ever change. Note this also implicitly restricts this tool to the CFE build environment where these headers are available. As a result this will no longer be buildable as a fully standalone/external tool. --- cfe_ts_crc.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/cfe_ts_crc.c b/cfe_ts_crc.c index c51b267..1932915 100644 --- a/cfe_ts_crc.c +++ b/cfe_ts_crc.c @@ -47,18 +47,18 @@ #include "cfe_ts_crc_version.h" +/* These headers are needed for CFE_FS_Header_t and CFE_TBL_File_Hdr_t, respectively. + * This uses the OSAL definition of fixed-width types, even thought this tool + * is not using OSAL itself. */ +#include "common_types.h" +#include "cfe_fs_extern_typedefs.h" +#include "cfe_tbl_extern_typedefs.h" + #define CFE_ES_CRC_8 1 /**< \brief CRC ( 8 bit additive - returns 32 bit total) (Currently not implemented) */ #define CFE_ES_CRC_16 2 /**< \brief CRC (16 bit additive - returns 32 bit total) */ #define CFE_ES_CRC_32 3 /**< \brief CRC (32 bit additive - returns 32 bit total) (Currently not implemented) */ #define CFE_ES_DEFAULT_CRC CFE_ES_CRC_16 /**< \brief mission specific CRC type */ -typedef unsigned char uint8; -typedef unsigned short uint16; -typedef unsigned int uint32; -typedef signed char int8; -typedef signed short int16; -typedef signed int int32; - /* ** Function Prologue ** @@ -142,7 +142,8 @@ int main(int argc, char **argv) exit(0); } /* Set to skip the header (116 bytes) */ - skipSize = 116; + skipSize = sizeof(CFE_FS_Header_t) + sizeof(CFE_TBL_File_Hdr_t); + /* open the input file if possible */ fd = open(argv[1], O_RDONLY); if (fd < 0) From 43ec3ef1100afbf45effcb92b9f69ba5edf7388f Mon Sep 17 00:00:00 2001 From: astrogeco <59618057+astrogeco@users.noreply.github.com> Date: Wed, 2 Dec 2020 10:55:15 -0500 Subject: [PATCH 2/3] HOTFIX #25, Set REVISION to 99 and update baseline Set REVISION version number to 99 to indicate development status. Bump baseline to tagged Bootes release candidate. --- cfe_ts_crc_version.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cfe_ts_crc_version.h b/cfe_ts_crc_version.h index f2f97e5..46bbf06 100644 --- a/cfe_ts_crc_version.h +++ b/cfe_ts_crc_version.h @@ -33,14 +33,15 @@ */ #define CFE_TS_CRC_BUILD_NUMBER 8 /*!< @brief Number of commits since baseline */ #define CFE_TS_CRC_BUILD_BASELINE \ - "v1.1.0+dev" /*!< @brief Development Build: git tag that is the base for the current */ + "v1.2.0+dev" /*!< @brief Development Build: git tag that is the base for the current */ /* * Version Macro Definitions */ #define CFE_TS_CRC_MAJOR_VERSION 1 /*!< @brief ONLY APPLY for OFFICIAL releases. Major version number. */ #define CFE_TS_CRC_MINOR_VERSION 1 /*!< @brief ONLY APPLY for OFFICIAL releases. Minor version number. */ -#define CFE_TS_CRC_REVISION 0 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. */ +#define CFE_TS_CRC_REVISION 99 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. A value of "99" indicates an unreleased development version. */ + #define CFE_TS_CRC_MISSION_REV 0 /*!< @brief ONLY USED by MISSION Implementations. Mission revision */ /* From e73cd76d535eba4e9d117d2082d4c10f9b8a04b9 Mon Sep 17 00:00:00 2001 From: astrogeco <59618057+astrogeco@users.noreply.github.com> Date: Wed, 2 Dec 2020 10:55:57 -0500 Subject: [PATCH 3/3] Bump to v1.2.0-rc1+dev3 Integration Candidate 2020-11-24 --- README.md | 7 +++++++ cfe_ts_crc_version.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f9b1b7c..c35d09d 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,13 @@ This lab application is a ground utility to generate binary table CRCs for cFS. ## Version Notes +### Development Build: 1.2.0-rc1+dev3 + +- Use `sizeof()` instead of a hard coded value for the table file header size to keep this tool in sync if the size of the cFE file or table header should ever change. +- Update version baseline to v1.2.0-rc1 +- Set REVISION number to 99 to indicate development version +See + ### Development Build: 1.1.0+dev7 - Create a version header file diff --git a/cfe_ts_crc_version.h b/cfe_ts_crc_version.h index 46bbf06..acd2591 100644 --- a/cfe_ts_crc_version.h +++ b/cfe_ts_crc_version.h @@ -31,7 +31,7 @@ /* * Development Build Macro Definitions */ -#define CFE_TS_CRC_BUILD_NUMBER 8 /*!< @brief Number of commits since baseline */ +#define CFE_TS_CRC_BUILD_NUMBER 3 /*!< @brief Number of commits since baseline */ #define CFE_TS_CRC_BUILD_BASELINE \ "v1.2.0+dev" /*!< @brief Development Build: git tag that is the base for the current */