From b7f8e5c48c7f36dc84d51bc78882568ad5dc32a6 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Thu, 26 Mar 2020 17:49:29 -0400 Subject: [PATCH 1/4] Fix #145, Update RTEMS CMake module Addresses various compatibility/usability issues observed during testing - Correctly set/export the CMAKE_EXE_EXPORTS_C_FLAG - Incorporate the system specs directly into the COMPILE_OBJECT templates so these don't need to be specified by the toolchain or CMAKE_C_FLAGS - Similarly include the always-needed linker flags flags for entry point and relocation address into the linker command template --- cmake/Modules/Platform/RTEMS.cmake | 56 ++++++++++++++++++------------ 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/cmake/Modules/Platform/RTEMS.cmake b/cmake/Modules/Platform/RTEMS.cmake index 50fc2c8e..b5b4b5e3 100644 --- a/cmake/Modules/Platform/RTEMS.cmake +++ b/cmake/Modules/Platform/RTEMS.cmake @@ -7,7 +7,7 @@ # Note - RTEMS does not support "shared libs" in the traditional sense, # but it does have a loader that does static linking at runtime. # This property is set true which allows one to use the CMake shared library logic -# But the code is otherwise built as static -- no PIC flags +# But the code is otherwise built as static -- no PIC flags set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE) set(CMAKE_EXECUTABLE_SUFFIX ".exe") set(CMAKE_SHARED_LIBRARY_SUFFIX ".obj") @@ -24,6 +24,20 @@ set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "") set(CMAKE_SHARED_MODULE_C_FLAGS "") set(CMAKE_SHARED_MODULE_CXX_FLAGS "") +# Set the CMAKE_EXE_EXPORTS_C_FLAG which is for executables +# using dynamic loading/linking +set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic") + + +# Include the system specs directly within the COMPILE_OBJECT definitions +# This way it does not need to be done via CMAKE_C_FLAGS and it simplifies +# the process in general. +set(RTEMS_SYS_SPECS_FLAGS "-B${RTEMS_TARGET_PATH}/${RTEMS_BSP}/lib -specs bsp_specs -qrtems") + +# Basic command templates for compiling C and C++ code +set(CMAKE_C_COMPILE_OBJECT " ${RTEMS_SYS_SPECS_FLAGS} ${RTEMS_BSP_C_FLAGS} -o -c ") +set(CMAKE_CXX_COMPILE_OBJECT " ${RTEMS_SYS_SPECS_FLAGS} ${RTEMS_BSP_CXX_FLAGS} -o -c ") + # This creates a simple relocatable object file, not a shared library set(CMAKE_SHARED_OBJECT_LINKER_FLAGS -r) @@ -32,47 +46,43 @@ set(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_MODULE}) set(CMAKE_C_CREATE_SHARED_LIBRARY ${CMAKE_C_CREATE_SHARED_MODULE}) set(CMAKE_CXX_CREATE_SHARED_LIBRARY ${CMAKE_C_CREATE_SHARED_MODULE}) +# Additional link flags for entry point and relocation address +# RTEMS uses "Init" rather than "main" as its entry point +# This flag ensures that the Init symbol is not dropped at link time. +set(RTEMS_SYS_LINKFLAGS "-u Init") +if (RTEMS_RELOCADDR) + set(RTEMS_SYS_LINKFLAGS "${RTEMS_SYS_LINKFLAGS} -Wl,-Ttext,${RTEMS_RELOCADDR}") +endif (RTEMS_RELOCADDR) + # The link procedure to support dynamic loading using the RTEMS dlopen() # First create a "prelink" executable using a typical link procedure # Then run "rtems-syms" and re-link the output into a final executable set(CMAKE_C_LINK_EXECUTABLE - " -o -prelink " + " ${RTEMS_SYS_SPECS_FLAGS} ${RTEMS_BSP_C_FLAGS} ${RTEMS_SYS_LINKFLAGS} -o -prelink " "${RTEMS_TOOLS_PREFIX}/bin/rtems-syms -v -e -c ${RTEMS_BSP_C_FLAGS} -C -o -dl-sym.o -prelink" - " -o -dl-sym.o ") + " ${RTEMS_SYS_SPECS_FLAGS} ${RTEMS_BSP_C_FLAGS} ${RTEMS_SYS_LINKFLAGS} -o -dl-sym.o ") -set(RTEMS_TARGET_PATH +set(RTEMS_TARGET_PATH "${RTEMS_BSP_PREFIX}/${CMAKE_SYSTEM_PROCESSOR}-rtems${CMAKE_SYSTEM_VERSION}") - -set(RTEMS_TOOLS_PATH + +set(RTEMS_TOOLS_PATH "${RTEMS_TOOLS_PREFIX}/${CMAKE_SYSTEM_PROCESSOR}-rtems${CMAKE_SYSTEM_VERSION}") - + set(CMAKE_FIND_ROOT_PATH - "${RTEMS_TARGET_PATH}/${RTEMS_BSP}" + "${RTEMS_TARGET_PATH}/${RTEMS_BSP}" "${RTEMS_TOOLS_PATH}") - -set(CMAKE_SYSTEM_PREFIX_PATH + +set(CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_FIND_ROOT_PATH}) set(CMAKE_SYSTEM_INCLUDE_PATH "${RTEMS_TARGET_PATH}/${RTEMS_BSP}/lib/include" "${RTEMS_TOOLS_PATH}/include") - + set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES ${CMAKE_SYSTEM_INCLUDE_PATH}) set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES ${CMAKE_SYSTEM_INCLUDE_PATH}) set(CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${RTEMS_TARGET_PATH}/${RTEMS_BSP}/lib") set(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES}) -set(CMAKE_C_FLAGS_INIT - "-B${RTEMS_TARGET_PATH}/${RTEMS_BSP}/lib -specs bsp_specs -qrtems ${RTEMS_BSP_C_FLAGS}") -set(CMAKE_CXX_FLAGS_INIT - "-B${RTEMS_TARGET_PATH}/${RTEMS_BSP}/lib -specs bsp_specs -qrtems ${RTEMS_BSP_CXX_FLAGS}") - -# RTEMS uses "Init" rather than "main" as its entry point -# This flag ensures that the Init symbol is not dropped at link time. -set(CMAKE_EXE_LINKER_FLAGS_INIT "-u Init") -if (RTEMS_RELOCADDR) - set(CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS_INIT} -Wl,-Ttext,${RTEMS_RELOCADDR}") -endif (RTEMS_RELOCADDR) - set(RTEMS TRUE) set(UNIX TRUE) From 34bd1819737591492ff0397a32b038779a014f22 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Thu, 26 Mar 2020 16:47:16 -0400 Subject: [PATCH 2/4] Fix #135, Add separate CMakeLists.txt for each implementation Do not use aux_source_directory to assemble a list of source files. Instead, put a proper CMakeLists.txt file in each implementation and build the implementation separately from the shared/common parts. In addition to avoiding the aux_source_directory this allows PSP-specific compile definitions to be set on a per-implementation basis because it is defined separately. --- CMakeLists.txt | 27 +++++++++++++++------------ fsw/mcp750-vxworks/CMakeLists.txt | 13 +++++++++++++ fsw/pc-linux/CMakeLists.txt | 13 +++++++++++++ fsw/pc-rtems/CMakeLists.txt | 13 +++++++++++++ 4 files changed, 54 insertions(+), 12 deletions(-) create mode 100644 fsw/mcp750-vxworks/CMakeLists.txt create mode 100644 fsw/pc-linux/CMakeLists.txt create mode 100644 fsw/pc-rtems/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 176a3ef2..838ec376 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,21 +4,24 @@ if (NOT CFE_SYSTEM_PSPNAME) message(FATAL_ERROR "CFE_SYSTEM_PSPNAME is not defined - do not know which to build") endif() -if (NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/fsw/${CFE_SYSTEM_PSPNAME}) - message(FATAL_ERROR "PSP ${CFE_SYSTEM_PSPNAME} is not implemented") -endif() - add_definitions(-D_CFE_PSP_) -include_directories(fsw/${CFE_SYSTEM_PSPNAME}/inc) + include_directories(fsw/shared) - -# Use all source files under the shared code directory (always) -# as well as all the files for the selected PSP -set(PSPFILES) -aux_source_directory(fsw/shared PSPFILES) -aux_source_directory(fsw/${CFE_SYSTEM_PSPNAME}/src PSPFILES) -add_library(psp-${CFE_SYSTEM_PSPNAME} STATIC ${PSPFILES}) +# Build the PSP implementation which lies in a system-specific subdirectory +include_directories(fsw/${CFE_SYSTEM_PSPNAME}/inc) +add_subdirectory(fsw/${CFE_SYSTEM_PSPNAME} ${CFE_SYSTEM_PSPNAME}) + +# Build the "common" parts as a library +add_library(psp-${CFE_SYSTEM_PSPNAME} STATIC + fsw/shared/cfe_psp_configdata.c + fsw/shared/cfe_psp_eeprom.c + fsw/shared/cfe_psp_memrange.c + fsw/shared/cfe_psp_memutils.c + fsw/shared/cfe_psp_module.c + fsw/shared/cfe_psp_port.c + fsw/shared/cfe_psp_ram.c + $) if (ENABLE_UNIT_TESTS) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/fsw/ut-stubs) diff --git a/fsw/mcp750-vxworks/CMakeLists.txt b/fsw/mcp750-vxworks/CMakeLists.txt new file mode 100644 index 00000000..b3c54e7e --- /dev/null +++ b/fsw/mcp750-vxworks/CMakeLists.txt @@ -0,0 +1,13 @@ + +# Build the mcp750-vxworks implementation as a library +add_library(psp-${CFE_SYSTEM_PSPNAME}-impl OBJECT + src/cfe_psp_exception.c + src/cfe_psp_memory.c + src/cfe_psp_memtab.c + src/cfe_psp_ssr.c + src/cfe_psp_start.c + src/cfe_psp_support.c + src/cfe_psp_timer.c + src/cfe_psp_voltab.c + src/cfe_psp_watchdog.c) + diff --git a/fsw/pc-linux/CMakeLists.txt b/fsw/pc-linux/CMakeLists.txt new file mode 100644 index 00000000..fb5a5d5a --- /dev/null +++ b/fsw/pc-linux/CMakeLists.txt @@ -0,0 +1,13 @@ + +# Build the pc-linux implementation as a library +add_library(psp-${CFE_SYSTEM_PSPNAME}-impl OBJECT + src/cfe_psp_exception.c + src/cfe_psp_memory.c + src/cfe_psp_memtab.c + src/cfe_psp_ssr.c + src/cfe_psp_start.c + src/cfe_psp_support.c + src/cfe_psp_timer.c + src/cfe_psp_voltab.c + src/cfe_psp_watchdog.c) + diff --git a/fsw/pc-rtems/CMakeLists.txt b/fsw/pc-rtems/CMakeLists.txt new file mode 100644 index 00000000..c4a21a13 --- /dev/null +++ b/fsw/pc-rtems/CMakeLists.txt @@ -0,0 +1,13 @@ + +# Build the pc-rtems implementation as a library +add_library(psp-${CFE_SYSTEM_PSPNAME}-impl OBJECT + src/cfe_psp_exception.c + src/cfe_psp_memory.c + src/cfe_psp_memtab.c + src/cfe_psp_ssr.c + src/cfe_psp_start.c + src/cfe_psp_support.c + src/cfe_psp_timer.c + src/cfe_psp_voltab.c + src/cfe_psp_watchdog.c) + From ab6aa2a7160c2a2f96639b4667e1d4af90d4e578 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Mon, 30 Mar 2020 18:31:18 -0400 Subject: [PATCH 3/4] Fix #121, Unify CFE PSP with OSAL BSP Instead of redefining the basic entry point symbols, use the OSAL BSP and its abstractions. The CFE PSP just becomes an extension to the OSAL BSP, and only needs to define the OS_Application_Startup symbol like any other OSAL application. --- fsw/mcp750-vxworks/make/build_options.cmake | 17 +- fsw/mcp750-vxworks/src/cfe_psp_start.c | 25 ++- fsw/pc-linux/make/build_options.cmake | 10 + fsw/pc-linux/src/cfe_psp_start.c | 13 +- fsw/pc-rtems/make/build_options.cmake | 14 ++ fsw/pc-rtems/src/cfe_psp_start.c | 219 +------------------- 6 files changed, 67 insertions(+), 231 deletions(-) diff --git a/fsw/mcp750-vxworks/make/build_options.cmake b/fsw/mcp750-vxworks/make/build_options.cmake index 0f72764d..2fb12313 100644 --- a/fsw/mcp750-vxworks/make/build_options.cmake +++ b/fsw/mcp750-vxworks/make/build_options.cmake @@ -1,11 +1,16 @@ +########################################################################## +# +# Build options for "mcp750-vxworks" PSP +# This file specifies any global-scope compiler options when using this PSP +# +########################################################################## + # This indicates where to install target binaries created during the build +# Note - this should be phased out in favor of the staging dir from OSAL BSP set(INSTALL_SUBDIR "cf") -# Additional preprocessor macro definitions to identify this platform +# Some upper-level code may be gated on _VXWORKS_OS_ being defined +# This is for compatibility with older build scripts which defined this symbol, +# but no CFE/OSAL framework code depends on this symbol. add_definitions("-D_VXWORKS_OS_") -add_definitions("-D__PPC__") -add_definitions("-DMCP750") -include_directories($ENV{WIND_BASE}/target/h) -include_directories($ENV{WIND_BASE}/target/h/wrn/coreip) -include_directories($ENV{WIND_BASE}/target/config/mcp750) diff --git a/fsw/mcp750-vxworks/src/cfe_psp_start.c b/fsw/mcp750-vxworks/src/cfe_psp_start.c index cbd6675c..18927248 100644 --- a/fsw/mcp750-vxworks/src/cfe_psp_start.c +++ b/fsw/mcp750-vxworks/src/cfe_psp_start.c @@ -80,10 +80,10 @@ IMPORT void sysPciWrite32 (UINT32, UINT32); /****************************************************************************** -** Function: CFE_PSP_Main() +** Function: OS_Application_Startup() ** ** Purpose: -** vxWorks/BSP Application entry point. +** Application startup entry point from OSAL BSP. ** ** Arguments: ** (none) @@ -91,8 +91,7 @@ IMPORT void sysPciWrite32 (UINT32, UINT32); ** Return: ** (none) */ - -void CFE_PSP_Main( void ) +void OS_Application_Startup(void) { int TicksPerSecond; uint32 reset_type; @@ -216,6 +215,24 @@ void CFE_PSP_Main( void ) */ CFE_PSP_MAIN_FUNCTION(reset_type,reset_subtype, 1, CFE_PSP_NONVOL_STARTUP_FILE); +} + +/****************************************************************************** +** Function: OS_Application_Run() +** +** Purpose: +** Idle Loop entry point from OSAL BSP. +** +** Arguments: +** (none) +** +** Return: +** (none) +*/ +void OS_Application_Run(void) +{ + int TicksPerSecond; + /* ** Main loop for default task and simulated 1hz */ diff --git a/fsw/pc-linux/make/build_options.cmake b/fsw/pc-linux/make/build_options.cmake index c5411b59..809d7441 100644 --- a/fsw/pc-linux/make/build_options.cmake +++ b/fsw/pc-linux/make/build_options.cmake @@ -1,6 +1,16 @@ +########################################################################## +# +# Build options for "pc-linux" PSP +# This file specifies any global-scope compiler options when using this PSP +# +########################################################################## + # This indicates where to install target binaries created during the build +# Note - this should be phased out in favor of the staging dir from OSAL BSP set(INSTALL_SUBDIR "cf") # Some upper-level code may be gated on _LINUX_OS_ being defined +# This is for compatibility with older build scripts which defined this symbol, +# but no CFE/OSAL framework code depends on this symbol. add_definitions("-D_LINUX_OS_") diff --git a/fsw/pc-linux/src/cfe_psp_start.c b/fsw/pc-linux/src/cfe_psp_start.c index c70d22ac..b2cc804c 100644 --- a/fsw/pc-linux/src/cfe_psp_start.c +++ b/fsw/pc-linux/src/cfe_psp_start.c @@ -157,7 +157,7 @@ static const struct option longOpts[] = { ** Return: ** (none) */ -int main(int argc, char *argv[]) +void OS_Application_Startup(void) { uint32 reset_type; uint32 reset_subtype; @@ -166,6 +166,8 @@ int main(int argc, char *argv[]) int opt = 0; int longIndex = 0; int32 Status; + char * const * argv; + int argc; /* ** Initialize the CommandData struct @@ -176,6 +178,8 @@ int main(int argc, char *argv[]) ** Process the arguments with getopt_long(), then ** start the cFE */ + argc = OS_BSP_GetArgC(); + argv = OS_BSP_GetArgV(); opt = getopt_long( argc, argv, optString, longOpts, &longIndex ); while( opt != -1 ) { @@ -356,6 +360,10 @@ int main(int argc, char *argv[]) CFE_PSP_SetupLocal1Hz(); } +} + +void OS_Application_Run(void) +{ /* ** Let the main thread sleep. ** @@ -377,9 +385,6 @@ int main(int argc, char *argv[]) OS_printf(" with a Poweron Reset ( --reset PO ). \n"); OS_DeleteAllObjects(); - - - return(0); } /****************************************************************************** diff --git a/fsw/pc-rtems/make/build_options.cmake b/fsw/pc-rtems/make/build_options.cmake index ebacf2bd..919675a6 100644 --- a/fsw/pc-rtems/make/build_options.cmake +++ b/fsw/pc-rtems/make/build_options.cmake @@ -1,3 +1,17 @@ +########################################################################## +# +# Build options for "pc-rtems" PSP +# This file specifies any global-scope compiler options when using this PSP +# +########################################################################## + # This indicates where to install target binaries created during the build +# Note - this should be phased out in favor of the staging dir from OSAL BSP set(INSTALL_SUBDIR "eeprom") +# Some upper-level code may be gated on _RTEMS_OS_ being defined +# This is for compatibility with older build scripts which defined this symbol, +# but no CFE/OSAL framework code depends on this symbol. +add_definitions("-D_RTEMS_OS_") + + diff --git a/fsw/pc-rtems/src/cfe_psp_start.c b/fsw/pc-rtems/src/cfe_psp_start.c index 4fd1395a..6e9eb4bb 100644 --- a/fsw/pc-rtems/src/cfe_psp_start.c +++ b/fsw/pc-rtems/src/cfe_psp_start.c @@ -35,20 +35,8 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include -#include #include extern int rtems_fxp_attach(struct rtems_bsdnet_ifconfig *config, int attaching); @@ -62,8 +50,6 @@ extern int rtems_fxp_attach(struct rtems_bsdnet_ifconfig *config, int attaching) #include "cfe_psp_memory.h" #include "cfe_psp_module.h" -#define RTEMS_NUMBER_OF_RAMDISKS 1 - /* * The preferred way to obtain the CFE tunable values at runtime is via @@ -79,28 +65,6 @@ extern int rtems_fxp_attach(struct rtems_bsdnet_ifconfig *config, int attaching) ** Global variables */ -/* - * The RAM Disk configuration. - */ -rtems_ramdisk_config rtems_ramdisk_configuration[RTEMS_NUMBER_OF_RAMDISKS]; - -/* - * The number of RAM Disk configurations. -*/ -size_t rtems_ramdisk_configuration_size = RTEMS_NUMBER_OF_RAMDISKS; - -/* -** RAM Disk IO op table. -*/ -rtems_driver_address_table rtems_ramdisk_io_ops = -{ - .initialization_entry = ramdisk_initialize, - .open_entry = rtems_blkdev_generic_open, - .close_entry = rtems_blkdev_generic_close, - .read_entry = rtems_blkdev_generic_read, - .write_entry = rtems_blkdev_generic_write, - .control_entry = rtems_blkdev_generic_ioctl -}; rtems_id RtemsTimerId; @@ -157,66 +121,7 @@ int timer_count = 0; */ int CFE_PSP_Setup(void) { - int status; - - printf( "\n\n*** RTEMS Info ***\n" ); - printf("%s", _Copyright_Notice ); - printf("%s\n\n", _RTEMS_version ); - printf(" Stack size=%d\n", (int)Configuration.stack_space_size ); - printf(" Workspace size=%d\n", (int) Configuration.work_space_size ); - printf("\n"); - printf( "*** End RTEMS info ***\n\n" ); - - /* - ** Create the RTEMS Root file system - */ - status = rtems_create_root_fs(); - if (status != RTEMS_SUCCESSFUL) - { - printf("Creating Root file system failed: %s\n",rtems_status_text(status)); - return status; - } - - /* - ** create the directory mountpoints - */ - status = mkdir("/ram", S_IFDIR |S_IRWXU | S_IRWXG | S_IRWXO); /* For ramdisk mountpoint */ - if (status != RTEMS_SUCCESSFUL) - { - printf("mkdir failed: %s\n", strerror (errno)); - return status; - } - - status = mkdir("/eeprom", S_IFDIR |S_IRWXU | S_IRWXG | S_IRWXO); /* For EEPROM mountpoint */ - if (status != RTEMS_SUCCESSFUL) - { - printf("mkdir failed: %s\n", strerror (errno)); - return status; - } - - /* - * Register the IDE partition table. - * This is _optional_ depending on whether a block device is present. - */ - status = rtems_bdpart_register_from_disk("/dev/hda"); - if (status != RTEMS_SUCCESSFUL) - { - printf ("Not mounting block device /dev/hda: %s / %s\n", - rtems_status_text (status),strerror(errno)); - } - else - { - printf ("Mounting block device /dev/hda1 on /eeprom\n"); - status = mount("/dev/hda1", "/eeprom", - RTEMS_FILESYSTEM_TYPE_DOSFS, - RTEMS_FILESYSTEM_READ_ONLY, - NULL); - if (status < 0) - { - printf ("Mount /eeprom failed: %s\n", strerror (errno)); - return status; - } - } + rtems_status_code status; /* * Initialize the network. This is also optional and only @@ -293,41 +198,17 @@ void CFE_PSP_SetupSystemTimer(void) ** In a future version this code may be moved into a separate bsp ** integration unit to be more symmetric with the VxWorks implementation. */ -rtems_task Init( - rtems_task_argument ignored -) +void OS_Application_Startup(void) { if (CFE_PSP_Setup() != RTEMS_SUCCESSFUL) { CFE_PSP_Panic(CFE_PSP_ERROR); } - /* - ** Start the shell early, so it can be be used in case a problem occurs - */ - if (rtems_shell_init("SHLL", RTEMS_MINIMUM_STACK_SIZE * 4, 100, "/dev/console", false, false, NULL) < 0) - { - printf ("shell init failed: %s\n", strerror (errno)); - } - - /* give a small delay to let the shell start, - avoids having the login prompt show up mid-test, - and gives a little time for pending output to actually - be sent to the console in case of a slow port */ - rtems_task_wake_after(50); - printf("\n\n\n\n"); - /* ** Run the PSP Main - this will return when init is complete */ CFE_PSP_Main(); - - - /* - ** Wait for anything interesting to happen - ** (any real work should be done by threads spawned during startup) - */ - OS_IdleLoop(); } /****************************************************************************** @@ -396,99 +277,3 @@ void CFE_PSP_Main(void) CFE_PSP_MAIN_FUNCTION(reset_type,reset_subtype, 1, CFE_PSP_NONVOL_STARTUP_FILE); } - -/* configuration information */ - -/* -** RTEMS OS Configuration defintions -*/ -#define TASK_INTLEVEL 0 -#define CONFIGURE_INIT -#define CONFIGURE_INIT_TASK_ATTRIBUTES (RTEMS_FLOATING_POINT | RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_ASR | RTEMS_INTERRUPT_LEVEL(TASK_INTLEVEL)) -#define CONFIGURE_INIT_TASK_STACK_SIZE (64*1024) -#define CONFIGURE_INIT_TASK_PRIORITY 120 - -/* - * Note that these resources are shared with RTEMS itself (e.g. the init task, the shell) - * so they should be allocated slightly higher than the user limits in osconfig.h - * - * Many RTEMS services use tasks internally, including the idle task, BSWP, ATA driver, - * low level console I/O, the shell, TCP/IP network stack, and DHCP (if enabled). - * Many of these also use semaphores for synchronization. - * - * Budgeting for additional: - * 8 internal tasks - * 2 internal timers - * 4 internal queues - * 16 internal semaphores - * - */ -#define CONFIGURE_MAXIMUM_TASKS (OS_MAX_TASKS + 8) -#define CONFIGURE_MAXIMUM_TIMERS (OS_MAX_TIMERS + 2) -#define CONFIGURE_MAXIMUM_SEMAPHORES (OS_MAX_BIN_SEMAPHORES + OS_MAX_COUNT_SEMAPHORES + OS_MAX_MUTEXES + 16) -#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES (OS_MAX_QUEUES + 4) - -/* - * The amount of RAM reserved for the executive workspace. - * This is for the kernel, and is separate from the C program heap. - */ -#define CONFIGURE_EXECUTIVE_RAM_SIZE (2*1024*1024) - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM -#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS (OS_MAX_NUM_OPEN_FILES + 8) - -#define CONFIGURE_FILESYSTEM_RFS -#define CONFIGURE_FILESYSTEM_IMFS -#define CONFIGURE_FILESYSTEM_DOSFS -#define CONFIGURE_FILESYSTEM_DEVFS - -#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK - -#define CONFIGURE_MICROSECONDS_PER_TICK 10000 - -#define CONFIGURE_MAXIMUM_DRIVERS 10 - -#define CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER -#define CONFIGURE_ATA_DRIVER_TASK_PRIORITY 9 - -#define CONFIGURE_MAXIMUM_POSIX_KEYS 4 - -#include - -#define CONFIGURE_SHELL_COMMANDS_INIT -#define CONFIGURE_SHELL_COMMANDS_ALL -#define CONFIGURE_SHELL_MOUNT_MSDOS - -extern int rtems_rtl_shell_command (int argc, char* argv[]); -rtems_shell_cmd_t rtems_shell_RTL_Command = { - .name = "rtl", - .usage = "rtl COMMAND...", - .topic = "misc", - .command = rtems_rtl_shell_command -}; -rtems_shell_cmd_t rtems_shell_dlopen_Command = { - .name = "dlopen", - .usage = "dlopen COMMAND...", - .topic = "misc", - .command = shell_dlopen -}; -rtems_shell_cmd_t rtems_shell_dlsym_Command = { - .name = "dlsym", - .usage = "dlsym COMMAND...", - .topic = "misc", - .command = shell_dlsym -}; -#define CONFIGURE_SHELL_USER_COMMANDS \ - &rtems_shell_RTL_Command, \ - &rtems_shell_dlopen_Command, \ - &rtems_shell_dlsym_Command - - -#include - - From c7e4ce4a78364ba28c76373fbcbb91aed17e2a66 Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" Date: Mon, 20 Apr 2020 11:20:34 -0400 Subject: [PATCH 4/4] Increase version to 1.4.9 and update ReadMe --- README.md | 4 ++++ fsw/mcp750-vxworks/inc/psp_version.h | 2 +- fsw/pc-linux/inc/psp_version.h | 2 +- fsw/pc-rtems/inc/psp_version.h | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7864c932..e9fb5560 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ This is a collection of APIs abstracting platform specific functionality to be l ## Version Notes +- 1.4.9 DEVELOPMENT + - RTEMS builds successfully without errors + - Build script uses a proper CMakeLists.txt instead of the aux_source directory + - Minor updates (see https://github.com/nasa/PSP/pull/153) - 1.4.8 DEVELOPMENT - Minor updates (see https://github.com/nasa/PSP/pull/151) - 1.4.7 DEVELOPMENT diff --git a/fsw/mcp750-vxworks/inc/psp_version.h b/fsw/mcp750-vxworks/inc/psp_version.h index 4423de96..cad71644 100644 --- a/fsw/mcp750-vxworks/inc/psp_version.h +++ b/fsw/mcp750-vxworks/inc/psp_version.h @@ -35,7 +35,7 @@ */ #define CFE_PSP_IMPL_MAJOR_VERSION 1 #define CFE_PSP_IMPL_MINOR_VERSION 4 -#define CFE_PSP_IMPL_REVISION 8 +#define CFE_PSP_IMPL_REVISION 9 #define CFE_PSP_IMPL_MISSION_REV 0 #endif /* _psp_version_ */ diff --git a/fsw/pc-linux/inc/psp_version.h b/fsw/pc-linux/inc/psp_version.h index 4423de96..cad71644 100644 --- a/fsw/pc-linux/inc/psp_version.h +++ b/fsw/pc-linux/inc/psp_version.h @@ -35,7 +35,7 @@ */ #define CFE_PSP_IMPL_MAJOR_VERSION 1 #define CFE_PSP_IMPL_MINOR_VERSION 4 -#define CFE_PSP_IMPL_REVISION 8 +#define CFE_PSP_IMPL_REVISION 9 #define CFE_PSP_IMPL_MISSION_REV 0 #endif /* _psp_version_ */ diff --git a/fsw/pc-rtems/inc/psp_version.h b/fsw/pc-rtems/inc/psp_version.h index 4423de96..cad71644 100644 --- a/fsw/pc-rtems/inc/psp_version.h +++ b/fsw/pc-rtems/inc/psp_version.h @@ -35,7 +35,7 @@ */ #define CFE_PSP_IMPL_MAJOR_VERSION 1 #define CFE_PSP_IMPL_MINOR_VERSION 4 -#define CFE_PSP_IMPL_REVISION 8 +#define CFE_PSP_IMPL_REVISION 9 #define CFE_PSP_IMPL_MISSION_REV 0 #endif /* _psp_version_ */