Skip to content

Commit

Permalink
Merge pull request #279 from nasa/integration-candidate
Browse files Browse the repository at this point in the history
psp Integration candidate: 2021-03-30
  • Loading branch information
astrogeco authored Apr 1, 2021
2 parents 73366d4 + 14eaa43 commit 487f8b8
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 4 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/nasa/PSP/pull/279>

### 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).
Expand Down
2 changes: 1 addition & 1 deletion fsw/mcp750-vxworks/inc/psp_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

/*
Expand Down
2 changes: 1 addition & 1 deletion fsw/pc-linux/inc/psp_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

/*
Expand Down
2 changes: 1 addition & 1 deletion fsw/pc-rtems/inc/psp_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

/*
Expand Down
3 changes: 2 additions & 1 deletion fsw/shared/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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_PROPERTY:psp_module_api,INTERFACE_COMPILE_DEFINITIONS>
)

target_include_directories(psp-${CFE_PSP_TARGETNAME}-shared PRIVATE
target_include_directories(psp-${CFE_PSP_TARGETNAME}-shared PRIVATE
$<TARGET_PROPERTY:psp_module_api,INTERFACE_INCLUDE_DIRECTORIES>
)

45 changes: 45 additions & 0 deletions ut-stubs/ut_psp_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 487f8b8

Please sign in to comment.