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

Fix #2036, Revert breaking change to CFE_ES_AppInfo_t structure #2037

Merged
merged 1 commit into from
Feb 3, 2022
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
6 changes: 6 additions & 0 deletions docs/src/mnem_maps/cfe_es_tlm_mnem_map
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ ES_APPFILENAME=$sc_$cpu_ES_AppFilename[OS_MAX_PATH_LEN] \
ES_STACKSIZE=$sc_$cpu_ES_StackSize \
ES_MODULEID=$sc_$cpu_ES_ModuleID \
ES_ADDRVALID=$sc_$cpu_ES_AddrsValid \
ES_CODEADDR=$sc_$cpu_ES_CodeAddress \
ES_CODESIZE=$sc_$cpu_ES_CodeSize \
ES_DATAADDR=$sc_$cpu_ES_DataAddress \
ES_DATASIZE=$sc_$cpu_ES_DataSize \
ES_BSSADDR=$sc_$cpu_ES_BSSAddress \
ES_BSSSIZE=$sc_$cpu_ES_BSSSize \
ES_STARTADDR=$sc_$cpu_ES_StartAddr \
ES_EXCEPTNACTN=$sc_$cpu_ES_ExceptnActn \
ES_PRIORITY=$sc_$cpu_ES_Priority \
Expand Down
37 changes: 18 additions & 19 deletions modules/cfe_testcase/src/es_info_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,19 @@ void TestAppInfo(void)

if (TestAppInfo.AddressesAreValid)
{
UtAssert_True(TestAppInfo.AddressesAreValid > 0, "Test App Info -> Addrs.Valid? = %d",
UtAssert_True(TestAppInfo.AddressesAreValid > 0, "Test App Info -> AddrsValid? = %d",
(int)TestAppInfo.AddressesAreValid);
UtAssert_True(TestAppInfo.Code.Address > 0, "Test App Info -> Code.Address = %ld",
(unsigned long)TestAppInfo.Code.Address);
UtAssert_True(TestAppInfo.Code.Size > 0, "Test App Info -> Code.Size = %ld",
(unsigned long)TestAppInfo.Code.Size);
UtAssert_True(TestAppInfo.Data.Address > 0, "Test App Info -> Data.Address = %ld",
(unsigned long)TestAppInfo.Data.Address);
UtAssert_True(TestAppInfo.Data.Size > 0, "Test App Info -> Data.Size = %ld",
(unsigned long)TestAppInfo.Data.Size);
UtAssert_True(TestAppInfo.BSS.Address > 0, "Test App Info -> BSS.Address = %ld",
(unsigned long)TestAppInfo.BSS.Address);
UtAssert_True(TestAppInfo.BSS.Size > 0, "Test App Info -> BSS.Size = %ld",
(unsigned long)TestAppInfo.BSS.Size);
UtAssert_True(TestAppInfo.CodeAddress > 0, "Test App Info -> CodeAddress = %ld",
(unsigned long)TestAppInfo.CodeAddress);
UtAssert_True(TestAppInfo.CodeSize > 0, "Test App Info -> CodeSize = %ld",
(unsigned long)TestAppInfo.CodeSize);
UtAssert_True(TestAppInfo.DataAddress > 0, "Test App Info -> DataAddress = %ld",
(unsigned long)TestAppInfo.DataAddress);
UtAssert_True(TestAppInfo.DataSize > 0, "Test App Info -> DataSize = %ld",
(unsigned long)TestAppInfo.DataSize);
UtAssert_True(TestAppInfo.BSSAddress > 0, "Test App Info -> BSSAddress = %ld",
(unsigned long)TestAppInfo.BSSAddress);
UtAssert_True(TestAppInfo.BSSSize > 0, "Test App Info -> BSSSize = %ld", (unsigned long)TestAppInfo.BSSSize);
}
else
{
Expand Down Expand Up @@ -191,12 +190,12 @@ void TestLibInfo(void)
{
UtAssert_True(LibInfo.AddressesAreValid > 0, "Lib Info -> AddrsValid? = %ld",
(unsigned long)LibInfo.AddressesAreValid);
UtAssert_True(LibInfo.Code.Address > 0, "Lib Info -> CodeAddress = %ld", (unsigned long)LibInfo.Code.Address);
UtAssert_True(LibInfo.Code.Size > 0, "Lib Info -> Code.Size = %ld", (unsigned long)LibInfo.Code.Size);
UtAssert_True(LibInfo.Data.Address > 0, "Lib Info -> Data.Address = %ld", (unsigned long)LibInfo.Data.Address);
UtAssert_True(LibInfo.Data.Size > 0, "Lib Info -> Data.Size = %ld", (unsigned long)LibInfo.Data.Size);
UtAssert_True(LibInfo.BSS.Address > 0, "Lib Info -> BSS.Address = %ld", (unsigned long)LibInfo.BSS.Address);
UtAssert_True(LibInfo.BSS.Size > 0, "Lib Info -> BSS.Size = %ld", (unsigned long)LibInfo.BSS.Size);
UtAssert_True(LibInfo.CodeAddress > 0, "Lib Info -> CodeAddress = %ld", (unsigned long)LibInfo.CodeAddress);
UtAssert_True(LibInfo.CodeSize > 0, "Lib Info -> CodeSize = %ld", (unsigned long)LibInfo.CodeSize);
UtAssert_True(LibInfo.DataAddress > 0, "Lib Info -> DataAddress = %ld", (unsigned long)LibInfo.DataAddress);
UtAssert_True(LibInfo.DataSize > 0, "Lib Info -> DataSize = %ld", (unsigned long)LibInfo.DataSize);
UtAssert_True(LibInfo.BSSAddress > 0, "Lib Info -> BSSAddress = %ld", (unsigned long)LibInfo.BSSAddress);
UtAssert_True(LibInfo.BSSSize > 0, "Lib Info -> BSSSize = %ld", (unsigned long)LibInfo.BSSSize);
}
else
{
Expand Down
26 changes: 12 additions & 14 deletions modules/core_api/fsw/inc/cfe_es_extern_typedefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -427,17 +427,6 @@ typedef uint32 CFE_ES_MemAddress_t;
*/
#define CFE_ES_MEMADDRESS_C(x) ((CFE_ES_MemAddress_t)((cpuaddr)(x)&0xFFFFFFFF))

/**
* Memory Address and Memory Offset combination
*
* A combination of #CFE_ES_MemAddress_t and #CFE_ES_MemOffset_t, since they are often used together.
*/
typedef struct CFE_ES_MemAddOff
{
CFE_ES_MemAddress_t Address; /**< \brief Code section address */
CFE_ES_MemOffset_t Size; /**< \brief Code section size */
} CFE_ES_MemAddOff_t;

/*
* Data Structures shared between API and Message (CMD/TLM) interfaces
*/
Expand Down Expand Up @@ -470,9 +459,18 @@ typedef struct CFE_ES_AppInfo
\brief The Stack Size of the Application */
uint32 AddressesAreValid; /**< \cfetlmmnemonic \ES_ADDRVALID
\brief Indicates that the Code, Data, and BSS addresses/sizes are valid */
CFE_ES_MemAddOff_t Code; /**< \brief code section address/size structure */
CFE_ES_MemAddOff_t Data; /**< \brief Data section address/size structure */
CFE_ES_MemAddOff_t BSS; /**< \brief BSS section address/size structure */
CFE_ES_MemAddress_t CodeAddress; /**< \cfetlmmnemonic \ES_CODEADDR
\brief The Address of the Application Code Segment*/
CFE_ES_MemOffset_t CodeSize; /**< \cfetlmmnemonic \ES_CODESIZE
\brief The Code Size of the Application */
CFE_ES_MemAddress_t DataAddress; /**< \cfetlmmnemonic \ES_DATAADDR
\brief The Address of the Application Data Segment*/
CFE_ES_MemOffset_t DataSize; /**< \cfetlmmnemonic \ES_DATASIZE
\brief The Data Size of the Application */
CFE_ES_MemAddress_t BSSAddress; /**< \cfetlmmnemonic \ES_BSSADDR
\brief The Address of the Application BSS Segment*/
CFE_ES_MemOffset_t BSSSize; /**< \cfetlmmnemonic \ES_BSSSIZE
\brief The BSS Size of the Application */
CFE_ES_MemAddress_t StartAddress; /**< \cfetlmmnemonic \ES_STARTADDR
\brief The Start Address of the Application */
CFE_ES_ExceptionAction_Enum_t ExceptionAction; /**< \cfetlmmnemonic \ES_EXCEPTNACTN
Expand Down
30 changes: 30 additions & 0 deletions modules/es/eds/cfe_es.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,36 @@
\cfetlmmnemonic \ES_ADDRVALID
</LongDescription>
</Entry>
<Entry name="CodeAddress" type="BASE_TYPES/CpuAddress" shortDescription="The Address of the Application Code Segment">
<LongDescription>
\cfetlmmnemonic \ES_CODEADDR
</LongDescription>
</Entry>
<Entry name="CodeSize" type="BASE_TYPES/CpuAddress" shortDescription="The Code Size of the Application">
<LongDescription>
\cfetlmmnemonic \ES_CODESIZE
</LongDescription>
</Entry>
<Entry name="DataAddress" type="BASE_TYPES/CpuAddress" shortDescription="The Address of the Application Data Segment">
<LongDescription>
\cfetlmmnemonic \ES_DATAADDR
</LongDescription>
</Entry>
<Entry name="DataSize" type="BASE_TYPES/CpuAddress" shortDescription="The Data Size of the Application">
<LongDescription>
\cfetlmmnemonic \ES_DATASIZE
</LongDescription>
</Entry>
<Entry name="BSSAddress" type="BASE_TYPES/CpuAddress" shortDescription="The Address of the Application BSS Segment">
<LongDescription>
\cfetlmmnemonic \ES_BSSADDR
</LongDescription>
</Entry>
<Entry name="BSSSize" type="BASE_TYPES/CpuAddress" shortDescription="The BSS Size of the Application">
<LongDescription>
\cfetlmmnemonic \ES_BSSSIZE
</LongDescription>
</Entry>
<Entry name="StartAddress" type="BASE_TYPES/CpuAddress" shortDescription="The Start Address of the Application">
<LongDescription>
\cfetlmmnemonic \ES_STARTADDR
Expand Down
14 changes: 7 additions & 7 deletions modules/es/fsw/src/cfe_es_apps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1791,7 +1791,7 @@ void CFE_ES_CopyModuleAddressInfo(osal_id_t ModuleId, CFE_ES_AppInfo_t *AppInfoP
if (OsStatus == OS_SUCCESS)
{
AppInfoPtr->AddressesAreValid =
(sizeof(ModuleInfo.addr.code_address) <= sizeof(AppInfoPtr->Code.Address)) && ModuleInfo.addr.valid;
(sizeof(ModuleInfo.addr.code_address) <= sizeof(AppInfoPtr->CodeAddress)) && ModuleInfo.addr.valid;
}
else
{
Expand All @@ -1803,10 +1803,10 @@ void CFE_ES_CopyModuleAddressInfo(osal_id_t ModuleId, CFE_ES_AppInfo_t *AppInfoP
* Convert the internal size and address to the telemetry format.
* (The telemetry format may be a different bitwidth than the native processor)
*/
AppInfoPtr->Code.Address = CFE_ES_MEMADDRESS_C(ModuleInfo.addr.code_address);
AppInfoPtr->Code.Size = CFE_ES_MEMOFFSET_C(ModuleInfo.addr.code_size);
AppInfoPtr->Data.Address = CFE_ES_MEMADDRESS_C(ModuleInfo.addr.data_address);
AppInfoPtr->Data.Size = CFE_ES_MEMOFFSET_C(ModuleInfo.addr.data_size);
AppInfoPtr->BSS.Address = CFE_ES_MEMADDRESS_C(ModuleInfo.addr.bss_address);
AppInfoPtr->BSS.Size = CFE_ES_MEMOFFSET_C(ModuleInfo.addr.bss_size);
AppInfoPtr->CodeAddress = CFE_ES_MEMADDRESS_C(ModuleInfo.addr.code_address);
AppInfoPtr->CodeSize = CFE_ES_MEMOFFSET_C(ModuleInfo.addr.code_size);
AppInfoPtr->DataAddress = CFE_ES_MEMADDRESS_C(ModuleInfo.addr.data_address);
AppInfoPtr->DataSize = CFE_ES_MEMOFFSET_C(ModuleInfo.addr.data_size);
AppInfoPtr->BSSAddress = CFE_ES_MEMADDRESS_C(ModuleInfo.addr.bss_address);
AppInfoPtr->BSSSize = CFE_ES_MEMOFFSET_C(ModuleInfo.addr.bss_size);
}