Skip to content

Commit

Permalink
FASTTRACK: Merge #1 #2 #10
Browse files Browse the repository at this point in the history
Fasttracked to test
  • Loading branch information
skliper committed Sep 16, 2019
2 parents 1ab1c56 + d995f5e commit 7177ffc
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
15 changes: 15 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# CMake recipe for building tblCRCTool
#

# This tool references the definitions of the CFE_TBL_FileHdr_t and CFE_FS_Header_t
# structures, which are defined in the CFE header files. This, in turn, requires
# the common_types.h file from OSAL and the global cfe_mission_cfg.h file.
include_directories(${MISSION_BINARY_DIR}/inc)
include_directories(${osal_MISSION_DIR}/src/os/inc)
include_directories(${cfe-core_MISSION_DIR}/src/inc)

add_executable(cfe_ts_crc cfe_ts_crc.c)

install(TARGETS cfe_ts_crc DESTINATION host)


23 changes: 0 additions & 23 deletions Makefile

This file was deleted.

14 changes: 11 additions & 3 deletions cfe_ts_crc.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
#include <stdio.h>
#include <fcntl.h>
#include <string.h>

#include <stdlib.h>
#include <unistd.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) */
Expand Down Expand Up @@ -177,7 +178,14 @@ int main( int argc, char **argv )
if (readSize != 100) done=1;
}
/* print the size/CRC results */
printf("\nTable File Name: %s\nTable Size: %d Bytes\nExpected TS Validation CRC: 0x%08X\n\n", argv[1], fileSize, fileCRC);
printf("\nTable File Name: %s\nTable Size: %d Bytes\nExpected TS Validation CRC: 0x%08X\n\n", argv[1], fileSize, fileCRC);

/* Close file and check*/
if( close(fd) != 0 )
{
printf("\nerror: Cannot close file!\n");
exit(0);
}

return(fileCRC);
return(fileCRC);
}

0 comments on commit 7177ffc

Please sign in to comment.