diff --git a/README.md b/README.md index 92cb1730..a440c1a3 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,12 @@ This is a collection of APIs abstracting platform specific functionality to be l ## Version History +### Development Build: 1.5.0-rc1+dev6 + +- Adds CFE_PSP_GetProcessorName +- Removes classic make artifacts +- See + ### Development Build: 1.4.0+dev76 - Provide a new framework and perform PSP coverage tests. New coverage test executable is built and several files within PSP are targeted. diff --git a/fsw/inc/cfe_psp.h b/fsw/inc/cfe_psp.h index 34f7be85..0fb4316e 100644 --- a/fsw/inc/cfe_psp.h +++ b/fsw/inc/cfe_psp.h @@ -216,6 +216,10 @@ extern uint32 CFE_PSP_GetSpacecraftId ( void ); ** CFE_PSP_GetSpacecraftId retuns the Spacecraft ID (if any ) */ +extern const char * CFE_PSP_GetProcessorName(void); +/* +** CFE_PSP_GetProcessorName returns the processor name +*/ extern uint32 CFE_PSP_Get_Timer_Tick(void); /* diff --git a/fsw/mcp750-vxworks/make/compiler-opts.mak b/fsw/mcp750-vxworks/make/compiler-opts.mak deleted file mode 100644 index 44a3f23d..00000000 --- a/fsw/mcp750-vxworks/make/compiler-opts.mak +++ /dev/null @@ -1,107 +0,0 @@ -############################################################################### -## compiler-opts.mak - compiler definitions and options for building the cFE -## -## Target: PPC MCP750 COTS board with vxWorks 6.x -## -## Modifications: -## -############################################################################### -## -## Warning Level Configuration -## -## WARNINGS=-Wall -ansi -pedantic -Wstrict-prototypes -WARNINGS = -Wall -std=c99 - -## -## A fix for Windows systems on vxWorks 6.4 -## When generating dependancies, the Windows GCC cannot seem to deal -## with the Windows style path separators in the WIND_BASE macro. -## -FIXED_WIND_BASE = $(subst \,/,$(WIND_BASE)) - -## -## vxWorks system includes -## -VXINCDIR = $(FIXED_WIND_BASE)/target/h \ -$(FIXED_WIND_BASE)/target/h/wrn/coreip \ -$(FIXED_WIND_BASE)/target/h/drv \ -$(FIXED_WIND_BASE)/target/src/config \ -$(FIXED_WIND_BASE)/target/src/drv \ -$(FIXED_WIND_BASE)/target/config/comps/src \ -$(FIXED_WIND_BASE)/target/config/comps/src/dosfs2 \ - -SYSINCS = $(VXINCDIR:%=-I%) - -## -## Target Defines for the OS, Hardware Arch, etc.. -## -TARGET_DEFS = -D_VXWORKS_OS_ -D_PPC_ -D__PPC__ $(CFE_SB_NET) -D$(OS) -DMCP750 -D_EMBED_ \ - -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL -DCPU=PPC604 - -## -## Endian Defines -## -ENDIAN_DEFS=-D_EB -DENDIAN=_EB -DSOFTWARE_BIG_BIT_ORDER - -## -## Compiler Architecture Switches -## -ARCH_OPTS = -mcpu=750 -mstrict-align -fno-builtin - -## -## Application specific compiler switches -## -ifeq ($(BUILD_TYPE),CFE_APP) - APP_COPTS = -mlongcall - APP_ASOPTS = -else - APP_COPTS = - APP_ASOPTS = -endif - -## -## Extra Cflags for Assembly listings, etc. -## -LIST_OPTS = -Wa,-a=$*.lis - -## -## gcc options for dependancy generation -## -COPTS_D = $(APP_COPTS) $(ENDIAN_DEFS) $(TARGET_DEFS) $(ARCH_OPTS) $(SYSINCS) $(WARNINGS) - -## -## General gcc options that apply to compiling and dependency generation. -## -COPTS=$(LIST_OPTS) $(COPTS_D) - -## -## Extra defines and switches for assembly code -## -ASOPTS = $(APP_ASOPTS) -P -xassembler-with-cpp - -##--------------------------------------------------------- -## Application file extention type -## This is the defined application extention. -## Known extentions: Mac OS X: .bundle, Linux: .so, RTEMS: -## .s3r, vxWorks: .o etc.. -##--------------------------------------------------------- -APP_EXT = o - -#################################################### -## Host Development System and Toolchain defintions -## -## Host OS utils -## -RM=rm -f -CP=cp - -## -## Compiler tools -## -COMPILER = ccppc -ASSEMBLER = ccppc -LINKER = ldppc -AR = arppc -NM = nmppc -OBJCPY = objcopyppc -TABLE_BIN = elf2cfetbl diff --git a/fsw/mcp750-vxworks/make/link-rules.mak b/fsw/mcp750-vxworks/make/link-rules.mak deleted file mode 100644 index e92c4317..00000000 --- a/fsw/mcp750-vxworks/make/link-rules.mak +++ /dev/null @@ -1,39 +0,0 @@ -############################################################################### -# File: link-rules.mak -# -# Purpose: -# Makefile for linking code and producing the cFE Core executable image. -# -# History: -# -############################################################################### -## -## Executable target. This is target specific -## -EXE_TARGET=cfe-core.o - -CORE_INSTALL_FILES = $(EXE_TARGET) - - -## -## Linker flags that are needed -## -LDFLAGS = - -## -## Libraries to link in -## -LIBS = - -## -## cFE Core Link Rule -## -$(EXE_TARGET): $(CORE_OBJS) - $(COMPILER) $(DEBUG_FLAGS) -r -nostdlib -o $(EXE_TARGET) $(CORE_OBJS) - -## -## Application Link Rule -## -$(APPTARGET).$(APP_EXT): $(OBJS) - $(LINKER) -r $(OBJS) -o $@ - diff --git a/fsw/mcp750-vxworks/src/cfe_psp_support.c b/fsw/mcp750-vxworks/src/cfe_psp_support.c index 99d3080f..61b3623b 100644 --- a/fsw/mcp750-vxworks/src/cfe_psp_support.c +++ b/fsw/mcp750-vxworks/src/cfe_psp_support.c @@ -66,6 +66,7 @@ #include #define CFE_PSP_CPU_ID (GLOBAL_CONFIGDATA.Default_CpuId) +#define CFE_PSP_CPU_NAME (GLOBAL_CONFIGDATA.Default_CpuName) #define CFE_PSP_SPACECRAFT_ID (GLOBAL_CONFIGDATA.Default_SpacecraftId) /* @@ -192,3 +193,23 @@ uint32 CFE_PSP_GetSpacecraftId (void) return CFE_PSP_SPACECRAFT_ID; } +/* +** Name: CFE_PSP_GetProcessorName +** +** Purpose: +** return the processor name. +** +** Parameters: +** +** Global Inputs: None +** +** Global Outputs: None +** +** +** Return Values: Processor name +*/ +const char *CFE_PSP_GetProcessorName (void) +{ + return CFE_PSP_CPU_NAME; +} + diff --git a/fsw/mcp750-vxworks/src/psp.mak b/fsw/mcp750-vxworks/src/psp.mak deleted file mode 100644 index 775b3fca..00000000 --- a/fsw/mcp750-vxworks/src/psp.mak +++ /dev/null @@ -1,50 +0,0 @@ -############################################################################### -# File: psp.mak -# -# Purpose: -# Platform Support Package routines for the RAD750 PowerPC board -# running under VxWorks. -# -# History: -# 2007/09/01 A. Cudmore : Updated for cFE build 5.0 -# -############################################################################### - -# Subsystem produced by this makefile. -TARGET = psp.o - -#============================================================================== -# Object files required to build subsystem. -#============================================================================== -OBJS = cfe_psp_start.o \ -cfe_psp_support.o \ -cfe_psp_ssr.o \ -cfe_psp_voltab.o \ -cfe_psp_memtab.o \ -cfe_psp_timer.o \ -cfe_psp_watchdog.o \ -cfe_psp_memory.o \ -cfe_psp_exception.o \ -cfe_psp_ram.o \ -cfe_psp_eeprom.o \ -cfe_psp_port.o \ -cfe_psp_memrange.o \ -cfe_psp_memutils.o - -#============================================================================== -# Source files required to build subsystem; used to generate dependencies. -SOURCES = cfe_psp_start.c \ -cfe_psp_support.c \ -cfe_psp_ssr.c \ -cfe_psp_voltab.c \ -cfe_psp_memtab.c \ -cfe_psp_timer.c \ -cfe_psp_watchdog.c \ -cfe_psp_memory.c \ -cfe_psp_exception.c \ -cfe_psp_ram.c \ -cfe_psp_eeprom.c \ -cfe_psp_port.c \ -cfe_psp_memrange.c \ -cfe_psp_memutils.c - diff --git a/fsw/pc-linux/make/compiler-opts.mak b/fsw/pc-linux/make/compiler-opts.mak deleted file mode 100644 index 5e503802..00000000 --- a/fsw/pc-linux/make/compiler-opts.mak +++ /dev/null @@ -1,95 +0,0 @@ -############################################################################## -## compiler-opts.mak - compiler definitions and options for building the cFE -## -## Target: x86 PC Linux -## -## Modifications: -## -############################################################################### -## -## Warning Level Configuration -## -# WARNINGS=-Wall -ansi -pedantic -Wstrict-prototypes -WARNINGS=-Wall -Wstrict-prototypes - -## -## Host OS Include Paths ( be sure to put the -I switch in front of each directory ) -## -SYSINCS= - -## -## Target Defines for the OS, Hardware Arch, etc.. -## -TARGET_DEFS+=-D__ix86__ -D_ix86_ -D_LINUX_OS_ -D$(OS) -DX86PC -DBUILD=$(BUILD) -D_REENTRANT -D _EMBED_ - -## -## Endian Defines -## -ENDIAN_DEFS=-D_EL -DENDIAN=_EL -DSOFTWARE_LITTLE_BIT_ORDER - -## -## Compiler Architecture Switches -## -ARCH_OPTS = -m32 - -## -## Application specific compiler switches -## -ifeq ($(BUILD_TYPE),CFE_APP) - APP_COPTS= - APP_ASOPTS= -else - APP_COPTS= - APP_ASOPTS= -endif - -## -## Extra Cflags for Assembly listings, etc. -## -LIST_OPTS = - -## -## gcc options for dependancy generation -## -COPTS_D = $(APP_COPTS) $(ENDIAN_DEFS) $(TARGET_DEFS) $(ARCH_OPTS) $(SYSINCS) $(WARNINGS) - -## -## General gcc options that apply to compiling and dependency generation. -## -COPTS=$(LIST_OPTS) $(COPTS_D) - -## -## Extra defines and switches for assembly code -## -ASOPTS = $(APP_ASOPTS) -P -xassembler-with-cpp - -##--------------------------------------------------------- -## Application file extention type -## This is the defined application extention. -## Known extentions: Mac OS X: .bundle, Linux: .so, RTEMS: -## .s3r, vxWorks: .o etc.. -##--------------------------------------------------------- -APP_EXT = so - -################################################################################# -## Host Development System and Toolchain defintions -## - -## -## Host OS utils -## -RM=rm -f -CP=cp - -## -## Compiler tools -## -COMPILER=gcc -ASSEMBLER=as -LINKER=ld -melf_i386 -AR=ar -NM=nm -SIZE=size -OBJCOPY=objcopy -OBJDUMP=objdump -TABLE_BIN = elf2cfetbl diff --git a/fsw/pc-linux/make/link-rules.mak b/fsw/pc-linux/make/link-rules.mak deleted file mode 100644 index 929f299c..00000000 --- a/fsw/pc-linux/make/link-rules.mak +++ /dev/null @@ -1,42 +0,0 @@ -############################################################################### -# File: link-rules.mak -# -# Purpose: -# Makefile for linking code and producing the cFE Core executable image. -# -# History: -# -############################################################################### -## -## Executable target. This is target specific -## -EXE_TARGET=core-linux.bin - -CORE_INSTALL_FILES = $(EXE_TARGET) - - -## -## Linker flags that are needed -## -LDFLAGS = -m32 -Wl,-export-dynamic - -## -## Libraries to link in -## -LIBS = -lm -lpthread -ldl -lrt -## -## Uncomment the following line to link in C++ standard libs -## LIBS += -lstdc++ -## - -## -## cFE Core Link Rule -## -$(EXE_TARGET): $(CORE_OBJS) - $(COMPILER) $(DEBUG_FLAGS) -o $(EXE_TARGET) $(CORE_OBJS) $(LDFLAGS) $(LIBS) - -## -## Application Link Rule -## -$(APPTARGET).$(APP_EXT): $(OBJS) - $(COMPILER) -m32 -shared -o $@ $(OBJS) diff --git a/fsw/pc-linux/src/cfe_psp_support.c b/fsw/pc-linux/src/cfe_psp_support.c index be884a83..9705efc3 100644 --- a/fsw/pc-linux/src/cfe_psp_support.c +++ b/fsw/pc-linux/src/cfe_psp_support.c @@ -52,6 +52,7 @@ */ extern uint32 CFE_PSP_SpacecraftId; extern uint32 CFE_PSP_CpuId; +extern char CFE_PSP_CpuName[]; /****************************************************************************** @@ -200,3 +201,24 @@ uint32 CFE_PSP_GetSpacecraftId (void) { return(CFE_PSP_SpacecraftId); } + +/* +** Name: CFE_PSP_GetProcessorName +** +** Purpose: +** return the processor name. +** +** Parameters: +** +** Global Inputs: None +** +** Global Outputs: None +** +** +** Return Values: Processor name +*/ +const char *CFE_PSP_GetProcessorName (void) +{ + return(CFE_PSP_CpuName); +} + diff --git a/fsw/pc-linux/src/psp.mak b/fsw/pc-linux/src/psp.mak deleted file mode 100644 index 72771b21..00000000 --- a/fsw/pc-linux/src/psp.mak +++ /dev/null @@ -1,52 +0,0 @@ -############################################################################### -# File: psp.mak -# -# Purpose: -# Platform Support Package routines for the Linux desktop build -# -# History: -# 2005/07/27 A. Cudmore : Updated for cFE. -# 2004/04/12 A. Cudmore : Initial revision for SDO. -# 2004/05/24 P. Kutt : Modified for new directory structure; rewrote comments. -# -############################################################################### - -# Subsystem produced by this makefile. -TARGET = psp.o - -#============================================================================== -# Object files required to build subsystem. -#============================================================================== -OBJS = cfe_psp_start.o \ -cfe_psp_support.o \ -cfe_psp_ssr.o \ -cfe_psp_voltab.o \ -cfe_psp_memtab.o \ -cfe_psp_timer.o \ -cfe_psp_watchdog.o \ -cfe_psp_memory.o \ -cfe_psp_exception.o \ -cfe_psp_ram.o \ -cfe_psp_eeprom.o \ -cfe_psp_port.o \ -cfe_psp_memrange.o \ -cfe_psp_memutils.o - -#============================================================================== -# Source files required to build subsystem; used to generate dependencies. -SOURCES = cfe_psp_start.c \ -cfe_psp_support.c \ -cfe_psp_ssr.c \ -cfe_psp_voltab.c \ -cfe_psp_memtab.c \ -cfe_psp_timer.c \ -cfe_psp_watchdog.c \ -cfe_psp_memory.c \ -cfe_psp_exception.c \ -cfe_psp_ram.c \ -cfe_psp_eeprom.c \ -cfe_psp_port.c \ -cfe_psp_memrange.c \ -cfe_psp_memutils.c - - diff --git a/fsw/pc-rtems/inc/psp_version.h b/fsw/pc-rtems/inc/psp_version.h index 70ad8862..39f683df 100644 --- a/fsw/pc-rtems/inc/psp_version.h +++ b/fsw/pc-rtems/inc/psp_version.h @@ -29,8 +29,8 @@ /* * Development Build Macro Definitions */ -#define CFE_PSP_IMPL_BUILD_NUMBER 76 -#define CFE_PSP_IMPL_BUILD_BASELINE "v1.4.0+dev" +#define CFE_PSP_IMPL_BUILD_NUMBER 6 +#define CFE_PSP_IMPL_BUILD_BASELINE "v1.5.0-rc1" /* * Version Macro Definitions diff --git a/fsw/pc-rtems/src/cfe_psp_support.c b/fsw/pc-rtems/src/cfe_psp_support.c index 83732f64..e67b90ff 100644 --- a/fsw/pc-rtems/src/cfe_psp_support.c +++ b/fsw/pc-rtems/src/cfe_psp_support.c @@ -179,3 +179,23 @@ uint32 CFE_PSP_GetSpacecraftId (void) return(CFE_PSP_SPACECRAFT_ID); } +/* +** Name: CFE_PSP_GetProcessorName +** +** Purpose: +** return the processor name. +** +** Parameters: +** +** Global Inputs: None +** +** Global Outputs: None +** +** +** Return Values: Processor name +*/ +const char *CFE_PSP_GetProcessorName (void) +{ + return(CFE_PSP_CPU_NAME); +} + diff --git a/ut-stubs/ut_psp_stubs.c b/ut-stubs/ut_psp_stubs.c index eb6e1d53..9687417f 100644 --- a/ut-stubs/ut_psp_stubs.c +++ b/ut-stubs/ut_psp_stubs.c @@ -143,6 +143,37 @@ uint32 CFE_PSP_GetSpacecraftId(void) return status; } +/*****************************************************************************/ +/** +** \brief CFE_PSP_GetProcessorName stub function +** +** \par Description +** This function is used as a placeholder for the PSP function +** CFE_PSP_GetProcessorName. It is set to return a fixed value for the +** unit tests. +** +** \par Assumptions, External Events, and Notes: +** None +** +** \returns +** Returns Default_CpuName or passed in address from buffer +** +******************************************************************************/ +const char *CFE_PSP_GetProcessorName(void) +{ + int32 status; + const char *ptr = GLOBAL_CONFIGDATA.Default_CpuName; + + status = UT_DEFAULT_IMPL(CFE_PSP_GetProcessorName); + + if (status >= 0) + { + UT_Stub_CopyToLocal(UT_KEY(CFE_PSP_GetProcessorName), &ptr, sizeof(ptr)); + } + + return ptr; +} + /*****************************************************************************/ /** v** \brief CFE_PSP_GetTime stub function