cancel
Showing results for 
Search instead for 
Did you mean: 

How to add variables to a Matlab/simulink model based on STM32-MAT ?

Lixin Tang
Associate
Posted on April 21, 2017 at 22:29

Greetings,

I am new to STM32-MAT code generation. I made 2 small models and they are working as expected.

However, I found a big issue when I try to build a more complicated model - there is no variable (memory copy) in the library. I can read/write values to/from register of the STM32F100. But sometimes, I need to define/use a lot of variables in the model. Just wondering how do you guys handle this situation? Maybe there is one block that is hiding somewhere?

Many thanks and have a great weekend!

Lixin

1 REPLY 1
F J
Associate
Posted on June 11, 2017 at 16:58

Hi Lixin

You can use the 'Data Storage Memory' block in Simulink.

It is treated as global variable in the generated C code.