From ea1c48d9bb33c6dc28d6d9334c7da3c672ae30bd Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Tue, 23 Mar 2021 12:20:51 -0400 Subject: [PATCH 1/3] Fix #277, add version file cfe_psp_version.c should have been included in the source list, but was mistakenly omitted in previous PR. --- fsw/shared/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fsw/shared/CMakeLists.txt b/fsw/shared/CMakeLists.txt index b977467c..ac6a08f8 100644 --- a/fsw/shared/CMakeLists.txt +++ b/fsw/shared/CMakeLists.txt @@ -20,13 +20,14 @@ add_library(psp-${CFE_PSP_TARGETNAME}-shared OBJECT src/cfe_psp_module.c src/cfe_psp_port.c src/cfe_psp_ram.c + src/cfe_psp_version.c ) target_compile_definitions(psp-${CFE_SYSTEM_PSPNAME}-shared PRIVATE $ ) -target_include_directories(psp-${CFE_PSP_TARGETNAME}-shared PRIVATE +target_include_directories(psp-${CFE_PSP_TARGETNAME}-shared PRIVATE $ ) From 5535df4ab49f14720c6dfd52aba5d35e4c6de689 Mon Sep 17 00:00:00 2001 From: ejtimmon <45639682+ejtimmon@users.noreply.github.com> Date: Wed, 31 Mar 2021 13:43:25 -0400 Subject: [PATCH 2/3] Fix #275, Add stub for CFE_PSP_GetKernelTextSegmentInfo (#276) --- ut-stubs/ut_psp_stubs.c | 45 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/ut-stubs/ut_psp_stubs.c b/ut-stubs/ut_psp_stubs.c index b4369008..54056957 100644 --- a/ut-stubs/ut_psp_stubs.c +++ b/ut-stubs/ut_psp_stubs.c @@ -575,6 +575,51 @@ int32 CFE_PSP_GetCFETextSegmentInfo(cpuaddr *PtrToCFESegment, uint32 *SizeOfCFES return status; } +/*****************************************************************************/ +/** +** \brief CFE_PSP_GetKernelTextSegmentInfo stub function +** +** \par Description +** This function is used to mimic the response of the PSP function +** CFE_PSP_GetKernelTextSegmentInfo. The user can adjust the response by +** setting the values in the BSPGetCFETextRtn structure prior to this +** function being called. +** +** \par Assumptions, External Events, and Notes: +** None +** +** \returns +** Returns either a user-defined status flag or OS_SUCCESS. +** +******************************************************************************/ +int32 CFE_PSP_GetKernelTextSegmentInfo(cpuaddr *PtrToKernelSegment, uint32 *SizeOfKernelSegment) +{ + static uint32 LocalTextSegment; + int32 status; + void * TempAddr; + size_t TempSize; + + status = UT_DEFAULT_IMPL(CFE_PSP_GetKernelTextSegmentInfo); + + if (status >= 0) + { + UT_GetDataBuffer(UT_KEY(CFE_PSP_GetKernelTextSegmentInfo), &TempAddr, &TempSize, NULL); + if (*PtrToKernelSegment == 0) + { + /* Backup -- Set the pointer and size to anything */ + *PtrToKernelSegment = (cpuaddr)&LocalTextSegment; + *SizeOfKernelSegment = sizeof(LocalTextSegment); + } + else + { + *PtrToKernelSegment = (cpuaddr)TempAddr; + *SizeOfKernelSegment = TempSize; + } + } + + return status; +} + /*****************************************************************************/ /** ** \brief CFE_PSP_MemRead8 stub function From 14eaa4330e287618cbf3b4ca576698ae2c744398 Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" <59618057+astrogeco@users.noreply.github.com> Date: Thu, 1 Apr 2021 01:16:46 -0400 Subject: [PATCH 3/3] IC:2021-03-30, Bump to v1.5.0-rc1+dev95 --- README.md | 6 ++++++ fsw/mcp750-vxworks/inc/psp_version.h | 2 +- fsw/pc-linux/inc/psp_version.h | 2 +- fsw/pc-rtems/inc/psp_version.h | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8c615465..96181f47 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,12 @@ This is a collection of APIs abstracting platform specific functionality to be l ## Version History +### Development Build: v1.5.0-rc1+dev95 + +- Includes `cfe_psp_version.c` in the cmake source list, which was mistakenly omitted previously. +- Applied the patch and confirmed that CS Cmake unit tests build. Unit tests relying on `CFE_PSP_GetKernelTextSegmentInfo` will build. +- See + ### Development Build: v1.5.0-rc1+dev90 - Addresses the issue of incompatible/non-portable code blobs in the "shared" directory. It uses the same modular init pattern as is used elsewhere in cFE: CMake generates a list of "base" modules correlating with the selected PSP (i.e. pc-linux, mcp750-vxworks, etc) and these modules are then initialized (in order) before the rest of PSP runs. The "direct write" EEPROM is not used unconditionally. Instead the proper eeprom implementation module is selected based on which PSP is selected. MCP750 uses direct write, pc-linux uses an mmap file, and pc-rtems uses a stub (not implemented). diff --git a/fsw/mcp750-vxworks/inc/psp_version.h b/fsw/mcp750-vxworks/inc/psp_version.h index 1787761c..ae44af97 100644 --- a/fsw/mcp750-vxworks/inc/psp_version.h +++ b/fsw/mcp750-vxworks/inc/psp_version.h @@ -29,7 +29,7 @@ /* * Development Build Macro Definitions */ -#define CFE_PSP_IMPL_BUILD_NUMBER 90 +#define CFE_PSP_IMPL_BUILD_NUMBER 95 #define CFE_PSP_IMPL_BUILD_BASELINE "v1.5.0-rc1" /* diff --git a/fsw/pc-linux/inc/psp_version.h b/fsw/pc-linux/inc/psp_version.h index c6838ee1..d6ea0adf 100644 --- a/fsw/pc-linux/inc/psp_version.h +++ b/fsw/pc-linux/inc/psp_version.h @@ -29,7 +29,7 @@ /* * Development Build Macro Definitions */ -#define CFE_PSP_IMPL_BUILD_NUMBER 90 +#define CFE_PSP_IMPL_BUILD_NUMBER 95 #define CFE_PSP_IMPL_BUILD_BASELINE "v1.5.0-rc1" /* diff --git a/fsw/pc-rtems/inc/psp_version.h b/fsw/pc-rtems/inc/psp_version.h index 45623afd..cab96db1 100644 --- a/fsw/pc-rtems/inc/psp_version.h +++ b/fsw/pc-rtems/inc/psp_version.h @@ -29,7 +29,7 @@ /* * Development Build Macro Definitions */ -#define CFE_PSP_IMPL_BUILD_NUMBER 90 +#define CFE_PSP_IMPL_BUILD_NUMBER 95 #define CFE_PSP_IMPL_BUILD_BASELINE "v1.5.0-rc1" /*