C++ Code Generation on NVIDIA Jetson - Tunable parameters and .elf file

3 views (last 30 days)
Hello,
So I have a C++ Code generated from a compiled Simulink (MATLAB R2020b) Model using the NVIDIA Jetson support package. So when I do "Build, deploy and start" everything works fine as expected. Then I stop the process, change the model parameters arguments (some lookups I want to modify before running the code on the target hardware), I do the command to generate the elf file again :
touch -c {Working_Dir}/GPU_Apps_dev_ert_rtw/*.*;make -f GPU_Apps_dev.mk -j4 all MATLAB_WORKSPACE="/home/nvidia/MATLAB_ws/R2022b" -C {Working_Dir}/GPU_Apps_dev_ert_rtw
Which is successful, but somehow the changes I made aren't applied. I'm wondering how I can tune my lookups and then apply them? Do I need to build again on the target? How can I do that? Or other options. Thanks.

Answers (1)

Jeff Harper
Jeff Harper on 6 Dec 2024
It looks to me like it is probably necessary to recompile and redownload the code after changing the parameters. If you were to use a test plan in Simulink Test's Test Manager, you could do a parameter override, in which case it should take care of appropriate rebuilds, as needed. It would be necessary to ensure that the parameters are tunable.
Note, if you are running MATLAB and the code generation on a Windows machine, you should also see a <model>.bat file beting created in the model's build directory. That batch file can be used to recompile the code.
  1 Comment
Frédéric
Frédéric on 9 Dec 2024
Edited: Frédéric on 9 Dec 2024
Thanks Jeff for your reply. The thing is, this code is embedded on a Jetson target and I can't recompile and redownload everytime I change my parameters on the device. I tried multiple configuration with all parameters Tunable in the Simulink Configuration or model arguments with different storage class but couldn't find the right one yet. Is there a configuration for model arguments that would allow that? It seems like it's possible but I couldn't quite find an example or a clear explanation for C++ generated code.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!