Skip to content

Commit

Permalink
Merge pull request #318 from astrogeco/integration-candidate
Browse files Browse the repository at this point in the history
psp Integration candidate: Caelum+dev1
  • Loading branch information
astrogeco authored Dec 6, 2021
2 parents 1bd7bd9 + 5447a96 commit c3a3f6e
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 45 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ This is a collection of APIs abstracting platform specific functionality to be l
## Version History


### Development Build: v1.6.0-rc4+dev6

- Sleep before exit when printing
- Check the address in PSP get segment stubs
- Set Build Baseline for cFS-Caelum-rc4: v1.6.0-rc4
- See <https://github.com/nasa/PSP/pull/318> and <https://github.com/nasa/cFS/pull/390>

### Development Build: v1.5.0-rc1+dev124

- Relax strict of check before calling "Init" function of module, only check that module type is not invalid
Expand Down
23 changes: 14 additions & 9 deletions fsw/mcp750-vxworks/inc/psp_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,25 @@
/*
* Development Build Macro Definitions
*/
#define CFE_PSP_IMPL_BUILD_NUMBER 124
#define CFE_PSP_IMPL_BUILD_BASELINE "v1.5.0-rc1"
#define CFE_PSP_IMPL_BUILD_NUMBER 4
#define CFE_PSP_IMPL_BUILD_BASELINE "v1.6.0-rc1"

/*
* Version Macro Definitions
*/
#define CFE_PSP_IMPL_MAJOR_VERSION 1 /*!< @brief ONLY APPLY for OFFICIAL releases. Major version number. */
#define CFE_PSP_IMPL_MINOR_VERSION 4 /*!< @brief ONLY APPLY for OFFICIAL releases. Minor version number. */
#define CFE_PSP_IMPL_REVISION 0 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision number. */
#define CFE_PSP_IMPL_MISSION_REV \
99 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. A value of "99" indicates an unreleased \
development version. */

#define CFE_PSP_IMPL_CODENAME "Bootes"
/*!
* @brief Mission revision.
*
* Set to 0 on OFFICIAL releases, and set to 255 (0xFF) on development versions.
* Values 1-254 are reserved for mission use to denote patches/customizations as needed.
*/
#define CFE_PSP_IMPL_MISSION_REV 0xFF

#define CFE_PSP_IMPL_CODENAME "Draco"

/*
* Tools to construct version string
Expand All @@ -61,8 +66,8 @@
* @details Reports the current development build's baseline, number, and name. Also includes a note about the latest
* official version. @n See @ref cfsversions for format differences between development and release versions.
*/
#define CFE_PSP_IMPL_VERSION_STRING \
" PSP Development Build " CFE_PSP_IMPL_VERSION /* Codename for current development */ \
", Last Official Release: psp v1.4.0" /* For full support please use this version */
#define CFE_PSP_IMPL_VERSION_STRING \
" PSP DEVELOPMENT BUILD " CFE_PSP_IMPL_VERSION \
", Last Official Release: psp v1.4.0" /* For full support please use this version */

#endif /* _psp_version_ */
17 changes: 11 additions & 6 deletions fsw/pc-linux/inc/psp_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,25 @@
/*
* Development Build Macro Definitions
*/
#define CFE_PSP_IMPL_BUILD_NUMBER 124
#define CFE_PSP_IMPL_BUILD_BASELINE "v1.5.0-rc1"
#define CFE_PSP_IMPL_BUILD_NUMBER 4
#define CFE_PSP_IMPL_BUILD_BASELINE "v1.6.0-rc1"

/*
* Version Macro Definitions
*/
#define CFE_PSP_IMPL_MAJOR_VERSION 1 /*!< @brief ONLY APPLY for OFFICIAL releases. Major version number. */
#define CFE_PSP_IMPL_MINOR_VERSION 4 /*!< @brief ONLY APPLY for OFFICIAL releases. Minor version number. */
#define CFE_PSP_IMPL_REVISION 0 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision number. */
#define CFE_PSP_IMPL_MISSION_REV \
99 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. A value of "99" indicates an unreleased \
development version. */

#define CFE_PSP_IMPL_CODENAME "Bootes"
/*!
* @brief Mission revision.
*
* Set to 0 on OFFICIAL releases, and set to 255 (0xFF) on development versions.
* Values 1-254 are reserved for mission use to denote patches/customizations as needed.
*/
#define CFE_PSP_IMPL_MISSION_REV 0xFF

#define CFE_PSP_IMPL_CODENAME "Draco"

/*
* Tools to construct version string
Expand Down
36 changes: 18 additions & 18 deletions fsw/pc-linux/src/cfe_psp_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,17 @@ void CFE_PSP_InitCDS(void)
*/
if ((key = ftok(CFE_PSP_CDS_KEY_FILE, 'R')) == -1)
{
OS_printf("CFE_PSP: Cannot Create CDS Shared memory key!\n");
exit(-1);
perror("CFE_PSP - Cannot Create CDS Shared memory key");
CFE_PSP_Panic(CFE_PSP_ERROR);
}

/*
** connect to (and possibly create) the segment:
*/
if ((CDSShmId = shmget(key, CFE_PSP_CDS_SIZE, 0644 | IPC_CREAT)) == -1)
{
OS_printf("CFE_PSP: Cannot shmget CDS Shared memory Segment!\n");
exit(-1);
perror("CFE_PSP - Cannot shmget CDS Shared memory Segment");
CFE_PSP_Panic(CFE_PSP_ERROR);
}

/*
Expand All @@ -161,8 +161,8 @@ void CFE_PSP_InitCDS(void)
CFE_PSP_ReservedMemoryMap.CDSMemory.BlockPtr = shmat(CDSShmId, (void *)0, 0);
if (CFE_PSP_ReservedMemoryMap.CDSMemory.BlockPtr == (void *)(-1))
{
OS_printf("CFE_PSP: Cannot shmat to CDS Shared memory Segment!\n");
exit(-1);
perror("CFE_PSP - Cannot shmat to CDS Shared memory Segment");
CFE_PSP_Panic(CFE_PSP_ERROR);
}

CFE_PSP_ReservedMemoryMap.CDSMemory.BlockSize = CFE_PSP_CDS_SIZE;
Expand Down Expand Up @@ -346,8 +346,8 @@ void CFE_PSP_InitResetArea(void)
*/
if ((key = ftok(CFE_PSP_RESET_KEY_FILE, 'R')) == -1)
{
OS_printf("CFE_PSP: Cannot Create Reset Area Shared memory key!\n");
exit(-1);
perror("CFE_PSP - Cannot Create Reset Area Shared memory key");
CFE_PSP_Panic(CFE_PSP_ERROR);
}

/*
Expand All @@ -368,8 +368,8 @@ void CFE_PSP_InitResetArea(void)
*/
if ((ResetAreaShmId = shmget(key, total_size, 0644 | IPC_CREAT)) == -1)
{
OS_printf("CFE_PSP: Cannot shmget Reset Area Shared memory Segment!\n");
exit(-1);
perror("CFE_PSP - Cannot shmget Reset Area Shared memory Segment");
CFE_PSP_Panic(CFE_PSP_ERROR);
}

/*
Expand All @@ -378,8 +378,8 @@ void CFE_PSP_InitResetArea(void)
block_addr = (cpuaddr)shmat(ResetAreaShmId, (void *)0, 0);
if (block_addr == (cpuaddr)(-1))
{
OS_printf("CFE_PSP: Cannot shmat to Reset Area Shared memory Segment!\n");
exit(-1);
perror("CFE_PSP - Cannot shmat to Reset Area Shared memory Segment");
CFE_PSP_Panic(CFE_PSP_ERROR);
}

FixedBlocksPtr = (CFE_PSP_LinuxReservedAreaFixedLayout_t *)block_addr;
Expand Down Expand Up @@ -484,17 +484,17 @@ void CFE_PSP_InitUserReservedArea(void)
*/
if ((key = ftok(CFE_PSP_RESERVED_KEY_FILE, 'R')) == -1)
{
OS_printf("CFE_PSP: Cannot Create User Reserved Area Shared memory key!\n");
exit(-1);
perror("CFE_PSP - Cannot Create User Reserved Area Shared memory key");
CFE_PSP_Panic(CFE_PSP_ERROR);
}

/*
** connect to (and possibly create) the segment:
*/
if ((UserShmId = shmget(key, CFE_PSP_USER_RESERVED_SIZE, 0644 | IPC_CREAT)) == -1)
{
OS_printf("CFE_PSP: Cannot shmget User Reserved Area Shared memory Segment!\n");
exit(-1);
perror("CFE_PSP - Cannot shmget User Reserved Area Shared memory Segment");
CFE_PSP_Panic(CFE_PSP_ERROR);
}

/*
Expand All @@ -503,8 +503,8 @@ void CFE_PSP_InitUserReservedArea(void)
CFE_PSP_ReservedMemoryMap.UserReservedMemory.BlockPtr = shmat(UserShmId, (void *)0, 0);
if (CFE_PSP_ReservedMemoryMap.UserReservedMemory.BlockPtr == (void *)(-1))
{
OS_printf("CFE_PSP: Cannot shmat to User Reserved Area Shared memory Segment!\n");
exit(-1);
perror("CFE_PSP - Cannot shmat to User Reserved Area Shared memory Segment");
CFE_PSP_Panic(CFE_PSP_ERROR);
}

CFE_PSP_ReservedMemoryMap.UserReservedMemory.BlockSize = CFE_PSP_USER_RESERVED_SIZE;
Expand Down
25 changes: 15 additions & 10 deletions fsw/pc-rtems/inc/psp_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,25 @@
/*
* Development Build Macro Definitions
*/
#define CFE_PSP_IMPL_BUILD_NUMBER 124
#define CFE_PSP_IMPL_BUILD_BASELINE "v1.5.0-rc1"
#define CFE_PSP_IMPL_BUILD_NUMBER 4
#define CFE_PSP_IMPL_BUILD_BASELINE "v1.6.0-rc1"

/*
* Version Macro Definitions
*/
#define CFE_PSP_IMPL_MAJOR_VERSION 1 /*!< @brief ONLY APPLY for OFFICIAL releases. Major version number. */
#define CFE_PSP_IMPL_MINOR_VERSION 4 /*!< @brief ONLY APPLY for OFFICIAL releases. Minor version number. */
#define CFE_PSP_IMPL_REVISION 0 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision number. */
#define CFE_PSP_IMPL_MISSION_REV \
99 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. A value of "99" indicates an unreleased \
development version. */

#define CFE_PSP_IMPL_CODENAME "Bootes"
/*!
* @brief Mission revision.
*
* Set to 0 on OFFICIAL releases, and set to 255 (0xFF) on development versions.
* Values 1-254 are reserved for mission use to denote patches/customizations as needed.
*/
#define CFE_PSP_IMPL_MISSION_REV 0xFF

#define CFE_PSP_IMPL_CODENAME "Draco"

/*
* Tools to construct version string
Expand All @@ -61,8 +66,8 @@
* @details Reports the current development build's baseline, number, and name. Also includes a note about the latest
* official version. @n See @ref cfsversions for format differences between development and release versions.
*/
#define CFE_PSP_IMPL_VERSION_STRING \
" PSP DEVELOPMENT BUILD " CFE_PSP_IMPL_VERSION /* Codename for current development */ \
", Last Official Release: psp v1.4.0" /* For full support please use this version */
#define CFE_PSP_IMPL_VERSION_STRING \
" PSP DEVELOPMENT BUILD " CFE_PSP_IMPL_VERSION \
", Last Official Release: psp v1.4.0" /* For full support please use this version */

#endif /* _psp_version_ */
#endif /* _psp_version_ */
4 changes: 2 additions & 2 deletions ut-stubs/ut_psp_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ int32 CFE_PSP_GetCFETextSegmentInfo(cpuaddr *PtrToCFESegment, uint32 *SizeOfCFES
if (status >= 0)
{
UT_GetDataBuffer(UT_KEY(CFE_PSP_GetCFETextSegmentInfo), &TempAddr, &TempSize, NULL);
if (*PtrToCFESegment == 0)
if (TempAddr == NULL)
{
/* Backup -- Set the pointer and size to anything */
*PtrToCFESegment = (cpuaddr)&LocalTextSegment;
Expand Down Expand Up @@ -602,7 +602,7 @@ int32 CFE_PSP_GetKernelTextSegmentInfo(cpuaddr *PtrToKernelSegment, uint32 *Size
if (status >= 0)
{
UT_GetDataBuffer(UT_KEY(CFE_PSP_GetKernelTextSegmentInfo), &TempAddr, &TempSize, NULL);
if (*PtrToKernelSegment == 0)
if (TempAddr == NULL)
{
/* Backup -- Set the pointer and size to anything */
*PtrToKernelSegment = (cpuaddr)&LocalTextSegment;
Expand Down

0 comments on commit c3a3f6e

Please sign in to comment.