cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 MAT/TARGET unknown data type RT_MODEL_Nucleo_test

Martin Dvoracek
Associate II
Posted on February 08, 2018 at 12:56

Dear,

I am firstime testing MAT/TARGET. I have created small model in simuling and generated source codes throught CubeMX. HW board Nucleo F303RE is used and System Workbench development SW. Source codes from Matlab are succesfully process in CubeMX and project for System Workbanch was create. But compilation of generated source codes consist several problems.

MATLAB 2017b, cubeMX 4.23 are used.

Simulink model name I uses is Nucleo_test.slx

In main.c file there is code line:

extern

const

;

but the datatype RT_MODEL_Nucleo_test is unknown. I checked all generated files but this datatype doesnot exist in any of files. There is only similar in Nucleo_test.h

typedef

struct

;

Other probles I have are conflict types for rtM.

simulink model, CubeMX ioc file, matlab generated sourcecodes and System workbanch project are attached in zipped file.

Does somebody have some idea what is wrong and what should be done?

Martin

#simulink #stm32-mat/target-matlab
1 ACCEPTED SOLUTION

Accepted Solutions
Martin Dvoracek
Associate II
Posted on February 16, 2018 at 15:51

I had the same problem with the RT_MODEL data type again. To solve it, source codes was generated for generic real time target firstime and then for the stm32 target.

View solution in original post

5 REPLIES 5
Posted on February 15, 2018 at 07:44

Hi,Martin

I tested your file and face with the same error.

I trying to solve it but for temporary you can use my file with EWARM Toolchine.

Please let me know if you have any progress.

Best regards,

________________

Attachments :

F303RE.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hy01&d=%2Fa%2F0X0000000b2y%2FuABp_rZs6Xd3rqMdgrvv1II3Grf_S_NLllb34WAtUu4&asPdf=false

F303RE.slx.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hxzw&d=%2Fa%2F0X0000000b30%2FnDLiXBZubEvamvqzEkYGgXAuwzsZ8BF0DjjF0DMV57U&asPdf=false
Posted on February 15, 2018 at 08:48

Hi,

thanks you tried to solve my problem. Actually I am able to generate source codes which are correct and working well with System workbanch. Next week I will try to generate more complex models. But still I do not know what was wrong! I made a lot of try end error tests and modifications, but unsuccessfully. I tried to generate the model for generat real-time target and it was working. During all of my experiments I found that suddenly the code is generated correctly and is working. But I do not know why it works now. I made some email communicatoin with Matlab support in our country, but they probably does not has deper experiences with code generation. Yesterday, they gave me genaral procedure to start with the easiest model and firstime generate project for the general realtime target and then try it for stm32...

But the problem was probably comming form Matlab. Becouse the struct

typedef

struct

;

in nucleo_test.h (file is generated by MATLAB) in now genetared in file nucle_test_types.h and is:

typedef

struct

;

now the data type in main is declared and all starting to work.

Also I tested you model and is working corect. I only modif in Cube to target IDE to System Workbanch...

Thansk!

Martin

Posted on February 15, 2018 at 09:14

Hi, Martin

I’m glad you did it. Also, 

if you found cause of problem 

please

describe 

how you resolved 

because it will helpful for 

of future readers with the same problem.

Thanks.

Martin Dvoracek
Associate II
Posted on February 16, 2018 at 15:51

I had the same problem with the RT_MODEL data type again. To solve it, source codes was generated for generic real time target firstime and then for the stm32 target.

Posted on February 19, 2018 at 04:38

Thank you so much Martin.