cancel
Showing results for 
Search instead for 
Did you mean: 

STM32-MAT/TARGET STM32 embedded target for MATLAB and Simulink

canbu22
Associate III
Posted on July 10, 2013 at 06:10

STM32 embedded target for MATLAB and Simulink does not work with latest Matlab R2013a release (as it was supposed to work only with previous R2012b release)

Any one had better experience with R2013a?

Are there any known issues that has been resolved (or needs to be resolved) with this STM32 Support Package for Matlab? Are there any updates?

Thanks!

#stm32-mat/target #stm32-mat/target-matlab
15 REPLIES 15
Posted on July 10, 2013 at 17:28

Hello,

new release is planned for this month.

Can you please tell me more about errors you get?

What is your windows OS?

Best regards

Pascal

canbu22
Associate III
Posted on July 10, 2013 at 20:51

Hello Mr.Pascal,

Here's a brief description of my testing :

I use Windows-7 (64-bit O.S) and testing with Matlab R2013a and IAR tool chain.

The model is a very simple model to just blink an LED on the STM32F4 Discovery board. (though STM's Support Package demo used STM32 Eval board, it's a simple matter to toggle an LED on a Discovery Board once we know what pins to use)

GPIOD pin 15 is configured to toggle the LED so there are just two model blocks :

GPIOD_Config (with pin15 enabled as output) and GPIO_Write (with GPIOD pin15 selected to toggle)

All the Simulink Configuration Parameters are properly set as per the STM's Support Package documentation to just check models and compile them. Simulink/RealTime Workshop gives many errors related to models and the libraries (even before it invokes the IAR compiler tools).

Running Simulink Model Advisor gives many warnings due to changes in Simulink tools for R2013 and even after resolving most of these there are many issues which Simulink complains may be due to changes in tools interfaces etc.

Few of the errors I get (eventhough the model is in the library and is placed on the editor and properly configured):

Error in S-function 'STM32_DiscBrd_BlinkBlueLed/GPIOD_Config': S-Function 'GPIOD_Config' does not exist

Error in S-function 'STM32_DiscBrd_BlinkBlueLed/GPIO_Write': S-Function 'GPIO_Write' does not exist

Recreating this simple model and compiling it on Matlab R2013a by STM team will highlight all these and help to fix them.

Thanks,

Best Regards,

Anbazhagan

Posted on July 11, 2013 at 10:36

Hello Mr Anbazhagan,

Unfortunately only mex32 files are provided.

It can't work with 64bit OS you are using.

I hope we will be able to provide both mex32 and mex64 files for September release.

Best regards

Pascal

canbu22
Associate III
Posted on July 11, 2013 at 19:37

Hi Pascal,

Good to know that the issue is due to non-support of Windows 64-bit O.S (but the support package documentation does n't mention it).

Hope the support will be extended to 64-bit O.S soon since multicore CPUs and 64-bit O.S are the hot technologies currently in use everywhere.

Thanks,

Best regards,

Anbazhagan

sbarwinek
Associate
Posted on July 23, 2013 at 00:30

Hello

🙂

I'm using

Matlab

2012B

with

STM32-MAT/TARGET

(

Win7

32bit)

.

Where

in the example

''

BlinkBlueLed

'' or ''

BlinkGreenLed''

can I

change the time

/ frequency of

LED blinking

?

Regards

anlee09
Associate II
Posted on August 14, 2013 at 15:39

Hello guys.

I am having problem performing processor in the loop simulation with the STM32F Discovery board. I am trying to load the example 'Filtrage_PIL_Int32.mdl' that comes with the STM32F embedded target for matlab. I get the following error when I compile the code generated from the 'Filtrage_int32.mdl':

### Wrapping unrecognized make command (angle brackets added)

###    <''%MATLAB%\bin\%MATLAB_WIN_VER%\gmake''>

### in default batch file

###Makefile for KEIL

###BuildMode : real_time

### Successfully compiled source main.c

### Successfully compiled source Filtrage_int32.c

''### BUILD_MODE real_time''

Error: L6218E: Undefined symbol profileTimerInit (referred from main.o).

Error: L6218E: Undefined symbol xilInit (referred from main.o).

Error: L6218E: Undefined symbol xilRun (referred from main.o).

Finished: 0 information, 0 warning and 3 error messages.

gmake: *** [Filtrage_int32.axf] Error 1

sbshamu
Associate
Posted on August 28, 2013 at 16:32

Hello Fourier, If you haven't solved the issue of the frequency of blinking, you can do that by changing the sampling time in the Configuration parameters of the Simulink model. Use  (CTRL + E) to access the configuration parameters of your Simulink model

anlee09
Associate II
Posted on August 28, 2013 at 16:37

Hello Guys.

I managed to get my problem solved. I was trying to build the secondary model separately.  
wingfor01
Associate II
Posted on September 02, 2013 at 05:36

hello Mr.

when you test the demo,have you seen the probelm like this:

Warning: ### IAR toolchain not automatically found.

> In getToolPath at 36

  In stm32F4xx_PostApplyCallback at 17

  In F:\MATLAB\R2012b\toolbox\rtw\rtw\private\stfTargetActivateCB.p>loc_eval at 44

  In F:\MATLAB\R2012b\toolbox\rtw\rtw\private\stfTargetActivateCB.p>stfTargetActivateCB at 17

  In rtwprivate at 16

  In F:\MATLAB\R2012b\toolbox\simulink\simulink\private\configDlgAction.p>configDlgAction at 191

  In slprivate at 12

matlab 2012b(win7 32bits)

I don't know how to solve it,I configure the simulink with the readme file.I don't know what the wrong is.If you have free time,please help me.and I think you can write a course to show how you configure the simulink,thanks.