Relative path to project root in model Configuration Paramters

4 visualizzazioni (ultimi 30 giorni)
Hello everyone,
I'm using the simulink hardware support package for Texas Instrument C2000 processors and I'm looking for a way to set a relative path to my project root for a hardware configuration file :
I've tried several things that didn't work like :
../../UTILITIES/MyFile.ccxml
$(PROJECT_ROOT)/UTILITIES/MyFile.ccxml
I get the following error when building :
The following error occurred during deployment to your hardware board: The path '$(PROJECT_ROOT)\UTILITIES\F28379D_XDS510USB.ccxml' does not exist.
Component:Simulink | Category:Block diagram error
Thanks in advance !

Risposta accettata

Alex LeBlanc
Alex LeBlanc il 20 Gen 2023
Modificato: Alex LeBlanc il 25 Gen 2023
I know your post was a couple of years ago, but in case this can help others, here's a solution I found that works for me. My model's InitFcn callback is set to a config script and I added the following code to it. You'd just need to modify slightly for your application.
cs = getActiveConfigSet(gcs);
ctd = get_param(cs, 'CoderTargetData');
ctd.Runtime.LoadCommandArg = [pwd, '\my_file.ccxml'];
set_param(cs, 'CoderTargetData', ctd);

Più risposte (0)

Categorie

Scopri di più su Deployment, Integration, and Supported Hardware in Help Center e File Exchange

Prodotti


Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by