diff --git a/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/Makefile b/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/Makefile index 730d004cc..d982ec06b 100644 --- a/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/Makefile +++ b/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/Makefile @@ -99,8 +99,8 @@ include $(CHIBIOS)/os/rt/rt.mk include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk # Other files (optional). include $(CHIBIOS)/test/nasa_osal/test.mk -include $(CHIBIOS)/os/common/abstractions/nasa_cfe/cfe_osal/cfe_osal.mk -include $(CHIBIOS)/os/common/abstractions/nasa_cfe/cfe_psp/cfe_psp.mk +include $(CHIBIOS)/os/common/abstractions/nasa_cfe/osal/cfe_osal.mk +include $(CHIBIOS)/os/common/abstractions/nasa_cfe/psp/cfe_psp.mk # Define linker script file here LDSCRIPT= $(STARTUPLD)/STM32F407xG.ld diff --git a/demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/Makefile b/demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/Makefile index 60a421262..90d406cb1 100644 --- a/demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/Makefile +++ b/demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/Makefile @@ -99,8 +99,8 @@ include $(CHIBIOS)/os/rt/rt.mk include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk # Other files (optional). include $(CHIBIOS)/test/nasa_osal/test.mk -include $(CHIBIOS)/os/common/abstractions/nasa_cfe/cfe_osal/cfe_osal.mk -include $(CHIBIOS)/os/common/abstractions/nasa_cfe/cfe_psp/cfe_psp.mk +include $(CHIBIOS)/os/common/abstractions/nasa_cfe/osal/cfe_osal.mk +include $(CHIBIOS)/os/common/abstractions/nasa_cfe/psp/cfe_psp.mk # Define linker script file here LDSCRIPT= $(STARTUPLD)/STM32F746xG.ld diff --git a/os/common/abstractions/nasa_cfe/psp/cfe_psp.mk b/os/common/abstractions/nasa_cfe/psp/cfe_psp.mk index 518ec4836..855817605 100644 --- a/os/common/abstractions/nasa_cfe/psp/cfe_psp.mk +++ b/os/common/abstractions/nasa_cfe/psp/cfe_psp.mk @@ -1,5 +1,7 @@ # NASA CFE PSP files. CFEPSPSRC = $(CHIBIOS)/os/common/abstractions/nasa_cfe/psp/src/cfe_psp_support.c \ - $(CHIBIOS)/os/common/abstractions/nasa_cfe/psp/src/cfe_psp_timer.c + $(CHIBIOS)/os/common/abstractions/nasa_cfe/psp/src/cfe_psp_timer.c \ + $(CHIBIOS)/os/common/abstractions/nasa_cfe/psp/src/cfe_psp_memory.c \ + $(CHIBIOS)/os/common/abstractions/nasa_cfe/psp/src/cfe_psp_exception.c CFEPSPINC = $(CHIBIOS)/os/common/abstractions/nasa_cfe/psp/include diff --git a/os/common/abstractions/nasa_cfe/psp/include/cfe_psp_config.h b/os/common/abstractions/nasa_cfe/psp/include/cfe_psp_config.h new file mode 100644 index 000000000..0967e078c --- /dev/null +++ b/os/common/abstractions/nasa_cfe/psp/include/cfe_psp_config.h @@ -0,0 +1,21 @@ +/* +** cfe_psp_config.h +** +** Copyright (c) 2004-2006, United States government as represented by the +** administrator of the National Aeronautics Space Administration. +** All rights reserved. This software(cFE) was created at NASA Goddard +** Space Flight Center pursuant to government contracts. +** +** This software may be used only pursuant to a United States government +** sponsored project and the United States government may not be charged +** for use thereof. +** +** +*/ + +#ifndef _cfe_psp_config_ +#define _cfe_psp_config_ + +#include "common_types.h" + +#endif /* _cfe_psp_config_ */ diff --git a/os/common/abstractions/nasa_cfe/psp/include/psp_version.h b/os/common/abstractions/nasa_cfe/psp/include/psp_version.h new file mode 100644 index 000000000..c5374c461 --- /dev/null +++ b/os/common/abstractions/nasa_cfe/psp/include/psp_version.h @@ -0,0 +1,38 @@ +/* +** $Id: psp_version.h 1.2.2.3 2014/10/01 15:41:27GMT-05:00 sstrege Exp $ +** +** +** Copyright (c) 2004-2006, United States government as represented by the +** administrator of the National Aeronautics Space Administration. +** All rights reserved. This software(cFE) was created at NASA's Goddard +** Space Flight Center pursuant to government contracts. +** +** This software may be used only pursuant to a United States government +** sponsored project and the United States government may not be charged +** for use thereof. +** +** +** +** Purpose: +** Provide version identifiers for the cFE Platform Support Packages (PSP). +** +*/ + +#ifndef _psp_version_ +#define _psp_version_ + + +/* +** Macro Definitions +*/ +#define CFE_PSP_MAJOR_VERSION 1 +#define CFE_PSP_MINOR_VERSION 2 +#define CFE_PSP_REVISION 0 +#define CFE_PSP_MISSION_REV 0 + +/* For backwards compatibility */ +#define CFE_PSP_SUBMINOR_VERSION CFE_PSP_REVISION + + +#endif /* _psp_version_ */ + diff --git a/os/common/abstractions/nasa_cfe/psp/src/cfe_psp_exception.c b/os/common/abstractions/nasa_cfe/psp/src/cfe_psp_exception.c new file mode 100644 index 000000000..e3456ddbf --- /dev/null +++ b/os/common/abstractions/nasa_cfe/psp/src/cfe_psp_exception.c @@ -0,0 +1,60 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file cfe_psp_exception.c + * @brief CFE PSP exception module code. + * + * @addtogroup nasa_cfe_psp_exception + * @{ + */ + +#include "ch.h" + +#include "common_types.h" +#include "osapi.h" +#include "cfe_psp.h" + +/*===========================================================================*/ +/* Module local definitions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module local types. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module local variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module local functions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module exported functions. */ +/*===========================================================================*/ + +void CFE_PSP_SetDefaultExceptionEnvironment(void) { + + /* Does nothing in ChibiOS, exceptions are initialized by the OS.*/ +} + +/** @} */ diff --git a/os/common/abstractions/nasa_cfe/psp/src/cfe_psp_memory.c b/os/common/abstractions/nasa_cfe/psp/src/cfe_psp_memory.c new file mode 100644 index 000000000..cc8f8d915 --- /dev/null +++ b/os/common/abstractions/nasa_cfe/psp/src/cfe_psp_memory.c @@ -0,0 +1,136 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file cfe_psp_memory.c + * @brief CFE PSP memory module code. + * + * @addtogroup nasa_cfe_psp_memory + * @{ + */ + +#include "ch.h" + +#include "common_types.h" +#include "osapi.h" +#include "cfe_psp.h" + +/*===========================================================================*/ +/* Module local definitions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module local types. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module local variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module local functions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Module exported functions. */ +/*===========================================================================*/ + +int32 CFE_PSP_GetCDSSize(uint32 *SizeOfCDS) { + + (void)SizeOfCDS; + + return 0; +} + +int32 CFE_PSP_WriteToCDS(void *PtrToDataToWrite, + uint32 CDSOffset, + uint32 NumBytes) { + + (void)PtrToDataToWrite; + (void)CDSOffset; + (void)NumBytes; + + return 0; +} + +int32 CFE_PSP_ReadFromCDS(void *PtrToDataToRead, + uint32 CDSOffset, + uint32 NumBytes) { + + (void)PtrToDataToRead; + (void)CDSOffset; + (void)NumBytes; + + return 0; +} + +int32 CFE_PSP_GetResetArea(void *PtrToResetArea, + uint32 *SizeOfResetArea) { + + (void)PtrToResetArea; + (void)SizeOfResetArea; + + return 0; +} + +int32 CFE_PSP_GetUserReservedArea(void *PtrToUserArea, + uint32 *SizeOfUserArea) { + + (void)PtrToUserArea; + (void)SizeOfUserArea; + + return 0; +} + +int32 CFE_PSP_GetVolatileDiskMem(void *PtrToVolDisk, + uint32 *SizeOfVolDisk) { + + (void)PtrToVolDisk; + (void)SizeOfVolDisk; + + return 0; +} + +int32 CFE_PSP_InitProcessorReservedMemory(uint32 RestartType) { + + (void)RestartType; + + return 0; +} + +int32 CFE_PSP_GetKernelTextSegmentInfo(void *PtrToKernelSegment, + uint32 *SizeOfKernelSegment) { + + (void)PtrToKernelSegment; + (void)SizeOfKernelSegment; + + return 0; +} + +int32 CFE_PSP_GetCFETextSegmentInfo(void *PtrToCFESegment, + uint32 *SizeOfCFESegment) { + + (void)PtrToCFESegment; + (void)SizeOfCFESegment; + + return 0; +} + +/** @} */ diff --git a/os/common/abstractions/nasa_cfe/psp/src/cfe_psp_timer.c b/os/common/abstractions/nasa_cfe/psp/src/cfe_psp_timer.c index d6ceb012a..c3ba269af 100644 --- a/os/common/abstractions/nasa_cfe/psp/src/cfe_psp_timer.c +++ b/os/common/abstractions/nasa_cfe/psp/src/cfe_psp_timer.c @@ -52,4 +52,30 @@ /* Module exported functions. */ /*===========================================================================*/ +void CFE_PSP_GetTime(OS_time_t *LocalTime) { + + (void)LocalTime; +} + +uint32 CFE_PSP_GetTimerTicksPerSecond(void) { + + return 0; +} + +uint32 CFE_PSP_GetTimerLow32Rollover(void) { + + return 0; +} + +void CFE_PSP_Get_Timebase(uint32 *Tbu, uint32* Tbl) { + + (void)Tbu; + (void)Tbl; +} + +uint32 CFE_PSP_Get_Dec(void) { + + return 0; +} + /** @} */