aboutsummaryrefslogtreecommitdiffstats
path: root/os/common/abstractions
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2016-04-10 08:29:45 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2016-04-10 08:29:45 +0000
commit88a86b4f3ff67b9582d6d7d7fdba403a90983951 (patch)
tree8ceb2255941fe0ff0f0c367017501fa43cc9d7d8 /os/common/abstractions
parent0f1f5ec0a8331c8d693c633278d627a04265a414 (diff)
downloadChibiOS-88a86b4f3ff67b9582d6d7d7fdba403a90983951.tar.gz
ChibiOS-88a86b4f3ff67b9582d6d7d7fdba403a90983951.tar.bz2
ChibiOS-88a86b4f3ff67b9582d6d7d7fdba403a90983951.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9271 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/common/abstractions')
-rw-r--r--os/common/abstractions/nasa_cfe/psp/cfe_psp.mk4
-rw-r--r--os/common/abstractions/nasa_cfe/psp/include/cfe_psp_config.h21
-rw-r--r--os/common/abstractions/nasa_cfe/psp/include/psp_version.h38
-rw-r--r--os/common/abstractions/nasa_cfe/psp/src/cfe_psp_exception.c60
-rw-r--r--os/common/abstractions/nasa_cfe/psp/src/cfe_psp_memory.c136
-rw-r--r--os/common/abstractions/nasa_cfe/psp/src/cfe_psp_timer.c26
6 files changed, 284 insertions, 1 deletions
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;
+}
+
/** @} */