Author Topic: STM32Cube embedded software now on GitHub  (Read 12588 times)

0 Members and 1 Guest are viewing this topic.

Offline KarelTopic starter

  • Super Contributor
  • ***
  • Posts: 2540
  • Country: 00
STM32Cube embedded software now on GitHub
« on: May 19, 2020, 01:20:22 pm »
"STMicroelectronics is now publishing STM32Cube embedded software on GitHub,
to open the STM32 embedded software offer to collaborative and community-friendly development and leverage faster,
more efficient distribution of updates."


https://www.eletimes.com/stm32cube-microcontroller-development-software-from-stmicroelectronics-now-on-github
 
The following users thanked this post: cdev, MarkL, diyaudio

Offline chriva

  • Regular Contributor
  • *
  • Posts: 102
  • Country: se
Re: STM32Cube embedded software now on GitHub
« Reply #1 on: May 19, 2020, 01:26:08 pm »
They should bury that software under a rock somewhere instead of making that cancer spread even more.

Beginners: For the mother of Hades, please do not use this junk. It'll only take a couple of minutes extra to do it the proper way. :)
 
The following users thanked this post: Dave, Yansi, Theboel, Siwastaja, nuclearcat

Offline Scrts

  • Frequent Contributor
  • **
  • Posts: 803
  • Country: lt
Re: STM32Cube embedded software now on GitHub
« Reply #2 on: May 19, 2020, 01:34:11 pm »
They should bury that software under a rock somewhere instead of making that cancer spread even more.

Beginners: For the mother of Hades, please do not use this junk. It'll only take a couple of minutes extra to do it the proper way. :)

It took me 4 hours to start using I2C, SPI and UART with interrupts. I did not ever use STM32 before. I think those libraries are great for beginners and I am not sure why not to use them if you don't need to meet specific speed goal.
 
The following users thanked this post: thm_w, diyaudio

Online Jeroen3

  • Super Contributor
  • ***
  • Posts: 4567
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: STM32Cube embedded software now on GitHub
« Reply #3 on: May 19, 2020, 01:35:49 pm »
It's on github for some time now. They do not maintain it via github, so pull requests or issues will be ported to their internal tracking and removed.
At least is would make upgrading somewhat easier if you can handle the submodules dependencies via a mirror server. (never use submodules to a third-party url!)

I remember some topic here about a critical flaw in some driver that they fixed in the Fx hal and marked "solved" in the issue reports at the Fy hal with a mention that they fixed in Fx.... Yeah, that's not how it works.

But it looks like they are using github features now.
https://github.com/orgs/STMicroelectronics/projects/2
« Last Edit: May 19, 2020, 01:37:28 pm by Jeroen3 »
 
The following users thanked this post: newbrain

Online newbrain

  • Super Contributor
  • ***
  • Posts: 1908
  • Country: se
Re: STM32Cube embedded software now on GitHub
« Reply #4 on: May 19, 2020, 03:00:54 pm »
But it looks like they are using github features now.
https://github.com/orgs/STMicroelectronics/projects/2
Nice! I've just opened an issue on the CEC library.
Let's see how it goes...It's only the third time I report it. ;D
Nandemo wa shiranai wa yo, shitteru koto dake.
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 9792
  • Country: ca
  • Non-expert
Re: STM32Cube embedded software now on GitHub
« Reply #5 on: May 19, 2020, 09:10:51 pm »
They should bury that software under a rock somewhere instead of making that cancer spread even more.

Beginners: For the mother of Hades, please do not use this junk. It'll only take a couple of minutes extra to do it the proper way. :)

It took me 4 hours to start using I2C, SPI and UART with interrupts. I did not ever use STM32 before. I think those libraries are great for beginners and I am not sure why not to use them if you don't need to meet specific speed goal.

They can be good for beginners as you show, just ignore these kinds of gatekeeping posts.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 
The following users thanked this post: uer166, ucanel

Offline uer166

  • Super Contributor
  • ***
  • Posts: 1265
  • Country: us
Re: STM32Cube embedded software now on GitHub
« Reply #6 on: May 19, 2020, 09:14:46 pm »
They should bury that software under a rock somewhere instead of making that cancer spread even more.

Beginners: For the mother of Hades, please do not use this junk. It'll only take a couple of minutes extra to do it the proper way. :)

Amazing.. please don't spread this crap. That IDE is perfectly serviceable, even for large commercial projects. It's as much pain in the ass as any other vendor IDE.
It's great for hardware engineers specially who want to confirm the pin mapping and do board bringup easily without doing firmware for a living.
 

Offline chriva

  • Regular Contributor
  • *
  • Posts: 102
  • Country: se
Re: STM32Cube embedded software now on GitHub
« Reply #7 on: May 19, 2020, 09:23:18 pm »
They should bury that software under a rock somewhere instead of making that cancer spread even more.

Beginners: For the mother of Hades, please do not use this junk. It'll only take a couple of minutes extra to do it the proper way. :)

Amazing.. please don't spread this crap. That IDE is perfectly serviceable, even for large commercial projects. It's as much pain in the ass as any other vendor IDE.
It's great for hardware engineers specially who want to confirm the pin mapping and do board bringup easily without doing firmware for a living.

It's buggy, it's slow, it's doing things that is wasting space, it's abstracting everything to kingdom come and makes porting a pain in the brown eye.

Could as well recommend "engineers" to use arduino and code "C++" :)
« Last Edit: May 19, 2020, 09:26:59 pm by chriva »
 
The following users thanked this post: Dave

Offline lucazader

  • Regular Contributor
  • *
  • Posts: 221
  • Country: au
Re: STM32Cube embedded software now on GitHub
« Reply #8 on: May 19, 2020, 10:59:09 pm »
Could as well recommend "engineers" to use arduino and code "C++" :)

That comment about c++ shows how archaic your views really are.
C++ is a great language to use with micros, just too bad vendors do not really support it nicely out of the box.

The STM32Cube is also a great set of tools to get a project up and running very quickly for the vast majority of use cases.
Sure there are some cases where it wont work perfectly. And others where you need to optimize more than can be done using a HAL.
But for most products that aren't produced in the 10's or 100's of thousands, it is likely going to be cheaper in the products development time to just throw a bigger/faster micro at the problem and save dev time than it would be to optimize everything to the nth degree.

I am pleased that these are now up on github.
Will allow for a much more transparent view of known bugs, what they are working on and what has been fixed.
We use the stm32cube and the st hal to great success at the company that I work for. I would also recommend other companies look into using it as well, depending on how they can fit it into their workflow.
 
The following users thanked this post: newbrain, robermeyer

Offline KarelTopic starter

  • Super Contributor
  • ***
  • Posts: 2540
  • Country: 00
Re: STM32Cube embedded software now on GitHub
« Reply #9 on: May 20, 2020, 07:01:56 am »
C++ is a great language to use with micros, just too bad vendors do not really support it nicely out of the box.

No, it's not. C++ is a horrible language for multiple reasons.
You can read all about it and participate in the discussion here if you want:

https://www.eevblog.com/forum/chat/how-many-people-code-in-c-these-days-and-if-so-why/
 

Offline shangaoren

  • Regular Contributor
  • *
  • Posts: 53
  • Country: fr
Re: STM32Cube embedded software now on GitHub
« Reply #10 on: May 20, 2020, 07:55:10 am »
C++ is a great language to use with micros, just too bad vendors do not really support it nicely out of the box.

No, it's not. C++ is a horrible language for multiple reasons.
You can read all about it and participate in the discussion here if you want:

https://www.eevblog.com/forum/chat/how-many-people-code-in-c-these-days-and-if-so-why/

stl is not good for embedded most of the time but the core of the language is good, maybe some times better than c, this is just a sterile debate, both language are good, there is just bad programmers.
As for my vision many C programmer do object oriented programming, which is just horrible to read in C  :-// but performance and size will be similary for both languages if the program is well written
« Last Edit: May 20, 2020, 08:09:38 am by shangaoren »
 
The following users thanked this post: KennyM

Offline KarelTopic starter

  • Super Contributor
  • ***
  • Posts: 2540
  • Country: 00
Re: STM32Cube embedded software now on GitHub
« Reply #11 on: May 20, 2020, 08:46:44 am »
Please, let's not derail this thread and let's not divert from the topic.
If you have something to say about C vs C++, consider doing it here:

https://www.eevblog.com/forum/chat/how-many-people-code-in-c-these-days-and-if-so-why/

Thank you for your cooperation.
 

Online newbrain

  • Super Contributor
  • ***
  • Posts: 1908
  • Country: se
Re: STM32Cube embedded software now on GitHub
« Reply #12 on: May 20, 2020, 08:57:35 am »
The STM32Cube is also a great set of tools to get a project up and running very quickly for the vast majority of use cases.
Sure there are some cases where it wont work perfectly. And others where you need to optimize more than can be done using a HAL.
QFT.
I will also add that the HAL is not really worse than other vendors' libraries.

Digging into the NXP ones for the i.MX RT series I already found more bugs in some months than I did in the HAL in years, and the amount of layering and bloat makes the HAL pale in comparison (handles inside handles inside handles - sometimes as pointers, sometimes as nested struct, and sometimes even misaligned, so they use an array of 3 to hold 2 and bitwise & the address with a mask |O).

Still, they are very helpful to put together something quickly - and very often good enough.
Nandemo wa shiranai wa yo, shitteru koto dake.
 

Online Jeroen3

  • Super Contributor
  • ***
  • Posts: 4567
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: STM32Cube embedded software now on GitHub
« Reply #13 on: May 20, 2020, 01:13:18 pm »
Well, at least you can now easily report problems and suggest fixes.

Do not forget that what ST is making there is actually quite complicated to manage. Now imagine doing this surrounded by project managers rushed by deadlines.
 

Offline KarelTopic starter

  • Super Contributor
  • ***
  • Posts: 2540
  • Country: 00
Re: STM32Cube embedded software now on GitHub
« Reply #14 on: May 20, 2020, 03:22:23 pm »
... surrounded by project managers rushed by deadlines.

My biggest nightmare...
 

Offline dtodorov

  • Contributor
  • Posts: 46
  • Country: bg
Re: STM32Cube embedded software now on GitHub
« Reply #15 on: May 20, 2020, 06:37:07 pm »
I'm using CubeIDE happily for a few months for hobby projects. Works a treat, no bugs, no major issues whatsoever.
 

Offline nuclearcat

  • Supporter
  • ****
  • Posts: 383
  • Country: lb
Re: STM32Cube embedded software now on GitHub
« Reply #16 on: May 21, 2020, 12:10:43 am »
Here is example, why Cube and github "initiative" is garbage.
https://github.com/STMicroelectronics/STM32CubeF1/issues/6
Bug is reported, fixed in DIFFERENT chip firmware, and when user say WTF? they answer "don't even expect a fix". (Chip is not EOL).
IMO it is intentional sabotage.

Here is one more example:
https://community.st.com/s/question/0D50X0000BB1eL7SQJ/bug-cubemx-freertos-projects-corrupt-memory
Basically Cube have broken memory allocation and printf %f for many month, for many chips, solution is known, but they keep "discussing".
This is worst ever bug possible, that will cause race conditions, memory corruption and etc.
Conclusion:
If you make some kind of device based on this code, you will shoot yourself in the foot, since no one supports this code properly.
So yes, this piece of dried s**t is not suitable for anything else, than to check code snippets and get idea how to implement some kind of not very well-documented functionality.
(and at the same time remind yourself that there are programmers in the world who write such terrible code)

ST have cool hardware, but their "Cube*" is ugh, just awful.
It would be better if they pay&assist open source programmers (like opencm3 guys), and they can give customers MUCH better solutions.
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 9792
  • Country: ca
  • Non-expert
Re: STM32Cube embedded software now on GitHub
« Reply #17 on: May 21, 2020, 08:38:06 pm »
Here is example, why Cube and github "initiative" is garbage.
https://github.com/STMicroelectronics/STM32CubeF1/issues/6
Bug is reported, fixed in DIFFERENT chip firmware, and when user say WTF? they answer "don't even expect a fix". (Chip is not EOL).
IMO it is intentional sabotage.

The fix is posted there, support specifically said you can port it to the F1. It seems clear to me that internally they were told not to release any more FW for the F1. So yeah that part sucks. But its part of dealing with a company that wants to focus on profit. You can't support old devices forever, at some point they are let go.

I agree there are better ways to handle it though. There could be an "unsanctioned" or beta fork of the FW, where these fixes are implemented.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline nuclearcat

  • Supporter
  • ****
  • Posts: 383
  • Country: lb
Re: STM32Cube embedded software now on GitHub
« Reply #18 on: May 21, 2020, 10:09:06 pm »
Somehow yes, but how many such intentionally left unfixed bugs are in FW packages?
But one thing to defense of ST engineers - no one did PR, it would be interesting to see what the reaction would be.
If they want to play opensource, they should accept it.
If this is an imitation of opensource and interacting with community, it will be an interesting show.

And btw bug with printf %f hit many chips, not only "virtually EOL" F1, not fixed either.
 
The following users thanked this post: thm_w

Offline uer166

  • Super Contributor
  • ***
  • Posts: 1265
  • Country: us
Re: STM32Cube embedded software now on GitHub
« Reply #19 on: May 21, 2020, 10:48:16 pm »
And btw bug with printf %f hit many chips, not only "virtually EOL" F1, not fixed either.

The brand new G4 series that just came out has it and had us spend weeks tracking the crashes down. This is where ST support is garbage, I just don't necessarily think it's to do with anything about the STM32CubeIDE. The IDE itself is not at fault, but the shitty libraries that come from ST. You'll hit the same issues if you use those libraries without the IDE.
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 9792
  • Country: ca
  • Non-expert
Re: STM32Cube embedded software now on GitHub
« Reply #20 on: May 21, 2020, 11:33:04 pm »
That printf bug does sound hellish. I wonder if any sort of static analysis would catch it.
I like to use this lib where its possible instead: https://github.com/mpaland/printf

Mixing FreeRTOS into their own code just feels like a bad idea then. could be better off managed outside of the company via open source funding, etc.
At least the theory is with HAL they should know the abilities/limitations of their own hardware.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 
The following users thanked this post: oPossum, Karel, I wanted a rude username

Offline lucazader

  • Regular Contributor
  • *
  • Posts: 221
  • Country: au
Re: STM32Cube embedded software now on GitHub
« Reply #21 on: May 21, 2020, 11:57:50 pm »
mpaland's printf lib. Much smaller than the c stdlib implementation, especially if you want to print floats.

I also find it weird that they are hasting their own for lack of a better word "fork" of freertos.
Surely it would be better to pull in the official source, and then either patch it, or have a vendor specific support repo for it?

Will be interesting to see what they do when users start submitting PRs.
I dont think they wll actively accept them until they move their development fully out into the open on github. (if that would happen at all)
With their internal system not being tightly linked, and them only pushing snapshots it seems like it would be hard for them to manage except for manually coppying over a diff to their internal projects.

Would also be great for them to move the development out into the open as then when they patch a fix internall (but it hasn't passed release validation) users would still be able to see it, and use/test it out while they are waiting for a "stable" release.
 

Online Psi

  • Super Contributor
  • ***
  • Posts: 12604
  • Country: nz
Re: STM32Cube embedded software now on GitHub
« Reply #22 on: May 21, 2020, 11:59:57 pm »
I've not used STM32Cube in ages, so i'm not sure if my opinion is still valid but...

STM32Cube just went a little to far.
The goal of it seemed to be to hide away all the registers so idiots can code. (My guess is they were trying to do Arduino2.0 using their chip)
When the goal should have been a system to show how the registers can be used to do various tasks.

Ideally you want to get something working with the library then run an automated process to remove the library calls from source and replace with commented raw register calls.
So you can then look through and remove any crap that's not needed for your application.

It's not helped by the fact that the STM32 registers are not very human friendly at the best of times. Give me AVR registers any day.
And different library versions makes things a huge mess.

I really did like the concept of the GUI to graphically setup all the GPIO/Peripheral/Clock registers and click a button to get code for it. That makes a lot of sense. You can see exactly what your doing better in the app.
But it needed to be register based not library based, or at least have the option.
« Last Edit: May 22, 2020, 12:05:43 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline lucazader

  • Regular Contributor
  • *
  • Posts: 221
  • Country: au
Re: STM32Cube embedded software now on GitHub
« Reply #23 on: May 22, 2020, 12:27:41 am »
I really did like the concept of the GUI to graphically setup all the GPIO/Peripheral/Clock registers and click a button to get code for it. That makes a lot of sense. You can see exactly what your doing better in the app.
But it needed to be register based not library based, or at least have the option.

In some ways they have this now (kinda, i haven't really used it so cant comment with authority).
But in the cube you can now generate the project using LL libraries. Which are mostly just macro abstractions of the direct register changes.
Its not available for all peripherals. but is for the most common ones.
It also isnt super obvious how to do this because the ui isn't that great (they should really get a ui/ux person to go over some of their stuff. i think it would help usability a lot with these things)
You can also mix and match, eg use HAL for uart, but use LL for gpio and clock.

I probably should check out how useable and good the LL hal is. from a little bit of playing around it does remove a lot of the code bloat so projects compile to smaller more optimized programs out of the box.
 

Offline KarelTopic starter

  • Super Contributor
  • ***
  • Posts: 2540
  • Country: 00
Re: STM32Cube embedded software now on GitHub
« Reply #24 on: May 22, 2020, 07:15:25 am »
I like to use this lib where its possible instead: https://github.com/mpaland/printf

Thank you very much for sharing this  :-+

I already wrote my own printf() implementation but it doesn't support float/double yet.
I'm going to try this one.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf