STM32ArduinoCore Library wrapper - use Arduino functions in STM32 projects.

Arduino Core for STM32

With this project, you can easilly use Arduino functions and some extra functions on STM32 MCU. The main advantage is, that libraries designed for arduino can be easilly used on STM323 MCU. This project is designed for STM32CubeIDE, not for Arduino INO, because it is build on STM's HAL libraries. All files was written in c++ language.

Included libraries

  • Basic arduino functions libary
  • Hardware Timer
  • Hardware Serial
  • Hardware SPI
  • Hardware CRC
  • EEPROM (flash storage)

Supported MCU's:

  • STM32F030x6
  • STM32F070x6
  • STM32F070xB
  • STM32F031x6
  • STM32F103xB
  • STM32L031xx
  • STM32L432xx

How to view documentation

  1. Download and install doxygen to your device.
  2. When you use:
    • Windows - run makeDoc.bat file, it will create documentation to html directory and opens it. When you have already generated documentation directory (html), you can view it by opening index.html file in that directory.
    • Linux or Mac - run doxygen.exe in console in STM32ArduinoCore directory to generate documentation. Open file in html/index.html

Integrate with STM32 project

  1. Download or clone this library.
  2. Open/create project in STM32CubeIDE.
  3. Right click to project > Convert to C++.
  4. Right click to project > New > Folder > Advanced and check radio button "Link to alternate location (Linked folder)", then click to Browse and select, where is your downloaded library located. It is recommended to use variables in path.
  5. Right click to project > Properties > C/C++ General > Paths and symbols > Source Location. Click to "Add Folder..." button and select STM32ArduinoCore, then click OK.
  6. Right click to project > Properties > C/C++ General > Paths and symbols > Includes. Click to Add button (check "Is a workspace path") and add those paths to GNU C and GNU C++ tab:
    /${ProjName}/STM32ArduinoCore/src/Drivers/Inc
    /${ProjName}/STM32ArduinoCore/src/Streams/Inc
  7. Right click to project > Properties > C/C++ General > Paths and symbols > Symbols. Click to Add button and add this symbol to GNU C and GNU C++ tab:
    STM32
  8. Also check, if there is MCU type in symbols. For example STM32L432kc type is STM32L432xx.

Authors and Contributors

  • Matej Fitoš
  • Patrik Cepko
  • doc. Ing. Juraj Ďuďák, PhD.
Contributors 3
Matej Fitoš 83.3%
Juraj Ďuďák 8.3%
Patrik Cepko 8.3%
Languages
  • C++ [99.99%]
  • Batchfile [0.01%]
  • Created at 23.05.2021
    Last update 13.01.2025, 22:34:09