From 1d23a8f07a4acd83d85bed1d95a735e550fbd568 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Wed, 15 Feb 2023 13:35:48 -0500 Subject: [PATCH 1/2] Fix #66, remove compiler extensions from tbldefs Do not declare tables as "static" w/attribute "used", neither are needed, and build works fine without any special sauce. This also makes the table name consistent by removing the "Default" in the name - it is still the same table, the name does not need to change just because it happens to be the default value. --- fsw/tables/hs_amt.c | 7 +++---- fsw/tables/hs_emt.c | 7 +++---- fsw/tables/hs_mat.c | 7 +++---- fsw/tables/hs_xct.c | 5 ++--- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/fsw/tables/hs_amt.c b/fsw/tables/hs_amt.c index a774f7e..4b0d732 100644 --- a/fsw/tables/hs_amt.c +++ b/fsw/tables/hs_amt.c @@ -30,11 +30,10 @@ #include "hs_tbldefs.h" #include "cfe_tbl_filedef.h" -static CFE_TBL_FileDef_t CFE_TBL_FileDef - __attribute__((__used__)) = {"HS_Default_AppMon_Tbl", HS_APP_NAME ".AppMon_Tbl", "HS AppMon Table", "hs_amt.tbl", - (sizeof(HS_AMTEntry_t) * HS_MAX_MONITORED_APPS)}; +CFE_TBL_FileDef_t CFE_TBL_FileDef = {"HS_AppMon_Tbl", HS_APP_NAME ".AppMon_Tbl", "HS AppMon Table", "hs_amt.tbl", + (sizeof(HS_AMTEntry_t) * HS_MAX_MONITORED_APPS)}; -HS_AMTEntry_t HS_Default_AppMon_Tbl[HS_MAX_MONITORED_APPS] = { +HS_AMTEntry_t HS_AppMon_Tbl[HS_MAX_MONITORED_APPS] = { /* AppName NullTerm CycleCount ActionType */ /* 0 */ {"CFE_ES", 0, 10, HS_AMT_ACT_NOACT}, diff --git a/fsw/tables/hs_emt.c b/fsw/tables/hs_emt.c index 9275506..5f09d96 100644 --- a/fsw/tables/hs_emt.c +++ b/fsw/tables/hs_emt.c @@ -30,11 +30,10 @@ #include "hs_tbldefs.h" #include "cfe_tbl_filedef.h" -static CFE_TBL_FileDef_t CFE_TBL_FileDef - __attribute__((__used__)) = {"HS_Default_EventMon_Tbl", HS_APP_NAME ".EventMon_Tbl", "HS EventMon Table", - "hs_emt.tbl", (sizeof(HS_EMTEntry_t) * HS_MAX_MONITORED_EVENTS)}; +CFE_TBL_FileDef_t CFE_TBL_FileDef = {"HS_EventMon_Tbl", HS_APP_NAME ".EventMon_Tbl", "HS EventMon Table", "hs_emt.tbl", + (sizeof(HS_EMTEntry_t) * HS_MAX_MONITORED_EVENTS)}; -HS_EMTEntry_t HS_Default_EventMon_Tbl[HS_MAX_MONITORED_EVENTS] = { +HS_EMTEntry_t HS_EventMon_Tbl[HS_MAX_MONITORED_EVENTS] = { /* AppName NullTerm EventID ActionType */ /* 0 */ {"CFE_ES", 0, 10, HS_EMT_ACT_NOACT}, diff --git a/fsw/tables/hs_mat.c b/fsw/tables/hs_mat.c index 387351b..e418e01 100644 --- a/fsw/tables/hs_mat.c +++ b/fsw/tables/hs_mat.c @@ -30,11 +30,10 @@ #include "hs_tbldefs.h" #include "cfe_tbl_filedef.h" -static CFE_TBL_FileDef_t CFE_TBL_FileDef - __attribute__((__used__)) = {"HS_Default_MsgActs_Tbl", HS_APP_NAME ".MsgActs_Tbl", "HS MsgActs Table", "hs_mat.tbl", - (sizeof(HS_MATEntry_t) * HS_MAX_MSG_ACT_TYPES)}; +CFE_TBL_FileDef_t CFE_TBL_FileDef = {"HS_MsgActs_Tbl", HS_APP_NAME ".MsgActs_Tbl", "HS MsgActs Table", "hs_mat.tbl", + (sizeof(HS_MATEntry_t) * HS_MAX_MSG_ACT_TYPES)}; -HS_MATEntry_t HS_Default_MsgActs_Tbl[HS_MAX_MSG_ACT_TYPES] = { +HS_MATEntry_t HS_MsgActs_Tbl[HS_MAX_MSG_ACT_TYPES] = { /* EnableState Cooldown Message */ /* 0 */ {HS_MAT_STATE_DISABLED, diff --git a/fsw/tables/hs_xct.c b/fsw/tables/hs_xct.c index fbfa7d8..e9a8e54 100644 --- a/fsw/tables/hs_xct.c +++ b/fsw/tables/hs_xct.c @@ -30,9 +30,8 @@ #include "hs_tbldefs.h" #include "cfe_tbl_filedef.h" -static CFE_TBL_FileDef_t CFE_TBL_FileDef - __attribute__((__used__)) = {"HS_Default_ExeCount_Tbl", HS_APP_NAME ".ExeCount_Tbl", "HS ExeCount Table", - "hs_xct.tbl", (sizeof(HS_XCTEntry_t) * HS_MAX_EXEC_CNT_SLOTS)}; +CFE_TBL_FileDef_t CFE_TBL_FileDef = {"HS_Default_ExeCount_Tbl", HS_APP_NAME ".ExeCount_Tbl", "HS ExeCount Table", + "hs_xct.tbl", (sizeof(HS_XCTEntry_t) * HS_MAX_EXEC_CNT_SLOTS)}; HS_XCTEntry_t HS_Default_ExeCount_Tbl[HS_MAX_EXEC_CNT_SLOTS] = { /* ResourceName NullTerm ResourceType */ From cbea300601414923b24561c18d7f10b8ff4ad591 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Thu, 16 Feb 2023 15:25:14 -0500 Subject: [PATCH 2/2] Fix #66, update name of ExeCount Table --- fsw/tables/hs_xct.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fsw/tables/hs_xct.c b/fsw/tables/hs_xct.c index e9a8e54..158d791 100644 --- a/fsw/tables/hs_xct.c +++ b/fsw/tables/hs_xct.c @@ -30,10 +30,10 @@ #include "hs_tbldefs.h" #include "cfe_tbl_filedef.h" -CFE_TBL_FileDef_t CFE_TBL_FileDef = {"HS_Default_ExeCount_Tbl", HS_APP_NAME ".ExeCount_Tbl", "HS ExeCount Table", +CFE_TBL_FileDef_t CFE_TBL_FileDef = {"HS_ExeCount_Tbl", HS_APP_NAME ".ExeCount_Tbl", "HS ExeCount Table", "hs_xct.tbl", (sizeof(HS_XCTEntry_t) * HS_MAX_EXEC_CNT_SLOTS)}; -HS_XCTEntry_t HS_Default_ExeCount_Tbl[HS_MAX_EXEC_CNT_SLOTS] = { +HS_XCTEntry_t HS_ExeCount_Tbl[HS_MAX_EXEC_CNT_SLOTS] = { /* ResourceName NullTerm ResourceType */ /* 0 */ {"CFE_ES", 0, HS_XCT_TYPE_APP_MAIN},