Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tblCRCTool Integration Candidate: 2020-11-24 #25

Merged
merged 4 commits into from
Dec 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/nasa/tblCRCTool/pull/25>

### Development Build: 1.1.0+dev7

- Create a version header file
Expand Down
17 changes: 9 additions & 8 deletions cfe_ts_crc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
**
Expand Down Expand Up @@ -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)
Expand Down
7 changes: 4 additions & 3 deletions cfe_ts_crc_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,17 @@
/*
* 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.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 */

/*
Expand Down