File Exchange

image thumbnail

Simulink Coder Support Package for STMicroelectronics Nucleo Boards

Generate and deploy code for STMicroelectronics Nucleo boards

63 Downloads

Updated 12 May 2021

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: https://www.mathworks.com/support/contact_us.html

Comments and Ratings (65)

Huy Bùi

Hi MathWorks Embedded Coder Team,

I‘m currently working with F411RE Nucleo board and the Simulink Coder Support Package for STMicroelectronics Nucleo Boards. I am using Matlab2017b.
In the library Simulink Coder Support Package for STMicroelectronics Nucleo Boards. I don’t find Interrupt block and Encoder block which I use them to control DC motor. I have tried to search this stuff over time but it seems there is no topic about them.

I was wondering if you can provide an example for this working or you can point to the relevant documentation for me.

Thank you in advance.
Huy

Andrew Price

Hi,
Im working with F411RE Nucleo and my problem is related to digital I/O. Just by a quick experiement it seems the 'Pin Numbers' referred to actually match Arduinio pin descriptions . eg the Nucleo LED is on D13.
The user push putton on CPU port C13 isnt mapped to any 'Pin Number'. Am I wrong or are all the GPIO pins mapped somehow? If so, where might that mapping be described?

Thanks
Regards
Andrew

Javed Ahmad

I tried STM32 NUCLEO H743ZI2 for MPPT but it is failed to track the mppt however in the simulation it works fine please a simple mppt hardware simulink file for the same

Enrico Landolfi

Hi,
good package. Why it is not available for Nucleo-H723ZG?

John Kluza

@ Javed Ahmad: The Nucleo HSP allows the PWM output to vary during runtime. Here is a demo showing how:
https://www.mathworks.com/help/supportpkg/nucleo/examples/change-the-led-glow-intensity-on-stmicroelectronics-nucleo-board.html

Also, it appears your board is not supported, so you may need to use a different board to have this block work. https://www.mathworks.com/hardware-support/st-nucleo.html

John Kluza

@ Alberto Paolini and Jesus Aviles: Please contact MathWorks technical support for assistance. https://www.mathworks.com/support/contact_us.html

John Kluza

@ Mathieu Peel and Alexey: The list of supported boards is here: https://www.mathworks.com/hardware-support/st-nucleo.html

Matas Manawakul

Javed Ahmad

This package is not able to generate SPWM or any Kind of PWM in which the duty changes. I am facing this problem and I tried to solve it but failed. Please help if you know the solution my board is nucleo H743ZI2

Alexey

Hi!
Please, add the board NUCLEO-144 STM32H743. It's very useful for signal processing.

Mathieu Peel

Does not support my particular Nucleo board (L152RE). Astounding to see there is not even the list of supported boards in the overview.
You would believe it would support every nucleo boards if no particular model or compatibility problems were listed.
But no...
Is it so difficult to change the description to list supported model instead of putting it in a comment that nobody will ever read, or only when they will regret ever installing it because it doesn't support their particular model !!!??!

Alberto Paolini

When I deply to the board, nothing happends on the board. Apparently everything looks fine, but in practice the board will do nothing, I'm just talking about switching on a led

jesus Aviles

This package is not working!!
I have the following problem:

Error occurred while executing External Mode MEX-file '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.
Component:Simulink | Category:Block diagram error
Unable to connect to the 'STM32F4-Discovery' target for

Marco Geraldi

Hi, i saw there are only few boards.
Boards based on stm32f446 chip are missing, like NUCLEO-F446RE and NUCLEO-F446ZE.

Amir Baniamerian

Hello, I am using R2019a and I get the error for downloading third party "LWIP Source".
Could you please check this

Icaro dos Santos

The installation/download of the supporting package is not working. I am using version R2018b.

Manan Mishra

The issue with third party tool download in MATLAB R2019a has now been resolved.

Manan Mishra

The installation of this support package might fail in MATLAB R2019a due to third party tool download issues. We are actively working to resolve this issue, will update once it is fixed.

Aaron Bensinger

Hi,
please add Nucleo F303RE board.

Aaron Bensinger

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

Vullnet Useini

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

bianchi

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

Dimitrios Vozikis

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

niefei

LWIP Source download failed!

HEJIN YANG

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.

Michal Wysocki

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.

Zhiguang Xing

Zhiguang Xing

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

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".

Manan Mishra

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

Zhiguang Xing

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

Sumith Sekharan

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.

Nicola Giustizieri

Multiplexer

Multiplexer

@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...

Michael Sfakiotakis

Is the support package compatible with the newer xNucleo boards ?

Antonin

Hello Mac and Linux users. Unfortunately our support package is only supported on Windows today.
More information on hardware support package system requirements:
https://www.mathworks.com/hardware-support/system-requirements.html
As an alternative, I would recommend using our Simulink Support Package for Arduino, which provides similar level of support on comparable boards.
https://www.mathworks.com/matlabcentral/fileexchange/40312-simulink-support-package-for-arduino-hardware
I hope it helps,
Antonin.

Antonin

Hi Radu Ghiga,

With Embedded Coder (https://www.mathworks.com/products/embedded-coder.html), 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,
Antonin.

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 ?

Download Matlab

Mizuho Katayama

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

Sven Grunwald

Radhin Das

Peeyush

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

Domenico Perillo

Always connection error. Failed to deploy to hardware.

jie wang

always connection error

Peeyush

@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?

Antonin

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.
Enjoy!

Sebastian Schödel

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

Michal Maka

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

David Stebani

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?

David Bowden

@Jasper - 2017a supports:
Nucleo-F031K6
Nucleo-F103RB
Nucleo-F302R8
Nucleo-F401RE
Nucleo-F411RE
Nucleo-F746ZG
Nucleo-L053R8
Nucleo-L476RG

Peeyush

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

Vytautas Vaidelys

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

Jasper

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,

Jasper

Timothy Russac

John Sween

Peeyush

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

Paul

Currently supports the following boards:
Nucleo-F401RE
Nucleo-F103RB
Nucleo-F302R8
Nucleo-F031K6
Nucleo-L476RG
Nucleo-L053R8

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

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!