cancel
Showing results for 
Search instead for 
Did you mean: 

STM Cube MX vs Matlab simulink, pros and cons

Apill
Senior

I am a begineer to stm32 it has been two months since I began using STM32 for prototype building. I am currently doing a project which involves DSP. Today I came across an application notes saying we can generate code using matlab too. Now I am confused which is a better one to use in between matlab simulink and stm cube mx ? In a long run which would pay off to gain more expertise on ?

6 REPLIES 6
T J
Lead

I would guess that no-one here uses Matlab,

only some here use the Cube, so there is some level of support here for that.

where is the forum for Matlab ?

I don't use either. I come from a generation that does programming and math from first principles, and I can test algorithms on any platform with an editor and a C compiler.

I'd assume Matlab skills might be more portable/useful, you can test algorithms and math in the general sense.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Apill
Senior

@Community member​  WIthout using cube mx how to create your code ? directly in keil ? Just curious to know about the possible options.

Your assumption is right about matlab,

The Cube repository files contain a large collection of HAL examples and BSP for ALL of ST's EVAL, NUCLEO, and DISCO boards. These examples build directly in Keil, and can be ported to custom boards and configurations. Where the examples aren't complete (ie SDIO/SDMMC not on NUCLEO-144) you can port from richer EVAL examples, adapting for pins/peripheral differences.

You can create Keil, IAR, etc projects from scratch, pulling in the library files, and similarly you could create a makefile and use that with GNU/GCC to build a project.

I also have a large code base in the older SPL library, and several of my products will continue to use that into the future, as the code is stable and tested.

I can also write in C and Assembler, and can create register level code if necessary, and often have to do that with SoC designs to build boot loaders and support tools.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
T J
Lead

I use the Visual Studio IDE but I had to pay for the GDB license...$150 :(

Cyril FENARD
ST Employee

Hi @Apill​ ,

What I can only say is that STM32-MAT / TARGET can help you create and apply your STM32 device from a Simulink model.

Keep in mind that the build operation of the model relays on STM32CubeMX that will bring your application with IDE project of your choice.

You'll benefit from STLINK (VCP also), the maturity of the HAL drivers, platform initialization (all the detail stuff of clocking) and the IDE for direct debugging if necessary.

The version 5.1.0 of STM32-MAT/TARGET has just been released at the end of July 2019.

Regards.

Cyril