TEXAS INSTRUMENTS
ModelZoo · Deploying to an SDK Example
The 4 Files and Where They Go
Copy them from one run folder (data/projects/<dataset>/run/<date-time>/<model>/) into the imported SDK project, keeping the same names
FileFrom the run folderInto the CCS projectWhat it does
mod.acompilation/artifacts/mod.aartifacts/mod.aCompiled model library, built for one device
tvmgen_default.hcompilation/artifacts/tvmgen_default.hartifacts/tvmgen_default.hModel API (tvmgen_default_run) and input bias/scale/shift
user_input_config.htraining/quantization/golden_vectors/user_input_config.hConfigures the SDK feature-extraction library to match training
test_vector.ctraining/quantization/golden_vectors/test_vector.cRaw input, expected features and expected output (golden_output) for a few samples
Shortcut: compilation/<date-time>_<model>_<device>.zip already bundles the matching set: artifacts/, golden_vectors/, plus model_aux.h (class names). Unzip and copy from there.
Use the quantized golden vectors. mod.a is compiled from training/quantization/model.onnx. The training/base/ golden vectors are float outputs of the float model and will not match.
Adithya Thonse · October 2026
ModelZoo · Deploying to an SDK Example
The One Rule: All Four From the Same Run
Golden outputs and normalization parameters are tied to the trained weights. Two runs of the same config still differ
SDK arc_fault example vs. a fresh dc_arc_fault/config_dsk.yaml run (CLS_1k_NPU, F28P55)
FileSDK exampleFresh run
user_input_config.hidentical #defines (same config)same
golden_output{ 43, -52 }{ 61, -73 }differs
tvmgen_default_bias_data20.71055820.517256differs
mod.a weightsretrained, so differentdiffers
Replacing only mod.a (or only test_vector.c) gives a project that builds fine but fails the check.
Do
Copy all four files from one <date-time>/<model>/ folder, or from its compilation zip.
Quick check
The header of tvmgen_default.h names its source model: input model file: .../<model>/training/quantization/model.onnx. That path should be the same run as your golden vectors.
Leave the rest of the example alone
application_main.c, .syscfg and lnk.cmd are generic. What makes an example "arc fault" lives in the four files.
Adithya Thonse · October 2026
ModelZoo · Deploying to an SDK Example
Step 1: Pick the SDK and the Example
The SDK follows common.target_device; the example follows common.task_type
SDK by target_device
target_deviceSDKExamples underDevice folder
F28P55, F28P65, F28004, F28003C2000Ware 6.01libraries/ai/examples/f28p55x/ …
F29H85F29H85x SDK 1.04examples/ai/f29h85x/
MSPM33C32MSPM33 SDK 1.03examples/ai/mspm33c321a/
AM13E2MCU-SDK 1.00examples/ai/(single)
AM263MCU-PLUS-SDK 11.03examples/ai/am263x_lp/
mod.a is compiled for one device (instruction set, NPU or not). Use the device folder that matches the run's target_device.
Example by task_type (any one works)
TaskExamples
Classificationgeneric_timeseries_classification, arc_fault, motor_fault, blower_imbalance
Regressiongeneric_timeseries_regression, torque_measurement, washing_machine_load_weighing
Forecastinggeneric_timeseries_forecasting, forecasting_pmsm_rotor_temp, hvac_indoor_temp_forecast
Anomaly detectiongeneric_timeseries_anomalydetection, fan_blade_anomalydetection
Within a task, the examples share the same application_main.c. Pick the one named after your application, or the generic_* one.
Adithya Thonse · October 2026
ModelZoo · Deploying to an SDK Example
Steps 2–3: Import the Example, Replace the Files
The project spec copies the example files into your CCS workspace, so you edit the workspace copy and the SDK install stays untouched
Import in Code Composer Studio
  • View → Resource Explorer
  • Filter by board (e.g. LAUNCHXL-F28P55X), search the example (e.g. f28p55x_arc_fault)
  • Import, and install the dependencies it asks for
f28p55x_arc_fault/ # imported project ├── application_main.c # leave as is ├── artifacts/ │ ├── mod.a <- replace │ └── tvmgen_default.h <- replace ├── test_vector.c <- replace ├── user_input_config.h <- replace ├── c2000.syscfg # board + NPU init └── lnk.cmd # memory map
Copy the 4 files over the originals
RUN=data/projects/<dataset>/run/<date-time>/<model> PRJ=<ccs_workspace>/f28p55x_arc_fault cp $RUN/compilation/artifacts/mod.a $PRJ/artifacts/ cp $RUN/compilation/artifacts/tvmgen_default.h $PRJ/artifacts/ cp $RUN/training/quantization/golden_vectors/test_vector.c $PRJ/ cp $RUN/training/quantization/golden_vectors/user_input_config.h $PRJ/ # Windows: drag and drop in Explorer or the CCS Project Explorer
AM13E2: the project links artifacts/mod_m33_ti_arm_clang.a. Copy mod.a in under that name.
Adithya Thonse · October 2026
ModelZoo · Deploying to an SDK Example
Step 4: Build, Flash and Read the Result
The example runs two checks on the active SET of test_vector.c, each within ±1
  • Project → Build Project
  • Set the active target to the LaunchPad config, e.g. TMS320F28P550SJ9_LaunchPad.ccxml
  • Run → Debug Project (flashes the board), watch test_result, press Continue
Expected console (CIO)
Feature extraction mismatches 0 All tests have passed. Golden vectors matched: 2 not matched: 0
test_result = 1 (PASS). The matched count equals the number of model outputs (FE_NN_OUT_SIZE).
More sets: wrap SET 0 in /* */, unwrap another SET (one at a time), rebuild, flash. Each array is commented with its class and sample index.
raw_input_test ─► FE_runFeatureExtract ─► model_input ─► tvmgen_default_run ─► model_output │ │ check 1: vs model_test_input check 2: vs golden_output
Check 1 · feature extraction
The SDK library, set up by user_input_config.h, must reproduce the PC features. Non-zero count: look at user_input_config.h / test_vector.c.
Check 2 · model
The compiled model must reproduce the PC output. Mismatch with check 1 at 0: look at mod.a / tvmgen_default.h. On NPU devices the app first waits for tvmgen_default_finished.
Anomaly detection is different
Outputs may deviate by up to 4; the reconstruction error is compared with RECONSTRUCTION_ERROR_THRESHOLD from user_input_config.h. Here test_result means 1 = anomaly, 0 = normal.
Adithya Thonse · October 2026
ModelZoo · Deploying to an SDK Example
When It Does Not Match
Read the two console counts first: they tell you which files to look at
SymptomLikely causeFix
Feature extraction mismatches > 0user_input_config.h and test_vector.c from different runs, or an older SDKCopy both from one golden_vectors/; use the recommended SDK version
FE mismatches 0, not matched > 0mod.a from another run, or base/ golden vectors with the quantized mod.aAll four from one run; golden vectors from training/quantization/ (or the zip)
Type errors on model_input_t / model_output_tSKIP_NORMALIZE / OUTPUT_INT in user_input_config.h switch them to int8_tUse the user_input_config.h that matches mod.a
Undefined tvmgen_default_run, incompatible objectmod.a built for another device; AM13 file nameRe-run with the right target_device; AM13: mod_m33_ti_arm_clang.a
RECONSTRUCTION_ERROR_THRESHOLD undeclaredAnomaly-detection user_input_config.h is missing its definesCheck the file has the FE defines and the threshold; regenerate the run if it is empty
Hangs at while (!tvmgen_default_finished)NPU model, but the NPU is not initializedKeep the NPU module in the .syscfg (C2000) or TI_NPU_init() (F29H85)
Linker: section does not fitModel or feature extraction larger than the example'sStart from an example with a similar FE preset; adjust lnk.cmd
After it passes: keep the feature-extraction and tvmgen_default_run calls, and feed fe_handle->input_buffer from your ADC/sensor instead of raw_input_test. Full walkthrough: docs/DEPLOYING_TO_SDK_EXAMPLE.md.
Adithya Thonse · October 2026