File Exchange

image thumbnail

Simulink Coder Support Package for STMicroelectronics Nucleo Boards

Generate and deploy code for STMicroelectronics Nucleo boards


Updated 21 Oct 2019

Simulink® Coder™ Support Package for STMicroelectronics® Nucleo Boards enables you to create Simulink® models and automatically generate and deploy code on supported Nucleo boards. The support package includes a library of Simulink blocks for on-chip and on-board peripherals, and it offers deployment support using a built-in scheduler.

This support package is functional for R2016b and beyond.

If you have download or installation issues, please contact Technical Support:

Comments and Ratings (47)

please add Nucleo F303RE board.

i want to use the Nucleo F303RE Board wirth MATLAB 2019b and ST MAT/Target Software.
I cant generate the makefile...

Can you please update it with a hardware support for the board L432KC


I got error when installing it with R2017a
(Aug 23, 2019 13:02:24) Starting Download: Embedded Coder Support Package for ARM Cortex-M Processors 17.1.1 : 10,426,760 bytes
(Aug 23, 2019 13:02:30) Starting Download: Embedded Coder Support Package for STMicroelectronics Discovery Boards 17.1.5 : 19,785,659 bytes
(Aug 23, 2019 13:02:40) Starting Download: Simulink Coder Support Package for STMicroelectronics Nucleo Boards 17.1.4 : 12,390,920 bytes
(Aug 23, 2019 13:02:46) Exiting with status 0
(Aug 23, 2019 13:02:46) End - Successful.
(Aug 23, 2019 13:02:46) javax.xml.bind.UnmarshalException
- with linked exception:
[org.xml.sax.SAXParseException; Premature end of file.]

How can I fix it ? thanks

Are there any plans to support ST32H7 Nucleo boards, and add more block in the Simulink library such as DAC?


LWIP Source download failed!


unable to download Mbed library, I am using Matlab 2018b.

Carlos Ma

Mathworks please help a brother out, "GNU Tools for ARM Embedded Processors" failed to download still.

Is there any progress on the fix for this issue? i'm running 2017b version, have a licence and i'm experiencing "GNU Tools for ARM Embedded Processors" issue still, despite the claim it was resolved.

thanks, but the same problem occured in matlab2018b @Manan Mishra

Hi Zhiguang Xing,

This seems to have occurred due to the download link for third party tool "GNU Tools for ARM Embedded Processors" being broken for some time. Please try installing the support package again after deleting 'gnuarm-armcortex' folder from this location "Downloads\MathWorks\SupportPackages\R20xxx\archives\3p".

The support package installation failure due to third party tool download issue has now been resolved for R2017b, R2018a and R2018b releases of MATLAB.

Installation error occured because of unaviable of the third-party tool named "GNU Tools for ARM Embedded Processors", anyone know how to solve this problem?

Yu Yuan

Any good idea when the support for the R2018a will be available? Days? Weeks? Months?

Rami Saaidi

This support package installation is currently failing in R2018a and R2018b versions of MATLAB due to third party tool download issues. We are actively working to resolve this issue, will update once it is fixed.



@Multiplexer Just checked it, thats how it works. You refer to the name of extended pin, simply writing PB_7 will work on PWM output as example. Also, Serial interface blocks are called SCI...

Is the support package compatible with the newer xNucleo boards ?


Hello Mac and Linux users. Unfortunately our support package is only supported on Windows today.
More information on hardware support package system requirements:
As an alternative, I would recommend using our Simulink Support Package for Arduino, which provides similar level of support on comparable boards.
I hope it helps,


Hi Radu Ghiga,

With Embedded Coder (, you can run PIL profiling, which will allow you to measure task execution time individually.
Runtime execution profiling is not supported today on NUCLEO devices.
I hope it helps,

jim rorick

R2018a on MACOS -- "The support package is not compatible with your version of MATLAB or operating system." Bummer...

wang wang

Radu Ghiga

Hello all, I am using Matlab/Simulink 2017b and the Nucleo F767zi board. I can generate the code, deploy it, run it so everything is ok here. However, I cannot get it to run a code execution profile. I was able to set it from the model parameters and in the generated code I can find the source and header files that belong to the profiling. After the code deploys it starts running but it does not stop. If I stop it, the executionProfile variable does not appear in the workspace and there is no profile report popping up. Any ideas are very much appreciated! Thank you!

Why this Support Package is not compatible with OS X ?

It works fine at first but I get error below recently.
エクスターナル モードの MEX ファイル 'ext_serial_win32_comm' の実行中にエラーが発生しました:
Failed to connect to the target. A time-out occurred while waiting for the connection response from the target. Possible reasons for the time-out:
a) The target is not switched on.
b) The target is not connected to your host machine.
c) The application for the model is not running on the target. You might have clicked the Stop button. If the Run button is not dimmed, click it. Otherwise, click the Build button, which downloads and runs your application on the target.
I erased chip using ST-LINK but nothing changed.
Of course board is powered, connected and alive (copy & paste .bin file works).
Deploy to target looks succeeded but initialize failed then error above shown

Radhin Das


@Domenico @Jie : Could you please elaborate me on what is the error you are facing?

Always connection error. Failed to deploy to hardware.

jie wang

always connection error


@Sebastian,@David Stebani: Are you still facing this issue? I think the installation did not went through properly. Can you try to reinstall the support package?


R2017b is out!
Here is the list of new features:
- We added support for the Nucleo-F767ZI (double precision floating point unit (DP-FPU) running at 216MHz with 2MB flash and 512kB of RAM).
- You can now have access to all pins on the board (not just the Arduino header)
- You now have access to all additional peripheral modules. For instance, if your board has 3 different I2C modules, you will be able to use all of them, same SPI and SCI. You can also configure custom pins for these modules to suit your needs.

@David Stebani:
Same Problem here, even as Administrator. Any Idea?

Michal Maka

@David Stebani
Try to run Matlab with administrator priviliges under Windows

I tried the stmnucleo_gettingstarted with a F401RE but I get the following error when trying to deploy to hardware:
"### Build procedure for model: 'stmnucleo_gettingstarted' aborted due to an error.
Unable to load a message catalog 'stmmbed:utils'. Please check the file location and format."

What am I doing wrong?

@Jasper - 2017a supports:


@Vyatuatas: Possibly the installtation did not go through properly. Can you uninstall and install the support package once again.

no work with my nucleo F401RE. I've got just a error:
Error Report: Command "matlabshared.toolchain.gnu_gcc_arm.setup();" threw an error: The path 'C:\ProgramData\MATLAB\SupportPackages\R2016b\3P.instrset\gnuarm-armcortex.instrset\bin' does not exist


Hi Peeyush,

Which two new boards are now supported? Does this only apply to 2017a? I have 2016b but only see the boards as listed by Paul.

Best regards,


John Sween


Hey guys, MATLAB R2017a is out find out 2 new hardware added to Nucleo support packages, as well as 2 I2C examples.


Currently supports the following boards:

MATLAB Release Compatibility
Created with R2016b
Compatible with R2016b to R2019b
Platform Compatibility
Windows macOS Linux