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.
- Basic arduino functions libary
- Hardware Timer
- Hardware Serial
- Hardware SPI
- Hardware CRC
- EEPROM (flash storage)
How to view documentation
- Download and install doxygen to your device.
- 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.exein console in STM32ArduinoCore directory to generate documentation. Open file in html/index.html
Integrate with STM32 project
- Download or clone this library.
- Open/create project in STM32CubeIDE.
- Right click to project > Convert to C++.
- 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.
- Right click to project > Properties > C/C++ General > Paths and symbols > Source Location. Click to "Add Folder..." button and select STM32ArduinoCore, then click OK.
- 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:
- 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:
- 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.
Copyright (c) 2021 Matej Fitoš, Patrik Cepko, doc. Ing. Juraj Ďuďák, PhD.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.