Question about Arduino for STM32

Post here first, or if you can't find a relevant section!
Post Reply
noweare
Posts: 8
Joined: Mon Apr 20, 2020 2:14 pm

Question about Arduino for STM32

Post by noweare »

Does using the arduino core also give me access to arduino libraries written for other devices like tft displays, etc...?
I am currently using MxCubeIDE and I am comfortable with it but I am wondering if by using the arduino core I
also get the benefit of not having to write code from scratch (drivers/libraries) to use other devices & modules.
Thanks
mrburnette
Posts: 633
Joined: Thu Dec 19, 2019 1:23 am
Answers: 7

Re: Question about Arduino for STM32

Post by mrburnette »

YES, and no.

If the Arduino library is properly written (many Adafruit, Sparkfun libs) then technology unique to uC will be encapsulated in defines. Many libraries were originally modified and tested for STM32F1xx: (Roger's core)
https://github.com/rogerclarkmelbourne/ ... /libraries

Using the STM Official core, most modern libs will work or changes will be minimum.
... the benefit of not having to write code from scratch (drivers/libraries) to use other devices & modules.
That is, of course, the draw to Arduino for many professional programmers... quick prototyping using open-source. After vetting a mockup with a client, one can drop deeper and optimize.


Ray
noweare
Posts: 8
Joined: Mon Apr 20, 2020 2:14 pm

Re: Question about Arduino for STM32

Post by noweare »

Thanks Ray, that is good news. I am assuming I will still have access to the HAL and the low level libraries using the stm32 core correct ?
mrburnette
Posts: 633
Joined: Thu Dec 19, 2019 1:23 am
Answers: 7

Re: Question about Arduino for STM32

Post by mrburnette »

noweare wrote: Mon Apr 20, 2020 3:04 pm Thanks Ray, that is good news. I am assuming I will still have access to the HAL and the low level libraries using the stm32 core correct ?
Only IF you use core:
https://github.com/stm32duino/Arduino_Core_STM32
Which is known around the forum as the "Official core" ...

The history of Arduino support for STM32F103 is sorted: started with
- LeafLabs Maple development
- continued here: https://forum.arduino.cc/index.php?topi ... msg1981364
- and STM Corporate developed their core and took over this forum.

* Bob Cousins migrated the LeafLabs core into a directory structure that would compile on the publicly available ArduinoIDE 1.5.x and concocted the required properties files for the IDE.
noweare
Posts: 8
Joined: Mon Apr 20, 2020 2:14 pm

Re: Question about Arduino for STM32

Post by noweare »

Interesting history. I am glad ST decided to write their own core as I am familiar with there SDK. I have not used Rogers or any other core so I would use the "official" core. Thanks for your insight into this kind of confusing topic.
Post Reply

Return to “General discussion”