Effacer les filtres
Effacer les filtres

Activate the External Mode Feature for debugging Embedded Coder

3 vues (au cours des 30 derniers jours)
Zoltan Nagy
Zoltan Nagy le 26 Juil 2023
Commenté : Zoltan Nagy le 27 Juil 2023
I have experience with Matlab based auto-generated coding, but this is the first time I have to set-up Embedded Code environment. The set-up works with ARM (Nucleo board), but I saw that, I also can debug the software (display values in Data Inspector), if I activate the External Mode Feature, so I am trying to do so.
I have found this page:
which is step 8 of 10 in Implement a Target, Activate the External Mode Feature.
So, I started from the beginning and got in trouble at step 2: Create the Framework
This page refers to <targetrootfolder>, which I could not find, so I searched for a folder called registry, based on the only clue I have: the list of folders on that page.
I found two folders with the world ‘target’ in the path:
C:\Program Files\MATLAB\R2022b\toolbox\target\shared\armcortexabase
But here I have +codertarget, not +matlabshared
C:\Program Files\MATLAB\R2022b\toolbox\target\codertarget\rtos
But here I have targetservices, not +matlabshared
As I am using STM32, I have found this folder also:
C:\Program Files\MATLAB\R2022b\toolbox\target\codertarget\+codertarget\+target
But the directory structure does not match.
I am not even sure, if I am on the right track, that is I can enable a feature like that, but if the idea is correct, then is it possible to provide a simple, step-by-step instruction to set-up this environment to one particular processor – ARM is popular, but I would be happy with a different one. Thanks.
Zoltan
  1 commentaire
Zoltan Nagy
Zoltan Nagy le 27 Juil 2023
Eventually I have found the way to do it and put it down here, as I have not found this advice anywhere.
First of all, you may find the External Mode feature under Hardware / Hardware Setting, under the Hardware Implementation tab on the left, under Hardware board settings / Target hardware resources. If you click on External mode, then you find the Communication interface, which is either serial or XCP over serial. The important is to set the Serial port to the one, to which the board is connected.
Then, instead of the Build, Deploy and Start button, press the Monitor & Tune button, which will flash the code to the board and start monitoring variables.
To see them, you have to open the Data Inspector window and may have to click the variables.
Luckily, it is nicely done, only badly documented, but YouTube helps.

Connectez-vous pour commenter.

Réponses (0)

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by