Skip to main content
February 20, 2020
Question

STM32CubeIDE has no usage examples, it is not helping to use microcotrolers.

  • February 20, 2020
  • 10 replies
  • 3410 views

I have seen that a large part of the code used in STM32 uC examples comes from projects made with an Atollic compiler, and this can be one of the main problems for those who are trying to use STM32CubeIDE, since not all configuration windows are the same, in addition a manufacturer of hardware that provides an IDE without dedicated examples ends up hindering development, and as a result, the abandonment of products, in search of other manufacturers that provide better support to obtain the final product in less time.

This topic has been closed for replies.

10 replies

JoniS
Senior
February 20, 2020

STM32cube can generate "all the platform" specific code for you(periephals etc), that can be used as reference with the documentation and reference manual, what else should they provide?

Sure rest of the program is just using the programming language of your choice, which is mostly not platform specific at all.

February 20, 2020

The code generator does not generate usage examples, only basic support.

Often it only takes a few lines of code to make it work, but the user has to go through various documents to find out how to do it, and that ends up discouraging.

Many IDEs are no longer used popularly, precisely for lack of examples.

A case in point is the Arduino IDE, which already has built-in examples.

Very complex examples are not necessary, but it helps to have a practical reference, mainly of use of each hardware module.

Pavel A.
Super User
February 20, 2020

Unfortunately true... part of the examples (looking at H7) are for SW4STM; import into either CubeIDE or Atollic is not trivial for beginners (hеll, even for me).

The software won't improve automagically, let's being realistic.

So a blog or app nte to explain import and conversion of examples would be very welcome.

Especially, explain

  • how the project tree and generated files differ between CubeIDE and others.
  • differences in GUI : core Eclipse, debugger settings, etc.

Regards,

-- pa

n2wx
Senior
February 20, 2020

Abandonment isn't likely. Like it or not ST's parts are powerful and inexpensive, its printed documentation is light years beyond NXP's and (controversially maybe) Microchip's.

If you want a better IDE you may need to move to a paid IDE like IAR. But if you're stuck with the freebie as I am because it runs on linux we just have to live with it and move on.

February 20, 2020

I think Microchip does a good job of supporting the user. They provide many documents for practical use, and with examples. There is no way to compare Microchip with any other manufacturer in this regard. Atmel is even seeing a big improvement in its documents after its purchase by Microchip.

n2wx
Senior
February 20, 2020

Microchip has a lot of fans, I should know better to throw rocks. They get gold stars for rarely EOLing their products. But the ICD programmer/debuggers stink as does MPLAB-X. I won't go into the annoying Harvard architecture choice since that's even more controversial but there is that hobbling nicely-written code. I have to jump through too many hoops to program for Microchip.

Tesla DeLorean
Guru
February 20, 2020

How many pro's are actually using CubeIDE for real products?

All this stuff is way too broken/immature, that's why Keil and IAR still have a business, and why MCU vendors should focus on the chips.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
February 20, 2020

I don't know what you call a professional. But I'm doing a datalogger with:

- 8 temperature channels,

- with wireless USB keyboard (which the automatically generated library does not support),

- with W25Qxx flash memory,

- with ILI9341 display,

- with RTC Ds3231,

- with MPU6050 (accelerometer/gyroscope)

- with data export via pendrive.

This project needs more hardware to work, not just the chip, so it's not basic job.

I don't know if I can call this a start-up project.

Please do not discourage manufacturers from improving support for their products.

n2wx
Senior
February 20, 2020

The criticism encourages excellence because the criticism will stop when the products improve. Refraining from criticism is the enemy: It supports sloth and laurel resting.

Herve PIERROT
ST Employee
February 21, 2020

Regarding the examples for STM32CubeIDE, the situation may not be ideal, but is far from your statement in the title of this thread "STM32CubeIDE has no usage examples"

Every MCU packages for each serie include examples for three IDEs, including IAR, KEIL and a third one that is a GCC based IDE, used to be SW4STM32 (plus TrueSTUDIO at some time) but changing to STM32CubeIDE in new releases of those packages.

Moreover, STM32CubeIDE include an importer for SW4STM32 and TrueSTUDIO projects that can be used to import the examples provided in the MCU packages

that do not yet include project based on STM32CubeIDE.

To be fully transparent, the import of all those examples in STM32CubeIDE has been tested and for most of the series, the example import is functional

at 100% (compile and run), only for few series, some examples remained to be tuned, but every package has more than 98% of out-of-the-box examples compiling and running on STM32CubeIDE, and overall of the portfolio, its more than 99.6% of the examples that are working fine.

If you still face issue with a particular example not working with STM32CubeIDE, don't hesitate to be provide detail on it.

Thanks for your interest in our products and tools.

n2wx
Senior
February 21, 2020

Please consider including additional examples demonstrating the excellent LL libraries. There were only a small handful of examples in the stm32cubeh7 downloaded last week. I suspect most real products are using direct register access or LL in that the HAL has HAL_LOCK race conditions as well as other weaknesses that render HAL's use painful for all but trivial or academic use cases.

waclawek.jan
Super User
February 21, 2020

@Herve PIERROT​ ,

I believe rtek1k's complaint is really about the examples not being CubeMX-based so they can't be clicked further.

JW

Herve PIERROT
ST Employee
February 21, 2020

could be... but still, new series are coming with the examples including this .ioc file for the graphical configuration setting and initialization code generation.

For the legacy ones, the examples already exist... the import is providing some solution, maybe not the best one.

February 21, 2020

I found some examples of using the STM32CubeIDE, perhaps the greatest difficulty is finding the example, since this example is already available on the internet.

See this example, regarding the verification of ROM / Flash data, I found this reference:

Application Note 277

ROM Self-Test in MDK-ARM

http://www.keil.com/appnotes/docs/apnt_277.asp

After searching a lot on Google, I found for STM32CubeIDE:

STM32CubeIDE-Workshop-2019

Hands-on: CRC Checksum Generation

https://github.com/ethanhuanginst/STM32CubeIDE-Workshop-2019/blob/master/hands-on/06_F746-DISCO-CRC/README.md

I don't know if I'm looking in the wrong place, but I'm used to IDEs like those from MikroElektronika, Arduino etc, where examples of hardware usage are very accessible.

March 5, 2020
scottSD
Senior III
March 5, 2020

Those examples are located in your STM32CUBE repository.

Typcal location for the Stm32F746:

C:\Users\"username"\STM32Cube\Repository\STM32Cube_FW_F7_V1.15.0\Projects\STM32746G-Discovery\Examples

There are a lot of examples for other discovery boards as well.

I agree with you though....it is not made very clear in the documentation.