Why is "Navigate to C/C++" greyed out?

3 visualizzazioni (ultimi 30 giorni)
MrPowerElectronics
MrPowerElectronics il 9 Nov 2021
Risposto: Rajanya il 3 Feb 2025
I am trying to use the Code Perspective to analyse where certain variables within my Simulink block diagram are located in the resulting C code. I can succesfully click on code line numbers in the C code panel and Simulink navigates to the corresponding Simulink blocks.
Unfortunately, the reverse does not seem to be possible. When I right-click on a block and go to C/C++ Code > Navigate to C/C++, this option is greyed out.
Does anyone know why this happens and how I can enable it?
  1 Commento
Akshaya
Akshaya il 19 Ott 2023
I have the same issue.
Any answer?
Thanks in advance!

Accedi per commentare.

Risposta accettata

Rajanya
Rajanya il 3 Feb 2025
I was able to reproduce this issue. This arises when the model is not configured to map to code.
Checking the 'Model-to-Code' option under Configuration Parameters > Code Generation > Report > Advanced Parameters resolves the issue, enabling the 'Navigate to C/C++ code' option.
Hope this answers your question. Thanks!

Più risposte (0)

Categorie

Scopri di più su Simulink Coder in Help Center e File Exchange

Prodotti


Release

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by