Skip to main content
Javier1
Principal
October 15, 2021
Question

how to use stm32's HAL to create Arduino based libraries. ST32duino (C++)

  • October 15, 2021
  • 1 reply
  • 3033 views

Hello everyone.

Any tips/pointers about where to look for info about how to write an arduino library using stm32's hal?

Im a bit confused/scared about mixing c++ and c. (also scared of arduino underthehood non chip specific configs)

 0693W00000FCe8bQAD.pngAll stm32 related libraries i see are just .h/.c FILES, is there any speciall precaution or raindance i need to do in order to add C written library to my arduino project?

Could i get away with just copypasting together some cubeMX autogenerated init code and including the required hal.h stuff?

This topic has been closed for replies.

1 reply

Amel NASRI
Technical Moderator
October 15, 2021

Hi @Javier Muñoz​ ,

There is an article How to get started with STM32duino: An example using STM32 Nucleo board + ST MEMS shield?

It has no relation with STM32CubeMX.

Does it answer your request?

-Amel

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.
Javier1
Javier1Author
Principal
October 18, 2021

Hi @Amel NASRI​ , thanks for the article.

My question wasnt exactly about how to get started, it was more in the line of how to use stm32's HAL to create Arduino based libraries.

I would be interested in some cookbook or examples someone could have.

hit me up in https://www.linkedin.com/in/javiermuñoz/