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 #121, Unify CFE PSP with OSAL BSP #149

Merged
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
17 changes: 11 additions & 6 deletions fsw/mcp750-vxworks/make/build_options.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
##########################################################################
#
# Build options for "mcp750-vxworks" PSP
# This file specifies any global-scope compiler options when using this PSP
#
##########################################################################

# This indicates where to install target binaries created during the build
# Note - this should be phased out in favor of the staging dir from OSAL BSP
set(INSTALL_SUBDIR "cf")

# Additional preprocessor macro definitions to identify this platform
# Some upper-level code may be gated on _VXWORKS_OS_ being defined
# This is for compatibility with older build scripts which defined this symbol,
# but no CFE/OSAL framework code depends on this symbol.
add_definitions("-D_VXWORKS_OS_")
add_definitions("-D__PPC__")
add_definitions("-DMCP750")

include_directories($ENV{WIND_BASE}/target/h)
include_directories($ENV{WIND_BASE}/target/h/wrn/coreip)
include_directories($ENV{WIND_BASE}/target/config/mcp750)
25 changes: 21 additions & 4 deletions fsw/mcp750-vxworks/src/cfe_psp_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,18 @@ IMPORT void sysPciWrite32 (UINT32, UINT32);


/******************************************************************************
** Function: CFE_PSP_Main()
** Function: OS_Application_Startup()
**
** Purpose:
** vxWorks/BSP Application entry point.
** Application startup entry point from OSAL BSP.
**
** Arguments:
** (none)
**
** Return:
** (none)
*/

void CFE_PSP_Main( void )
void OS_Application_Startup(void)
{
int TicksPerSecond;
uint32 reset_type;
Expand Down Expand Up @@ -216,6 +215,24 @@ void CFE_PSP_Main( void )
*/
CFE_PSP_MAIN_FUNCTION(reset_type,reset_subtype, 1, CFE_PSP_NONVOL_STARTUP_FILE);

}

/******************************************************************************
** Function: OS_Application_Run()
**
** Purpose:
** Idle Loop entry point from OSAL BSP.
**
** Arguments:
** (none)
**
** Return:
** (none)
*/
void OS_Application_Run(void)
{
int TicksPerSecond;

/*
** Main loop for default task and simulated 1hz
*/
Expand Down
10 changes: 10 additions & 0 deletions fsw/pc-linux/make/build_options.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
##########################################################################
#
# Build options for "pc-linux" PSP
# This file specifies any global-scope compiler options when using this PSP
#
##########################################################################

# This indicates where to install target binaries created during the build
# Note - this should be phased out in favor of the staging dir from OSAL BSP
set(INSTALL_SUBDIR "cf")

# Some upper-level code may be gated on _LINUX_OS_ being defined
# This is for compatibility with older build scripts which defined this symbol,
# but no CFE/OSAL framework code depends on this symbol.
add_definitions("-D_LINUX_OS_")

13 changes: 9 additions & 4 deletions fsw/pc-linux/src/cfe_psp_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ static const struct option longOpts[] = {
** Return:
** (none)
*/
int main(int argc, char *argv[])
void OS_Application_Startup(void)
{
uint32 reset_type;
uint32 reset_subtype;
Expand All @@ -166,6 +166,8 @@ int main(int argc, char *argv[])
int opt = 0;
int longIndex = 0;
int32 Status;
char * const * argv;
int argc;

/*
** Initialize the CommandData struct
Expand All @@ -176,6 +178,8 @@ int main(int argc, char *argv[])
** Process the arguments with getopt_long(), then
** start the cFE
*/
argc = OS_BSP_GetArgC();
argv = OS_BSP_GetArgV();
opt = getopt_long( argc, argv, optString, longOpts, &longIndex );
while( opt != -1 )
{
Expand Down Expand Up @@ -356,6 +360,10 @@ int main(int argc, char *argv[])
CFE_PSP_SetupLocal1Hz();
}

}

void OS_Application_Run(void)
{
/*
** Let the main thread sleep.
**
Expand All @@ -377,9 +385,6 @@ int main(int argc, char *argv[])
OS_printf(" with a Poweron Reset ( --reset PO ). \n");

OS_DeleteAllObjects();


return(0);
}

/******************************************************************************
Expand Down
14 changes: 14 additions & 0 deletions fsw/pc-rtems/make/build_options.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
##########################################################################
#
# Build options for "pc-rtems" PSP
# This file specifies any global-scope compiler options when using this PSP
#
##########################################################################

# This indicates where to install target binaries created during the build
# Note - this should be phased out in favor of the staging dir from OSAL BSP
set(INSTALL_SUBDIR "eeprom")

# Some upper-level code may be gated on _RTEMS_OS_ being defined
# This is for compatibility with older build scripts which defined this symbol,
# but no CFE/OSAL framework code depends on this symbol.
add_definitions("-D_RTEMS_OS_")


Loading