Skip to content

Commit

Permalink
Fix nasa#375, rename pc-rtems to generic-rtems
Browse files Browse the repository at this point in the history
  • Loading branch information
pepepr08 committed Feb 29, 2024
1 parent fd39b8a commit a698ef9
Show file tree
Hide file tree
Showing 24 changed files with 42 additions and 42 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/icbundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
sed -ir "s|#define CFE_PSP_IMPL_BUILD_NUMBER.*|$buildnumber_entry|" fsw/pc-linux/inc/psp_version.h
buildnumber_entry=$'#define CFE_PSP_IMPL_BUILD_NUMBER '${rev_num}
sed -ir "s|#define CFE_PSP_IMPL_BUILD_NUMBER.*|$buildnumber_entry|" fsw/pc-rtems/inc/psp_version.h
sed -ir "s|#define CFE_PSP_IMPL_BUILD_NUMBER.*|$buildnumber_entry|" fsw/generic-rtems/inc/psp_version.h
- name: Commit and Push Updates to IC Branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -76,6 +76,6 @@ jobs:
git add CHANGELOG.md
git add fsw/mcp750-vxworks/inc/psp_version.h
git add fsw/pc-linux/inc/psp_version.h
git add fsw/pc-rtems/inc/psp_version.h
git add fsw/generic-rtems/inc/psp_version.h
git commit -m "Updating documentation and version numbers for v1.6.0-rc4+dev${rev_num}"
git push -v origin integration-candidate
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
######################################################################
#
# CMAKE build recipe for pc-rtems PSP component
# CMAKE build recipe for generic-rtems PSP component
#
######################################################################

# This contains the fully platform-specific code to
# run CFE on this target.

# Build the pc-rtems implementation as a library
# Build the generic-rtems implementation as a library
add_library(psp-${CFE_PSP_TARGETNAME}-impl OBJECT
src/cfe_psp_exception.c
src/cfe_psp_memory.c
Expand Down
14 changes: 7 additions & 7 deletions fsw/pc-rtems/README.txt → fsw/generic-rtems/README.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ABOUT THE PC-RTEMS CFE PSP
ABOUT THE GENERIC-RTEMS CFE PSP
==========================
Note: These instructions are for RTEMS 4.11

The "pc-rtems" PSP layer is intended to be an easy way to prove out the basic functionality
The "generic-rtems" PSP layer is intended to be an easy way to prove out the basic functionality
of CFE running on RTEMS without actually requiring a real hardware target with RTEMS support.

It is based on:
Expand Down Expand Up @@ -80,13 +80,13 @@ like this if not already present (prior to the "project()" function):
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../psp/cmake/Modules" ${CMAKE_MODULE_PATH})


II. Mission setup modifications to use PC-RTEMS PSP
II. Mission setup modifications to use GENERIC-RTEMS PSP

Use a CMake toolchain file to build CFE for RTEMS. This goes under the mission's "_defs" top-level directory.
This example below may be edited and tuned to the mission-specific needs.

Specifically this file should be called "toolchain-<ARCHNAME>.cmake" where <ARCHNAME> can be anything such as
"cpu3" or "i686-pc-rtems".
"cpu3" or "i686-generic-rtems".

Then in the "targets.cmake" file set the "TGT<N>_PLATFORM" variable to be the same ARCHNAME and the toolchain
file will be picked up and used by the build system.
Expand All @@ -102,7 +102,7 @@ file will be picked up and used by the build system.
# Note that to use this, the "RTEMS" platform module may need to be added
# to the system-wide CMake installation as a default CMake does not yet
# recognize RTEMS as a system name. An example of this is distributed with
# the pc-rtems PSP.
# the generic-rtems PSP.

# Basic cross system configuration
set(CMAKE_SYSTEM_NAME RTEMS)
Expand Down Expand Up @@ -151,8 +151,8 @@ SET(CMAKE_PREFIX_PATH /)

# these settings are specific to cFE/OSAL and determines which
# abstraction layers are built when using this toolchain
SET(CFE_SYSTEM_PSPNAME pc-rtems)
SET(OSAL_SYSTEM_BSPTYPE pc-rtems)
SET(CFE_SYSTEM_PSPNAME generic-rtems)
SET(OSAL_SYSTEM_BSPTYPE generic-rtems)
SET(OSAL_SYSTEM_OSTYPE rtems)

# Info regarding the RELOCADDR:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ABOUT THE PC-RTEMS CFE PSP for RTEMS 5
ABOUT THE GENERIC-RTEMS CFE PSP for RTEMS 5
========================================

Note: These instructions are for RTEMS 5

The "pc-rtems" PSP layer is intended to be an easy way to prove out the basic functionality
The "generic-rtems" PSP layer is intended to be an easy way to prove out the basic functionality
of CFE running on RTEMS without actually requiring a real hardware target with RTEMS support.

It is based on:
Expand Down Expand Up @@ -78,13 +78,13 @@ like this if not already present (prior to the "project()" function):
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../psp/cmake/Modules" ${CMAKE_MODULE_PATH})


II. Mission setup modifications to use PC-RTEMS PSP
II. Mission setup modifications to use GENERIC-RTEMS PSP

Use a CMake toolchain file to build CFE for RTEMS. This goes under the mission's "_defs" top-level directory.
This example below may be edited and tuned to the mission-specific needs.

Specifically this file should be called "toolchain-<ARCHNAME>.cmake" where <ARCHNAME> can be anything such as
"cpu3" or "i686-pc-rtems".
"cpu3" or "i686-generic-rtems".

Then in the "targets.cmake" file set the "TGT<N>_PLATFORM" variable to be the same ARCHNAME and the toolchain
file will be picked up and used by the build system.
Expand All @@ -99,7 +99,7 @@ file will be picked up and used by the build system.
# Note that to use this, the "RTEMS" platform module may need to be added
# to the system-wide CMake installation as a default CMake does not yet
# recognize RTEMS as a system name. An example of this is distributed with
# the pc-rtems PSP.
# the generic-rtems PSP.

# Basic cross system configuration
set(CMAKE_SYSTEM_NAME RTEMS)
Expand Down Expand Up @@ -153,8 +153,8 @@ SET(CMAKE_PREFIX_PATH /)

# these settings are specific to cFE/OSAL and determines which
# abstraction layers are built when using this toolchain
SET(CFE_SYSTEM_PSPNAME pc-rtems)
SET(OSAL_SYSTEM_BSPTYPE pc-rtems)
SET(CFE_SYSTEM_PSPNAME generic-rtems)
SET(OSAL_SYSTEM_BSPTYPE generic-rtems)
SET(OSAL_SYSTEM_OSTYPE rtems)

# This is for RTEMS 5 specific ifdefs needed by the OSAL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
*/
typedef struct
{
/* not currently used in PC-RTEMS */
/* not currently used in GENERIC-RTEMS */
uint32 reserved;
} CFE_PSP_ReservedMemoryBootRecord_t;

Expand All @@ -68,7 +68,7 @@ typedef rtems_id CFE_PSP_Exception_SysTaskId_t;
*
* This may be stored in a persistent exception log file for later analysis.
*
* On PC-RTEMS, this is reserved for future use. Exception handling is not
* On GENERIC-RTEMS, this is reserved for future use. Exception handling is not
* currently implemented.
*/
typedef struct
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
##########################################################################
#
# Build options for "pc-rtems" PSP
# Build options for "generic-rtems" PSP
# This file specifies any global-scope compiler options when using this PSP
#
##########################################################################
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ typedef struct
*/
CFE_PSP_ReservedMemoryMap_t CFE_PSP_ReservedMemoryMap = {0};

CFE_PSP_MemoryBlock_t PcRtems_ReservedMemBlock;
CFE_PSP_MemoryBlock_t GenericRtems_ReservedMemBlock;

/*
*********************************************************************************
Expand Down Expand Up @@ -330,16 +330,16 @@ void CFE_PSP_SetupReservedMemoryMap(void)

OS_printf("Size of BSP reserved memory = %u bytes\n", (unsigned int)RequiredSize);

PcRtems_ReservedMemBlock.BlockPtr = malloc(RequiredSize);
GenericRtems_ReservedMemBlock.BlockPtr = malloc(RequiredSize);

if (PcRtems_ReservedMemBlock.BlockPtr == NULL)
if (GenericRtems_ReservedMemBlock.BlockPtr == NULL)
{
OS_printf("CFE_PSP: Error: Cannot malloc BSP reserved memory!\n");
abort();
}

PcRtems_ReservedMemBlock.BlockSize = RequiredSize;
ReservedMemoryAddr = (cpuaddr)PcRtems_ReservedMemBlock.BlockPtr;
GenericRtems_ReservedMemBlock.BlockSize = RequiredSize;
ReservedMemoryAddr = (cpuaddr)GenericRtems_ReservedMemBlock.BlockPtr;

OS_printf("CFE_PSP: Allocated %u bytes for PSP reserved memory at: 0x%08lX\n", (unsigned int)RequiredSize,
(unsigned long)ReservedMemoryAddr);
Expand Down Expand Up @@ -396,7 +396,7 @@ void CFE_PSP_SetupReservedMemoryMap(void)
int32 CFE_PSP_InitProcessorReservedMemory(uint32 RestartType)
{
OS_printf("CFE_PSP: Clearing Processor Reserved Memory.\n");
memset(PcRtems_ReservedMemBlock.BlockPtr, 0, PcRtems_ReservedMemBlock.BlockSize);
memset(GenericRtems_ReservedMemBlock.BlockPtr, 0, GenericRtems_ReservedMemBlock.BlockSize);
return CFE_PSP_SUCCESS;
}

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
* Track the overall "reserved memory block" at the start of RAM.
* This single large block is then subdivided into separate areas for CFE use.
*/
extern CFE_PSP_MemoryBlock_t PcRtems_ReservedMemBlock;
extern CFE_PSP_MemoryBlock_t GenericRtems_ReservedMemBlock;

/*----------------------------------------------------------------
*
Expand All @@ -73,7 +73,7 @@ extern CFE_PSP_MemoryBlock_t PcRtems_ReservedMemBlock;
*-----------------------------------------------------------------*/
void CFE_PSP_Restart(uint32 resetType)
{
CFE_PSP_FlushCaches(1, PcRtems_ReservedMemBlock.BlockPtr, PcRtems_ReservedMemBlock.BlockSize);
CFE_PSP_FlushCaches(1, GenericRtems_ReservedMemBlock.BlockPtr, GenericRtems_ReservedMemBlock.BlockSize);
OS_printf("%s is not implemented on this platform ( yet ! )\n", __func__);
exit(EXIT_FAILURE);
}
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion unit-test-coverage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

project(PSPCOVERAGE C)

set(PSPCOVERAGE_TARGETS mcp750-vxworks pc-rtems CACHE STRING "PSP target(s) to build coverage tests for (default=all)")
set(PSPCOVERAGE_TARGETS mcp750-vxworks generic-rtems CACHE STRING "PSP target(s) to build coverage tests for (default=all)")

# Check that coverage has been implemented for this PSPTYPE
foreach(PSPTYPE ${PSPCOVERAGE_TARGETS})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
######################################################################
#
# CMake build recipe for pc-rtems PSP white-box coverage tests
# CMake build recipe for generic-rtems PSP white-box coverage tests
#
######################################################################

include_directories(${CFEPSP_SOURCE_DIR}/fsw/pc-rtems/inc)
include_directories(${CFEPSP_SOURCE_DIR}/fsw/generic-rtems/inc)
include_directories(${PSPCOVERAGE_SOURCE_DIR}/shared/inc)

# Target names use a "ut" prefix to avoid confusion with the FSW targets
Expand All @@ -29,7 +29,7 @@ add_executable(coverage-${CFE_PSP_TARGETNAME}-testrunner
src/coveragetest-cfe-psp-start.c
src/coveragetest-cfe-psp-support.c
src/coveragetest-cfe-psp-watchdog.c
src/coveragetest-psp-pc-rtems.c
src/coveragetest-psp-generic-rtems.c
$<TARGET_OBJECTS:psp-${CFE_PSP_TARGETNAME}-shared>
$<TARGET_OBJECTS:psp-${CFE_PSP_TARGETNAME}-impl>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
************************************************************************/

#include "coveragetest-psp-pc-rtems.h"
#include "coveragetest-psp-generic-rtems.h"

#include "cfe_psp.h"
#include "PCS_stdlib.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
************************************************************************/

#include "coveragetest-psp-pc-rtems.h"
#include "coveragetest-psp-generic-rtems.h"

#include "cfe_psp.h"
#include "PCS_stdlib.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
************************************************************************/

#include "coveragetest-psp-pc-rtems.h"
#include "coveragetest-psp-generic-rtems.h"

#include "cfe_psp.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
************************************************************************/

#include "coveragetest-psp-pc-rtems.h"
#include "coveragetest-psp-generic-rtems.h"

#include "cfe_psp.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include "cfe_psp.h"

#include "coveragetest-psp-pc-rtems.h"
#include "coveragetest-psp-generic-rtems.h"

#include "PCS_stdlib.h"
#include "PCS_cfe_configdata.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
************************************************************************/

#include "coveragetest-psp-pc-rtems.h"
#include "coveragetest-psp-generic-rtems.h"

#include "cfe_psp.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
************************************************************************/

#include "coveragetest-psp-pc-rtems.h"
#include "coveragetest-psp-generic-rtems.h"

void Psp_Test_Setup(void)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* limitations under the License.
************************************************************************/

#ifndef COVERAGETEST_PSP_PC_RTEMS_H
#define COVERAGETEST_PSP_PC_RTEMS_H
#ifndef COVERAGETEST_PSP_GENERIC_RTEMS_H
#define COVERAGETEST_PSP_GENERIC_RTEMS_H

#include "utassert.h"
#include "uttest.h"
Expand Down

0 comments on commit a698ef9

Please sign in to comment.