2024-04-06 06:12 AM
I had my first introduction to the STM32Cube and ST MCUs ecosystem and i'm trying to create applications that go further than blinking a led.
In the Arduino eco system, when playing with stepper motors, an SPI temperature sensor or even ethernet stuff, you can easy and quickly click file>example>...; by selecting your Arduino board and clicking on play; within 5 minutes everything works.
Behind the scenes, Arduino does all the library stuff making it transparent.
Does the STM32Cube ecosystem also has this experience?
Can I, for example, quickly get multiple stepper motors going (compatible with the Arduino stepper library), or quickly get a DS18xxx temperature measurement?
Or do I have to browse GitHub, hoping to find a person that posted a plausible solution that might require a significant effort to get that code running for my nucleo board?
Not trying to sound negative on effort:) but maybe I'm missing some essential button or widget.
If you are trying to get a prototype up and running on a quick and dirty basis, is moving away from Arduino a good solution?
I'm probably not the only person trying to get a stepper motor to run or a temperature readout on a nucleo, fast.
Is there a consolidated, almost 'standard' library repository for these kind of applications (not the HAL/CMSIS but more focused on applications).
thx!
2024-04-06 06:24 AM - edited 2024-06-06 01:57 AM
No, that's not really the way STM32CubeIDE works.
Maybe try STM32Duino:
https://www.arduino.cc/reference/en/libraries/stm32duino-examples/
https://community.st.com/t5/stm32-mcus/stm32-arduino-stm32duino-tutorial/ta-p/49649
#STM32Duino
2024-04-06 06:51 AM
Hello @sumbals and welcome to the ST Community :smiling_face_with_smiling_eyes:.
->Does the STM32Cube ecosystem also has this experience?
For the SYM32Cube ecosystem, you can start your project from scrtach configuring the necessary peripherals using CubeMX and setting the Code using CubeIDe. You can also start from one of our examples that you can modifie to be compatible with your needs.
If you want to migrate from using Arduino to using STM32, You may think about start using the STM32DUINO as suggested @Andrew Neil . Where you can program your STM32 using ArduinoIDE and libraries that are compatible with STM32 Boards. Those two articles (1 & 2) and this video may be helpful.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-04-08 12:54 AM
@sumbals wrote:If you are trying to get a prototype up and running on a quick and dirty basis, is moving away from Arduino a good solution?
See this thread - which asked basically the same question:
https://community.st.com/t5/other-software/stm32-software-tool/m-p/651167
TL;DR: if getting stuff done quickly is your key concern, then using tools you're already familiar with will generally get you there faster.
Using STM32CubeIDE (and similar) does assume a deeper level of knowledge & experience with C programming and tooling; eg,
https://community.st.com/t5/stm32cubeide-mcus/include-a-library/m-p/646845/highlight/true#M24891
It does give you more flexibility but, as always, more flexibility means more complexity.
2024-04-08 01:15 AM - edited 2024-04-08 01:18 AM
@sumbals wrote:Does the STM32Cube ecosystem also has this experience?
The important thing to remember is that the STM32Cube ecosystem is built, provided, and maintained by ST to support and promote their own products.
It's not, unlike Arduino, an independent 3rd-party.
So you won't find the breadth of ready-made support for non-ST products - like DS18xxx temperature sensors.
@sumbals wrote:Or do I have to browse GitHub, hoping to find a person that posted a plausible solution that might require a significant effort to get that code running for my nucleo board?
Basically, yes.
Or work from first principles - directly from the datasheet.
Usually, device manufacturers will provide basic driver code which is (more-or-less) independent of what controller you use - it is, after all, in their interests to get the products used in the widest range of applications.
eg, Analog Devices (formerly Maxim; previously Dallas) do provide generic drivers for their 1-Wire(TM) devices - such as the DS18xx:
Again, porting & incorporating that does require a (somewhat) deeper level of knowledge & experience with C programming and tooling.
#ArduinoVsCube #ArduinoVsSTM32Cube #STM32CubeVsArduino