Skip to content

Trick Variable Mapping Compiler

jwpetti1 edited this page Jul 6, 2023 · 2 revisions

The Trick Variable Mapping Compiler (TVMC) is a python program that parses JSON formatted .tvm definition files to generate C code. This generated C code completes the TVSIO CFS app.

Running TVMC Manually

python3 tvmc.py TVM_FILE1 [TVM_FILE2 ... ] --output DIRECTORY

Options

  • -o, --output DIRECTORY
    • Output directory for generated code files
  • list of .tvm files

Output

TVMC outputs a C code file and header generated from the tvm files.

  • outputDirectory/tvs_io_generated.c
  • outputDirectory/tvs_io_generated.h

Adding TVMC to CFS makefile

Included with TVS_IO is a file named CMakeList.txt. Once the TVS_IO app is properly added to the CFS build process like any other CFS app, the CMakeLists.txt has all that should be needed. See the tvsio_cfs project for an example of TVS_IO added to a CFS mission.

Default TVM directory

<cfs_root>/apps/inc/tvm_files

Default Output directory

TODO: add