From 88a86b4f3ff67b9582d6d7d7fdba403a90983951 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 10 Apr 2016 08:29:45 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9271 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- .../nasa_cfe/psp/src/cfe_psp_exception.c | 60 +++++++++ .../abstractions/nasa_cfe/psp/src/cfe_psp_memory.c | 136 +++++++++++++++++++++ .../abstractions/nasa_cfe/psp/src/cfe_psp_timer.c | 26 ++++ 3 files changed, 222 insertions(+) create mode 100644 os/common/abstractions/nasa_cfe/psp/src/cfe_psp_exception.c create mode 100644 os/common/abstractions/nasa_cfe/psp/src/cfe_psp_memory.c (limited to 'os/common/abstractions/nasa_cfe/psp/src') 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; +} + /** @} */ -- cgit v1.2.3