2018-02-08 03:56 AM
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-matlabSolved! Go to Solution.
2018-02-16 06:51 AM
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.
2018-02-14 10:44 PM
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=falseF303RE.slx.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hxzw&d=%2Fa%2F0X0000000b30%2FnDLiXBZubEvamvqzEkYGgXAuwzsZ8BF0DjjF0DMV57U&asPdf=false2018-02-15 12:48 AM
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
2018-02-15 01:14 AM
Hi, Martin
I’m glad you did it. Also,
if you found cause of problem
pleasedescribe
how you resolved
because it will helpful forof future readers with the same problem.
Thanks.
2018-02-16 06:51 AM
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.
2018-02-18 08:38 PM
Thank you so much Martin.