You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
||7 years ago|
|.idea||7 years ago|
|Drivers||7 years ago|
|Inc||7 years ago|
|Src||7 years ago|
|User||7 years ago|
|build||7 years ago|
|.cproject||7 years ago|
|.gitignore||7 years ago|
|.mxproject||7 years ago|
|.project||7 years ago|
|CMakeLists.txt||7 years ago|
|README.md||7 years ago|
|STM32F103C8Tx_FLASH.ld||7 years ago|
|f103-bluepill.ioc||7 years ago|
|f103-bluepill.xml||7 years ago|
|f103.cmake||7 years ago|
|flash.sh||7 years ago|
STM32F103 CLion CubeMX boilerplate
- This is a CMake / CLion project, using
- It's built on Linux. Whether it works on Windows or MacOS is left as an exercise to the reader 😛
- Update the init files using STM32CubeMX to fit your project needs. Open
bluepill.iocin CubeMX, then export to the same folder.
- Since we're using CubeMX, this project is based on HAL. It's not so bad, if you don't look at the source too much.
Getting Started - Usage
- The default setup is USART1, 115200 baud, at PA9 (Tx), PA10 (Rx); PC13 as output (built-in LED).
- The program branches from
User/user_main.cwhere the actual application code starts.
- Initialization of the application code (libs) is done in
User/init.c. Exception handlers and such are handled in
- Use the included Debounce module for button inputs, Timebase for periodic and future tasks.
- Functions from
User/utils/debug.hprint messages to USART1, and work like
printf()works as well.
calloc_s()if you want error message on malloc fail instead of a hard fault / memory corruption.
- Flash using
./flash.sh. Hold the reset button on the board, and release it right after issuing the flash command.