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

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.

Respuestas (1)

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.

Categorías

Más información sobre Simulink Coder en Centro de ayuda y File Exchange.

Productos

Versión

R2020b

Preguntada:

el 7 de En. de 2026

Respondida:

el 14 de En. de 2026

Community Treasure Hunt

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

Start Hunting!

Translated by