MMALIB User Guide
MMALIB Build Instructions



Build instructions for MMALIB

Setup
  • Run the executables on EVM using CCS (Code composer studio)
  • Setup needed the compiler for CGT7x
    • export CGT7X_ROOT=${MMALIB_CGT7X_COMPILER_DIR}
  • Setup for HOST EMULATION
    • export C7X_HOST_EMULATION_PATH=${CGT7X_ROOT}/host_emulation
  • Path setup
    • export PATH=${CGT7X_ROOT}/bin:${PATH}
Building an example application with a precompiled MMALIB binary (library)
The SDK will include precompiled debug and release versions of MMALIB as a binary library. Users can build an example application referencing function defined in MMALIB using the following command:
  • Compiling files to run on EVM with release or debug with binary package
    • make scrub; make -j12 TARGET_CPU={C7100, C7120} LINK_LIBS=1 {module folder, example cnn_c7xmma}/{component name, example MMALIB_CNN_convolve_row_ixX_ixX_oxX} TEST_CASE=13 TEST_ENV=EVM CHECKPARAMS=1 SOC={J7ES, J7AEP, J7AHP}
  • Compile the individual test on host emulation with binary package
    • make -j12 TARGET_SCPU=C7100 TARGET_CPU=x86_64 TARGET_PLATFORM=PC LINK_LIBS=1 {module folder, example cnn_c7xmma}/{component name, example MMALIB_CNN_convolve_row_ixX_ixX_oxX} TEST_CASE=13 CHECKPARAMS=1 SOC=J7ES
Run
  • Execute a test case on host
    • ./out/x86_64/release/cnn_c7xmma/MMALIB_CNN_convolve_row_ixX_ixX_oxX_x86_64
  • Execute a test case on target
    • Executing the test case on EVM is done by loading binary generated via JTAG using CCS (Code Composer Studio) out/C7100/release/cnn_c7xmma/MMALIB_CNN_convolve_row_ixX_ixX_oxX_C7100.out