Skip to content

Commit

Permalink
Merge pull request #2098 from nasa/integration-candidate
Browse files Browse the repository at this point in the history
cFE Integration candidate: Caelum-rc4_dev9
  • Loading branch information
astrogeco authored May 19, 2022
2 parents 81416f8 + c3840ad commit 0b90217
Show file tree
Hide file tree
Showing 11 changed files with 309 additions and 147 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/build-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
checkout-and-cache:
name: Custom checkout and cache for cFS documents
needs: checks-for-duplicates
if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }}
if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' || contains(github.ref, 'main') }}
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
target: "[\"cfe-usersguide\"]"
cache-key: cfs-doc-${{ github.run_number }}
buildpdf: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
deploy: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
deploy: false # Note can't use cache with deploy, deploy in following job instead

build-mission-doc:
needs: checkout-and-cache
Expand All @@ -65,3 +65,28 @@ jobs:
cache-key: cfs-doc-${{ github.run_number }}
deploy: false
buildpdf: false # No need for mission pdf within cFE, done at bundle level

deploy-documentation:
needs: build-cfe-usersguide
if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
name: Deploy documentation to gh-pages
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/download-artifact@v3

- name: Display structure of downloaded files
run: ls -R

- name: Move pdfs to deployment directory
run: mkdir deploy; mv */*.pdf deploy

- name: Deploy to GitHub
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: deploy
SINGLE_COMMIT: true
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ The detailed cFE user's guide can be viewed at <https://github.com/nasa/cFS/blob

## Changelog

### Development Build: v7.0.0-rc4+dev127

- Update RTEMS toolchain files
- Add support for fractional seconds in epoch
- Add truncation warning suppression flags
- Deploy docs from local workflow on main branch push
- Remove redundant word in App Developers Guide
- UT updates for alternate time configuration
- See <https://github.com/nasa/cFE/pull/2098> and <https://github.com/nasa/cFS/pull/471>

### Development Build: v7.0.0-rc4+dev110

- Only increment SB InternalErrorCounter on errors
Expand Down
18 changes: 10 additions & 8 deletions cmake/sample_defs/arch_build_custom.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@
# and uses the same warning options that are applied at the mission level.
#
add_compile_options(
-std=c99 # Target the C99 standard (without gcc extensions)
-pedantic # Issue all the warnings demanded by strict ISO C
-Wall # Warn about most questionable operations
-Wstrict-prototypes # Warn about missing prototypes
-Wwrite-strings # Warn if not treating string literals as "const"
-Wpointer-arith # Warn about suspicious pointer operations
-Wcast-align # Warn about casts that increase alignment requirements
-Werror # Treat warnings as errors (code should be clean)
-std=c99 # Target the C99 standard (without gcc extensions)
-pedantic # Issue all the warnings demanded by strict ISO C
-Wall # Warn about most questionable operations
-Wstrict-prototypes # Warn about missing prototypes
-Wwrite-strings # Warn if not treating string literals as "const"
-Wpointer-arith # Warn about suspicious pointer operations
-Wcast-align # Warn about casts that increase alignment requirements
-Werror # Treat warnings as errors (code should be clean)
-Wno-format-truncation # Inhibit printf-style format truncation warnings
-Wno-stringop-truncation # Inhibit string operation truncation warnings
)

2 changes: 2 additions & 0 deletions cmake/sample_defs/sample_mission_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,14 @@
** Hour - 0 to 23
** Minute - 0 to 59
** Second - 0 to 59
** Micros - 0 to 999999
*/
#define CFE_MISSION_TIME_EPOCH_YEAR 1980
#define CFE_MISSION_TIME_EPOCH_DAY 1
#define CFE_MISSION_TIME_EPOCH_HOUR 0
#define CFE_MISSION_TIME_EPOCH_MINUTE 0
#define CFE_MISSION_TIME_EPOCH_SECOND 0
#define CFE_MISSION_TIME_EPOCH_MICROS 0

/**
** \cfetimecfg Time File System Factor
Expand Down
79 changes: 48 additions & 31 deletions cmake/sample_defs/toolchain-i686-rtems4.11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,63 @@ set(CMAKE_SYSTEM_NAME RTEMS)
set(CMAKE_SYSTEM_PROCESSOR i386)
set(CMAKE_SYSTEM_VERSION 4.11)

# The RTEMS BSP that will be used for this build
set(RTEMS_BSP "pc686")

# these settings are specific to cFE/OSAL and determines which
# abstraction layers are built when using this toolchain
SET(CFE_SYSTEM_PSPNAME pc-rtems)
SET(OSAL_SYSTEM_BSPTYPE pc-rtems)
SET(OSAL_SYSTEM_OSTYPE rtems)

# This is for version specific RTEMS ifdefs needed by the OSAL and PSP
ADD_DEFINITIONS(-DOS_RTEMS_4_DEPRECATED)

# RTEMS_DYNAMIC_LOAD definition:
# - Set to FALSE for platforms that create a RTEMS executable and link it
# to the cFE core.
# - Set to TRUE for platforms that expect the cFE core to to be dynamically
# loaded into an existing runtime image.
# This is tied to the OSAL-BSP and PSP implementation so generally cannot
# be switched on a specific OSAL/PSP platform without modifications.
set(RTEMS_DYNAMIC_LOAD FALSE)

set(RTEMS_BSP_C_FLAGS "-march=i686 -mtune=i686 -fno-common")
set(RTEMS_BSP_CXX_FLAGS ${RTEMS_BSP_C_FLAGS})
set(RTEMS_BSP_SPECS_FLAGS "-specs bsp_specs")

# This define is deprecated and will be removed
ADD_DEFINITIONS(-D_RTEMS_411_)

# Info regarding the RELOCADDR:
#+--------------------------------------------------------------------------+
#| Set the value of RELOCADDR to the address where you want your image to
#| load. If you'll be using GRUB to load the images it will have to be >=
#| 0x100000 (1024K). If you are using NetBoot to load the images it can be
#| >= 0x10000 (64K) AND <= 0x97C00 (607K) OR >= 0x100000 (1024K). The memory
#| top is of course another limit. Make sure there is enough space before the
#| upper memory limits for the image and the memory allocated by it to fit.
#| Make sure the value you choose is aligned to 4 bytes.
#+--------------------------------------------------------------------------+
set(RTEMS_RELOCADDR 0x00100000)

# Exception handling is very iffy. These two options disable eh_frame creation.
set(CMAKE_C_COMPILE_OPTIONS_PIC -fno-exceptions -fno-asynchronous-unwind-tables)

#+---------------------------------------------------------------------------+
#| Common RTEMS toolchain statements
#+---------------------------------------------------------------------------+
# The TOOLS and BSP are allowed to be installed in different locations.
# If the README was followed they will both be installed under $HOME
# By default it is assumed the BSP is installed to the same directory as the tools
SET(RTEMS_TOOLS_PREFIX "$ENV{HOME}/rtems-${CMAKE_SYSTEM_VERSION}" CACHE PATH
SET(RTEMS_TOOLS_PREFIX "$ENV{HOME}/rtems-${CMAKE_SYSTEM_VERSION}" CACHE PATH
"RTEMS tools install directory")
SET(RTEMS_BSP_PREFIX "${RTEMS_TOOLS_PREFIX}" CACHE PATH
SET(RTEMS_BSP_PREFIX "${RTEMS_TOOLS_PREFIX}" CACHE PATH
"RTEMS BSP install directory")

# The BSP that will be used for this build
set(RTEMS_BSP "pc686")

# specify the cross compiler - adjust accord to compiler installation
# This uses the compiler-wrapper toolchain that buildroot produces
SET(SDKHOSTBINDIR "${RTEMS_TOOLS_PREFIX}/bin")
set(TARGETPREFIX "${CMAKE_SYSTEM_PROCESSOR}-rtems${CMAKE_SYSTEM_VERSION}-")
set(RTEMS_BSP_C_FLAGS "-march=i686 -mtune=i686 -fno-common")
set(RTEMS_BSP_CXX_FLAGS ${RTEMS_BSP_C_FLAGS})

SET(CMAKE_C_COMPILER "${RTEMS_TOOLS_PREFIX}/bin/${TARGETPREFIX}gcc")
SET(CMAKE_CXX_COMPILER "${RTEMS_TOOLS_PREFIX}/bin/${TARGETPREFIX}g++")
Expand All @@ -42,9 +82,6 @@ SET(CMAKE_AR "${RTEMS_TOOLS_PREFIX}/bin/${TARGETPREFIX}ar")
SET(CMAKE_OBJDUMP "${RTEMS_TOOLS_PREFIX}/bin/${TARGETPREFIX}objdump")
SET(CMAKE_OBJCOPY "${RTEMS_TOOLS_PREFIX}/bin/${TARGETPREFIX}objcopy")

# Exception handling is very iffy. These two options disable eh_frame creation.
set(CMAKE_C_COMPILE_OPTIONS_PIC -fno-exceptions -fno-asynchronous-unwind-tables)

# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

Expand All @@ -53,23 +90,3 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

SET(CMAKE_PREFIX_PATH /)

# these settings are specific to cFE/OSAL and determines which
# abstraction layers are built when using this toolchain
SET(CFE_SYSTEM_PSPNAME pc-rtems)
SET(OSAL_SYSTEM_BSPTYPE pc-rtems)
SET(OSAL_SYSTEM_OSTYPE rtems)

# Info regarding the RELOCADDR:
#+--------------------------------------------------------------------------+
#| Set the value of RELOCADDR to the address where you want your image to
#| load. If you'll be using GRUB to load the images it will have to be >=
#| 0x100000 (1024K). If you are using NetBoot to load the images it can be
#| >= 0x10000 (64K) AND <= 0x97C00 (607K) OR >= 0x100000 (1024K). The memory
#| top is of course another limit. Make sure there is enough space before the
#| upper memory limits for the image and the memory allocated by it to fit.
#| Make sure the value you choose is aligned to 4 bytes.
#+--------------------------------------------------------------------------+
set(RTEMS_RELOCADDR 0x00100000)


91 changes: 52 additions & 39 deletions cmake/sample_defs/toolchain-i686-rtems5.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,67 @@ set(CMAKE_SYSTEM_NAME RTEMS)
set(CMAKE_SYSTEM_PROCESSOR i386)
set(CMAKE_SYSTEM_VERSION 5)

# The RTEMS BSP that will be used for this build
set(RTEMS_BSP "pc686")

# these settings are specific to cFE/OSAL and determines which
# abstraction layers are built when using this toolchain
SET(CFE_SYSTEM_PSPNAME pc-rtems)
SET(OSAL_SYSTEM_BSPTYPE pc-rtems)
SET(OSAL_SYSTEM_OSTYPE rtems)

# This is for version specific RTEMS ifdefs needed by the OSAL and PSP
ADD_DEFINITIONS(-DOS_RTEMS_5)

# RTEMS_DYNAMIC_LOAD definition:
# - Set to FALSE for platforms that create a RTEMS executable and link it
# to the cFE core.
# - Set to TRUE for platforms that expect the cFE core to to be dynamically
# loaded into an existing runtime image.
# This is tied to the OSAL-BSP and PSP implementation so generally cannot
# be switched on a specific OSAL/PSP platform without modifications.
set(RTEMS_DYNAMIC_LOAD FALSE)

set(RTEMS_BSP_C_FLAGS "-march=i686 -mtune=i686 -fno-common")
set(RTEMS_BSP_CXX_FLAGS ${RTEMS_BSP_C_FLAGS})
set(RTEMS_BSP_SPECS_FLAGS "-specs bsp_specs")

# This define is deprecated and will be removed
ADD_DEFINITIONS(-D_RTEMS_5_)

# Info regarding the RELOCADDR:
#+--------------------------------------------------------------------------+
#| Set the value of RELOCADDR to the address where you want your image to
#| load. If you'll be using GRUB to load the images it will have to be >=
#| 0x100000 (1024K). If you are using NetBoot to load the images it can be
#| >= 0x10000 (64K) AND <= 0x97C00 (607K) OR >= 0x100000 (1024K). The memory
#| top is of course another limit. Make sure there is enough space before the
#| upper memory limits for the image and the memory allocated by it to fit.
#| Make sure the value you choose is aligned to 4 bytes.
#+--------------------------------------------------------------------------+
set(RTEMS_RELOCADDR 0x00100000)

# Exception handling is very iffy. These two options disable eh_frame creation.
set(CMAKE_C_COMPILE_OPTIONS_PIC -fno-exceptions -fno-asynchronous-unwind-tables)

# Link libraries needed for a RTEMS 5+ executable
# This was handled by the bsp_specs file in 4.11
set(LINK_LIBRARIES "-lrtemsdefaultconfig -lrtemsbsp -lrtemscpu")

#+---------------------------------------------------------------------------+
#| Common RTEMS toolchain statements
#+---------------------------------------------------------------------------+
# The TOOLS and BSP are allowed to be installed in different locations.
# If the README was followed they will both be installed under $HOME
# By default it is assumed the BSP is installed to the same directory as the tools
SET(RTEMS_TOOLS_PREFIX "$ENV{HOME}/rtems-${CMAKE_SYSTEM_VERSION}" CACHE PATH
SET(RTEMS_TOOLS_PREFIX "$ENV{HOME}/rtems-${CMAKE_SYSTEM_VERSION}" CACHE PATH
"RTEMS tools install directory")
SET(RTEMS_BSP_PREFIX "${RTEMS_TOOLS_PREFIX}" CACHE PATH
SET(RTEMS_BSP_PREFIX "${RTEMS_TOOLS_PREFIX}" CACHE PATH
"RTEMS BSP install directory")

# The BSP that will be used for this build
set(RTEMS_BSP "pc686")

# specify the cross compiler - adjust accord to compiler installation
# This uses the compiler-wrapper toolchain that buildroot produces
SET(SDKHOSTBINDIR "${RTEMS_TOOLS_PREFIX}/bin")
set(TARGETPREFIX "${CMAKE_SYSTEM_PROCESSOR}-rtems${CMAKE_SYSTEM_VERSION}-")
set(RTEMS_BSP_C_FLAGS "-march=i686 -mtune=i686 -fno-common")
set(RTEMS_BSP_CXX_FLAGS ${RTEMS_BSP_C_FLAGS})


SET(CMAKE_C_COMPILER "${RTEMS_TOOLS_PREFIX}/bin/${TARGETPREFIX}gcc")
SET(CMAKE_CXX_COMPILER "${RTEMS_TOOLS_PREFIX}/bin/${TARGETPREFIX}g++")
Expand All @@ -43,13 +86,6 @@ SET(CMAKE_AR "${RTEMS_TOOLS_PREFIX}/bin/${TARGETPREFIX}ar")
SET(CMAKE_OBJDUMP "${RTEMS_TOOLS_PREFIX}/bin/${TARGETPREFIX}objdump")
SET(CMAKE_OBJCOPY "${RTEMS_TOOLS_PREFIX}/bin/${TARGETPREFIX}objcopy")

# Exception handling is very iffy. These two options disable eh_frame creation.
set(CMAKE_C_COMPILE_OPTIONS_PIC -fno-exceptions -fno-asynchronous-unwind-tables)

# Link libraries needed for an RTEMS 5.x executable
# This was handled by the bsp_specs file in 4.11
set(LINK_LIBRARIES "-lrtemsdefaultconfig -lrtemsbsp -lrtemscpu")

# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

Expand All @@ -58,26 +94,3 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

SET(CMAKE_PREFIX_PATH /)

# these settings are specific to cFE/OSAL and determines which
# abstraction layers are built when using this toolchain
SET(CFE_SYSTEM_PSPNAME pc-rtems)
SET(OSAL_SYSTEM_BSPTYPE pc-rtems)
SET(OSAL_SYSTEM_OSTYPE rtems)

# This is for RTEMS 5 specific ifdefs needed by the OSAL
ADD_DEFINITIONS(-D_RTEMS_5_)

# Info regarding the RELOCADDR:
#+--------------------------------------------------------------------------+
#| Set the value of RELOCADDR to the address where you want your image to
#| load. If you'll be using GRUB to load the images it will have to be >=
#| 0x100000 (1024K). If you are using NetBoot to load the images it can be
#| >= 0x10000 (64K) AND <= 0x97C00 (607K) OR >= 0x100000 (1024K). The memory
#| top is of course another limit. Make sure there is enough space before the
#| upper memory limits for the image and the memory allocated by it to fit.
#| Make sure the value you choose is aligned to 4 bytes.
#+--------------------------------------------------------------------------+
set(RTEMS_RELOCADDR 0x00100000)


Loading

0 comments on commit 0b90217

Please sign in to comment.