Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with STM32 embedded target for MATLAB and Simulink

563 views
Skip to first unread message

Slim Sly

unread,
Aug 9, 2013, 11:07:14 PM8/9/13
to
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 have not install the free version of microsoft c compiler. 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

wing...@gmail.com

unread,
Sep 3, 2013, 8:22:34 AM9/3/13
to
Hello Sil:
I have the same problem with you,have you solved it? I deon't know how to configure the simulink directory codegeneration.

### Check Current Directory for building application.
Real-Time Workshop build procedure for method: 'error
### Real-Time Workshop build procedure for model: 'Filtrage_int32' aborted due to an error.
### Real-Time Workshop build procedure for method: 'entry
### Starting build procedure for model: Filtrage_int32

If you solved it,please point it to me,thank you.

Tafadzwa Shamu

unread,
Sep 5, 2013, 1:10:12 PM9/5/13
to
@Slim Sly

Hello, f haven't found the solution to your code generation problem a solution which should work is as follows:

According to the README file which ships with the STM embedded target, before you generate any code or run the demos,make sure after your current directory path ends with code generation. I suggest you create a directory of the form C:\Matlab\STM32F4xx\STM32F4xxdemos\CodeGeneration. So that after you open the model or demo you have configured for the STM32 target, you will just go back to the command window and change the current directory to ...\CodeGeneration. This will eliminate the need to switch between the ert.tlc target file and the stm32f4xx.tlc file and will also eliminate the 'on entry hook' error you are getting because the toolset was designed to compile with that specific directory set. I hope this will solve it.

Shamu
0 new messages