Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tables are not built for static apps #835

Closed
SymmetricDesigns opened this issue Aug 24, 2020 · 0 comments · Fixed by #987
Closed

Tables are not built for static apps #835

SymmetricDesigns opened this issue Aug 24, 2020 · 0 comments · Fixed by #987
Assignees
Labels
Milestone

Comments

@SymmetricDesigns
Copy link

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

@skliper skliper added the bug label Aug 24, 2020
@skliper skliper added this to the 7.0.0 milestone Aug 24, 2020
astrogeco added a commit that referenced this issue Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants