fupsrl

01 — Offline Build: Requirements and First Run

2 min read Updated 15 July 2026

This chapter takes a model from Simulink to a matched ELF, A2L, HEX, and INCA ProF package without connecting a target board. The default workflow is a local, offline, generic Linux cross-build.

Host requirements

  • MATLAB/Simulink R2024b and Embedded Coder.
  • Windows with a Debian/Ubuntu WSL distribution for the default local cross-build, or a native Linux-compatible toolchain selected explicitly.
  • A project model that can generate ERT code. Standard Simulink blocks work with the generic configuration.
  • No board, SSH connection, target password, or Raspberry Pi Support Package for the build-only flow.

First build

cfg = xcpWorkflow("Model", "xcpMultiRateTest", ...
    "XcpHost", "192.168.1.50");

The command temporarily applies an unsaved generic ERT configuration, generates model code, stages the model and the pinned XCPlite snapshot, cross-compiles locally, resolves DWARF addresses for the A2L, then creates the HEX and ProF package. The saved model configuration is restored afterwards.

What MATLAB writes

Location Purpose
xcp_build/ Temporary source staging tree. It is recreated for the next build.
xcp_out/<model> Unstripped debug ELF. It is retained so address and debug information can be used during A2L generation.
xcp_out/<model>.runtime Debug-stripped runtime ELF used for deployment and virtual flashing.
xcp_out/<model>.a2l INCA/CANape XCP description.
xcp_out/<model>.hex Complete EPK, calibration-default, and application image.
xcp_out/<model>_XCP_Flash_ProF/ INCA flash configuration; a ZIP copy is generated too.

Build another model

cfg = xcpWorkflow("Model", "xcpMultiRateTestV2", ...
    "Deploy", false, ...
    "Offline", true);

For legacy models that read base-workspace parameters, the default ModelInitScript="auto" runs modelParams.m from the project root when it exists. Move configuration into a data dictionary/model workspace or set ModelInitScript="" when no script is needed.

First-run toolchain setup

With AutoProvisionToolchain=true, the workflow can install a missing compiler package in the selected WSL distribution. This is a one-time host setup, not a connection to the board. Set WslDistribution when the intended distribution is not the default one. Set AutoProvisionToolchain=false only when the compiler is managed separately.

When a board is required

A board becomes necessary only when you deploy, execute, validate GPIO mapping, measure real-time behaviour, or connect INCA/CANape to the running XCP service. Use Deploy=true and Offline=false for that separate step.