cancel
Showing results for 
Search instead for 
Did you mean: 

Has anyone test STM32F4xxdemos (STM32 embedded target for MATLAB and Simulink)?

bluewaters213
Associate III
Posted on July 20, 2013 at 22:23

Hello,

I have a problem in running any of the demo code in STM32 embedded target for MATLAB and Simulink (C:\Program Files (x86)\STMicroelectronics\STM32F4xx-MAT\STM32F4xx\STM32F4xxdemos) but I do not know if this is the right forum to seek help (Matlab or ST forum).

When I tried running the demo code in Matlab I get the following error in Matlab Commad Window

''♯♯♯ Real-Time Workshop build procedure for method: 'entry

♯♯♯ Starting build procedure for model: ButtonAndLeds

♯♯♯ Starting Real-Time Workshop build procedure for model: ButtonAndLeds

Warning: ♯♯♯ IAR toolchain not automatically found.

Warning: ♯♯♯ IAR toolchain not automatically found.''

and this error

''The call to stm32F4xx_make_rtw_hook, during the entry hook generated the following error:

Please change to the correct build directory. (CodeGeneration)

The build process will terminate as a result.

Caused by:

Please change to the correct build directory. (CodeGeneration)'' in Simulink Window.''.

I have Matlab 2012b 64bit and Keil MDK installed in my Window 8 64bit Laptop Computer. I did the following in  Matlab Simulink configuration Parameter,

STM32 ToolChain : Keil

ToolPath Installation Directory: C:\Keil\ARM

 and finally I did the following as recommended in STM32-MAT/TARGET.

Demonstration settings (if installed path is not C:\Matlab\STM32F4xx)

The provided STM32F4xxdemos have been saved with C:\Matlab\STM32F4xx installed path.

If installed path is changed, ''Configuration Parameters'' must be done for the model:

    �Configuration Parameters''>''Code Generation''>''System target file''

    Click Browse button and select ert.tlc.

    Click Ok and Apply buttons.

    When System target file is ert.tcl click browse button again and select stm32F4xx.tlc file.

    Click Ok and Apply buttons.

    ''Configuration Parameters''>''Code Generation''>''STM32F4xx Options''

    Set toolchain parameters. Installed path has been updated

I am getting '' Select IAR directory tool path Prompt '' when I click Build Model in Matlab. I do not know while IAR popup even though I select Keil.I will be glad if someone can point me to the right direction in running the code the code successfully.

Thanks

#stm32f4 #stm32-mat/target-matlab-stm32f4 #stm32-mat/target-matlab
13 REPLIES 13
dtr_diego
Associate
Posted on August 09, 2013 at 16:18

Hello slimrobotics,

I

have the same problem

that

you

wrote

.

Did you

find any

solution

?

Could

you help me

?

Thank you, have a nice weekend,

BR,

Diego

bluewaters213
Associate III
Posted on August 10, 2013 at 04:36

Hello,

Though I have not tested it, I think you need to have Microsoft C Compiler (

http://www.microsoft.com/downloads/details.aspx?FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b&displaylang=en

) installed if you running Matlab 64bit.Embedded Coder make use of the compiler.You do not need it if you are running 32bit Matlab.I mistakenly downloaded the 32bit version.The file is huge (600MB) and we pay for Bandwidth in my Country.

Regards

wingfor01
Associate II
Posted on September 02, 2013 at 05:27

hello Mr silmrobotics:

I have the same problem with U,my os is win7 32bits(matlab 2012b). Have you solved ur problem? I think there is sometings wrong with my configuration of simulink,but I don't know the right reason,if u solve it,please help me.thanks!

wingfor01
Associate II
Posted on September 05, 2013 at 08:21

Hi Slim:

I have solved this problem by this way:

Firstly,you need create a new folder needed Codegeneration under the STM32F4xxdemos folder.

Secondly,you need set this new folder to be the matlab current foler ,then you open the mdl file and simulink,you will get the result with no errors.

sen
Associate II
Posted on September 30, 2013 at 09:41

Hello Guys, I'm also having this same problem when I try to run the given demo or my copy of the the demo.I'm using matlab R2012B on Windows XP. I don't know why this '' Select IAR directory tool path Prompt '' keep on coming when I've set that I'm using Keil toolchain. It  would be very helpful if someone can point me why this is occuring again and again?

Thanks in advance
Posted on September 30, 2013 at 11:20

Hello,

sorry for the late answer.

Only mex32 files are provided with version 2.0 so it is not available for MATLAB 64bit version.

Regarding messages error for CodeGeneration repository, it meens you must set MATLAB current folder to CodeGeneration before starting build.

As it is confusing, this constraint will be removed for version 3.0.

mex64 will also be provided and bug fixed regarding IAR warning message.

Version 3.0 is planned for begining october.

Best regards

Pascal

sen
Associate II
Posted on September 30, 2013 at 18:06

Thanks for your reply sir. But again sorry to say that it is not quite clear what you meant by setting MATLAB current folder to

CodeGeneration

 before starting build. I've set the matlab current folder. What else should I have to do? '' Select IAR directory tool path Prompt '' always keeps on coming. And I'm using Windows XP with matlab 32bit version of R2012B.

Thanks in advance again.

Posted on October 01, 2013 at 10:16

Hello,

it means you must start build from repository called CodeGeneration as shomn in attached file.

If MATLAB current folder is not CodeGeneration when you build you will have an error message and build stop.

Then, you must set model ''Configuration Parameters''. It is crutial that Installed Path correspond to the path you installed package.

If you use provided examples, installed pathis C:\Matlab\STM32F4xx

If your installed path is not this one, youMUST change System Target file to ert.tlc for example and change it back to stm32F4xx.tlc. This procedure will automatically set parameters to your installed path.

Then, example should work fine.

An other solution is to startnew model, setConfiguration Parameters and drag/drop STM32F4 toolbox.

Best regards

Pascal

________________

Attachments :

ConfigParam.PNG : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1BH&d=%2Fa%2F0X0000000bjS%2FQ7swnMiMt3AqYCrQHDvLmdbALBvuuHzJK7UPbl49yhE&asPdf=false

CurrentFolder.PNG : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1B7&d=%2Fa%2F0X0000000bjT%2FgH8o.V5nG1gugYiuNhojB2Wkjq1tAXjvHRHYvyoo6Ys&asPdf=false

SystemTarget.JPG : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1B2&d=%2Fa%2F0X0000000bjP%2FLE7QNy5m1ashewgkYt7OGAkYod90c7iT.C1fxl7LcPk&asPdf=false
sen
Associate II
Posted on October 01, 2013 at 14:33

excellent! This must work. Let me see. Thanks a lot.