Skip to content

Commit

Permalink
Merge branch 'master' into fix-377-select_ut
Browse files Browse the repository at this point in the history
  • Loading branch information
CDKnightNASA committed Apr 20, 2020
2 parents e7b58e7 + a66eb2d commit 21ef80e
Show file tree
Hide file tree
Showing 85 changed files with 2,505 additions and 4,666 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
os: linux
dist: bionic
sudo: required
language:
- c
language: c
compiler:
- gcc
addons:
Expand Down
503 changes: 258 additions & 245 deletions CMakeLists.txt

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,16 @@ This distribution contains:
2. Tests and example applications
3. A directory structure and makefiles to manage it all.

Version Notes:
==============
## Version Notes:
- 5.0.12: DEVELOPMENT
- Use the target_include_directories and target_compile_definitions functions from CMake to manage the build flags per target.
- Build implementation components using a separate CMakeLists.txt file rather than aux_source_directory.
- Provide sufficient framework for combining the OSAL BSP, UT BSP, and the CFE PSP and eliminating the duplication/overlap between these items.
- Minor updates (see https://github.com/nasa/osal/pull/417)
- 5.0.11: DEVELOPMENT
- The more descriptive return value OS_ERR_NAME_NOT_FOUND (instead of OS_FS_ERROR) will now be returned from the following functions (): OS_rmfs, OS_mount, OS_unmount, OS_FS_GetPhysDriveName
- Wraps OS_ShMem* prototype and unit test wrapper additions in OSAL_OMIT_DEPRECATED
- Minor updates (see https://github.com/nasa/osal/pull/408)
- 5.0.10: DEVELOPMENT
- Minor updates (see https://github.com/nasa/osal/pull/401)
- 5.0.9: DEVELOPMENT
Expand Down
26 changes: 26 additions & 0 deletions src/bsp/mcp750-vxworks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
######################################################################
#
# CMAKE build recipe for MCP750 Board Support Package (BSP)
#
######################################################################

add_library(osal_mcp750-vxworks_impl OBJECT
src/bsp_start.c
src/bsp_voltab.c
src/bsp_console.c
)

target_include_directories(osal_mcp750-vxworks_impl PUBLIC
$ENV{WIND_BASE}/target/h
$ENV{WIND_BASE}/target/h/wrn/coreip
$ENV{WIND_BASE}/target/config/mcp750
)

# NOTE: the __PPC__ and MCP750 macros are referenced in some system headers.
# therefore all code compiled for this platform should always define these symbols.
target_compile_definitions(osal_mcp750-vxworks_impl PUBLIC
"__PPC__"
"MCP750"
)


8 changes: 8 additions & 0 deletions src/bsp/mcp750-vxworks/build_options.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
##########################################################################
#
# Build options for "mcp750-vxworks" BSP
#
##########################################################################

# This indicates where to stage target binaries created during the build
set(OSAL_BSP_STAGING_INSTALL_DIR "CF:0")
97 changes: 0 additions & 97 deletions src/bsp/mcp750-vxworks/make/compiler-opts.mak

This file was deleted.

35 changes: 0 additions & 35 deletions src/bsp/mcp750-vxworks/make/link-rules.mak

This file was deleted.

52 changes: 52 additions & 0 deletions src/bsp/mcp750-vxworks/src/bsp_console.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/******************************************************************************
** File: bsp_console.c
**
**
** This is governed by the NASA Open Source Agreement and may be used,
** distributed and modified only pursuant to the terms of that agreement.
**
** Copyright (c) 2004-2006, United States government as represented by the
** administrator of the National Aeronautics Space Administration.
** All rights reserved.
**
**
** Purpose:
** OSAL BSP debug console abstraction
**
******************************************************************************/

#include <string.h>
#include <unistd.h>
#include <stdio.h>

#include "mcp750_bsp_internal.h"
#include "bsp-impl.h"

/****************************************************************************************
BSP CONSOLE IMPLEMENTATION FUNCTIONS
****************************************************************************************/

/*----------------------------------------------------------------
OS_BSP_ConsoleOutput_Impl
See full description in header
------------------------------------------------------------------*/
void OS_BSP_ConsoleOutput_Impl(const char *Str, uint32 DataLen)
{
while (DataLen > 0)
{
putchar(*Str);
++Str;
--DataLen;
}
}

/*----------------------------------------------------------------
OS_BSP_ConsoleSetMode_Impl() definition
See full description in header
------------------------------------------------------------------*/
void OS_BSP_ConsoleSetMode_Impl(uint32 ModeBits)
{
/* ignored; not implemented */
}


71 changes: 30 additions & 41 deletions src/bsp/mcp750-vxworks/src/bsp_start.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/******************************************************************************
** File: bsp_start.c
**
** This is governed by the NASA Open Source Agreement and may be used,
** distributed and modified only pursuant to the terms of that agreement.
** This is governed by the NASA Open Source Agreement and may be used,
** distributed and modified only pursuant to the terms of that agreement.
**
** Copyright (c) 2004-2006, United States government as represented by the
** administrator of the National Aeronautics Space Administration.
** All rights reserved.
** Copyright (c) 2004-2006, United States government as represented by the
** administrator of the National Aeronautics Space Administration.
** All rights reserved.
**
** Purpose:
**
**
** OSAL main entry point.
**
** History:
Expand All @@ -19,23 +19,10 @@
/*
** Include Files
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "vxWorks.h"
#include "sysLib.h"
#include "taskLib.h"

/*
** OSAL includes
*/
#include "common_types.h"
#include "osapi.h"
#include <string.h>

/*
** External Declarations
*/
void OS_Application_Startup(void);
#include "mcp750_bsp_internal.h"

/******************************************************************************
** Function: OS_BSPMain()
Expand All @@ -47,30 +34,32 @@ void OS_Application_Startup(void);
** (none)
**
** Return:
** (none)
** integer return code, with zero indicating normal exit, nonzero
** indicating an off-nominal condition
*/

void OS_BSPMain( void )
int OS_BSPMain(void)
{
int TicksPerSecond;

/*
** Delay for one second.
*/
TicksPerSecond = sysClkRateGet();
(void) taskDelay( TicksPerSecond );
/*
* Initially clear the global object (this contains return code)
*/
memset(&OS_BSP_Global, 0, sizeof(OS_BSP_Global));

OS_printf("Starting Up OSAPI App.\n");

/*
** Call OSAL entry point.
*/
OS_Application_Startup();
/*
* Call application specific entry point.
* This should set up all user tasks and resources, then return
*/
OS_Application_Startup();

/*
** Exit the main thread.
** in VxWorks we can delete all of the OS tasks if we want.
*/
/*
* OS_Application_Run() implements the background task.
* The user application may provide this, or a default implementation
* is used which just calls OS_IdleLoop().
*/
OS_Application_Run();

/*
* Return to shell with the current status code
*/
return OS_BSP_Global.AppStatus;
}

27 changes: 27 additions & 0 deletions src/bsp/mcp750-vxworks/src/mcp750_bsp_internal.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/******************************************************************************
** File: mcp750_bsp_internal.h
**
**
** This is governed by the NASA Open Source Agreement and may be used,
** distributed and modified only pursuant to the terms of that agreement.
**
** Copyright (c) 2004-2006, United States government as represented by the
** administrator of the National Aeronautics Space Administration.
** All rights reserved.
**
**
** Purpose:
** Header file for internal data to the MCP750 BSP
**
******************************************************************************/

#ifndef _MCP750_BSP_INTERNAL_H_
#define _MCP750_BSP_INTERNAL_H_

/*
** OSAL includes
*/
#include "osapi.h"
#include "bsp-impl.h"

#endif /* _MCP750_BSP_INTERNAL_H_ */
Loading

0 comments on commit 21ef80e

Please sign in to comment.