Skip to content

Tables are not built for static apps #835

@SymmetricDesigns

Description

@SymmetricDesigns

Describe the bug
Tables are not built for static apps, only dynamic apps.
(only for apps in TGT<x>_APPLIST, not for apps in TGT<x>_STATIC_APPLIST)

Expected behavior
Tables should be built for both types of apps

Code snips
add_cfe_tables() loops over APP_INSTALL_LIST:
cfs/cmake/arch_build.cmake/line:120:

    foreach(TGT ${APP_INSTALL_LIST})
     <... snip ...>
      # IMPORTANT: This rule assumes that the output filename of elf2cfetbl matches
      # the input file name but with a different extension (.o -> .tbl)
      # The actual output filename is embedded in the source file (.c), however
      # this must match and if it does not the build will break.  That's just the
      # way it is, because NO make system supports changing rules based on the
      # current content of a dependency (rightfully so).
      add_custom_command(
        OUTPUT "${TABLE_DESTDIR}/${TBLWE}.tbl"
        COMMAND ${CMAKE_C_COMPILER} ${TBL_CFLAGS} -c -o ${TBLWE}.o ${TBL_SRC}
        COMMAND ${MISSION_BINARY_DIR}/tools/elf2cfetbl/elf2cfetbl ${TBLWE}.o
        DEPENDS ${MISSION_BINARY_DIR}/tools/elf2cfetbl/elf2cfetbl ${TBL_SRC}
        WORKING_DIRECTORY ${TABLE_DESTDIR}
      )
      # Create the install targets for all the tables
      install(FILES ${TABLE_DESTDIR}/${TBLWE}.tbl DESTINATION ${TGT}/${INSTALL_SUBDIR})
    endforeach(TGT ${APP_INSTALL_LIST})

But, process_arch() doesn't populate APP_INSTALL_LIST for static apps:
cfs/cmake/arch_build.cmake/line:445:

  set(APP_INSTALL_LIST)
  foreach(APP ${TGTSYS_${SYSVAR}_STATICAPPS})
    message(STATUS "Building Static App: ${APP}")
    add_subdirectory("${${APP}_MISSION_DIR}" apps/${APP})
  endforeach()

only for dynamic apps:
cfs/cmake/arch_build.cmake/line:473:

  foreach(APP ${TGTSYS_${SYSVAR}_APPS})
    set(APP_INSTALL_LIST ${TGTLIST_${APP}})
    message(STATUS "Building App: ${APP} install=${APP_INSTALL_LIST}")
    add_subdirectory("${${APP}_MISSION_DIR}" apps/${APP})
  endforeach()

System observed on:

  • cFE 6.7

Reporter Info
David DeGroote
Flight Software Engineer
1016 N.Lincoln Avenue
Pittsburgh, PA 15233
Dave.DeGroote@astrobotic.com

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions