How to bring absolute path of code replacement library to makefile generated during Software In Loop build?

35 views (last 30 days)
I use a Code replacement library but in a directory outside the Simulink Project root folder. Hence, the path is metioned relatively. This creates a problem in build because, the INCLUDES_BUILDINFO contains now relative path.
simple question is: How to absolutize the relative path of code replacement library in makefile generated during Software In Loop build?
note: Code generation is successful, only Build fails.

Answers (1)

Yashwanth
Yashwanth on 14 Jan 2026 at 9:57
Hi Noufal,
If you’re managing paths via Simulink Project, reference project variables in your include directories (e.g., Custom Code > Include directories) and let Simulink expand to absolute paths during build:
  • Use $(PROJECT_ROOT) or a custom variable (e.g., $(CRL_DIR)) defined in Project Files > Settings > Project Paths/Variables.
  • In model config: Include directories = $(CRL_DIR)/include
During code generation and build, Simulink replaces these tokens with absolute paths, which resolves the makefile issue.

Categories

Find more on Test Model Components in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!